viktorvsk f3d33199f0
Some checks failed
CI / Lint & Test (push) Has been cancelled
Deploy Status Page / Build & Deploy (push) Has been cancelled
Волшебная Книга: Russian book storytelling app
- Book-styled UI with parchment aesthetic and Russian navigation
- Characters model with Konva.js 2D canvas drawing (draggable shapes)
- StoryPages model with character association and page navigation
- Stimulus controllers: canvas (editor) + canvas-preview (read-only)
- Full Russian interface: all labels, buttons, flash messages in Russian
2026-04-25 15:29:15 +00:00

37 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% content_for :title, "Персонажи" %>
<div class="page-card">
<h1 class="book-title">Персонажи</h1>
<p class="book-subtitle">Герои вашей истории</p>
<div class="action-row">
<%= link_to " Новый персонаж", new_character_path, class: "btn btn-primary" %>
<%= link_to "← На обложку", root_path, class: "btn btn-secondary" %>
</div>
<div class="section-divider">❧ ❧ ❧</div>
<% if @characters.any? %>
<div class="character-grid">
<% @characters.each do |character| %>
<%= link_to character_path(character), class: "character-card" do %>
<div class="character-canvas-preview" style="display:flex;align-items:center;justify-content:center;position:relative;background:#f0e4c8;">
<% if character.canvas_data.present? %>
<canvas data-character-id="<%= character.id %>" data-canvas-data="<%= character.canvas_data %>" style="max-width:100%;max-height:100%;"></canvas>
<% else %>
<span style="font-size:2.5rem;">🧙</span>
<% end %>
<div style="position:absolute;bottom:4px;right:6px;width:12px;height:12px;border-radius:50%;background:<%= character.color %>;border:2px solid #fff;"></div>
</div>
<div class="character-name" style="color:<%= character.color %>"><%= character.name %></div>
<% end %>
<% end %>
</div>
<% else %>
<div class="empty-state">
<span class="empty-state-icon">🧙</span>
<p>Персонажей пока нет. Создайте первого героя!</p>
</div>
<% end %>
</div>