- 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
75 lines
2.5 KiB
Plaintext
75 lines
2.5 KiB
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title><%= content_for(:title) || "Волшебная Книга" %></title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="application-name" content="Волшебная Книга">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta charset="utf-8">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=IM+Fell+English:ital@0;1&display=swap" rel="stylesheet">
|
|
<%= csrf_meta_tags %>
|
|
<%= csp_meta_tag %>
|
|
|
|
<%= yield :head %>
|
|
|
|
<%# Enable PWA manifest for installable apps %>
|
|
<%= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
|
|
|
|
<link rel="icon" href="/icon.png" type="image/png">
|
|
<link rel="icon" href="/icon.svg" type="image/svg+xml">
|
|
<link rel="apple-touch-icon" href="/icon.png">
|
|
<meta name="theme-color" content="#0f0f14">
|
|
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
window.addEventListener('load', () => {
|
|
navigator.serviceWorker.register('/service-worker.js');
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
|
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
|
|
<%= javascript_importmap_tags %>
|
|
<% if Rails.env.test? %>
|
|
<style>
|
|
*, *::before, *::after {
|
|
transition: none !important;
|
|
animation: none !important;
|
|
scroll-behavior: auto !important;
|
|
}
|
|
</style>
|
|
<% end %>
|
|
</head>
|
|
|
|
<body>
|
|
<nav class="book-nav">
|
|
<div class="nav-inner">
|
|
<%= link_to "📖 Волшебная Книга", root_path, class: "nav-brand" %>
|
|
<div class="nav-links">
|
|
<%= link_to "Страницы", story_pages_path, class: "nav-link" %>
|
|
<%= link_to "Персонажи", characters_path, class: "nav-link" %>
|
|
<%= link_to "+ Новая страница", new_story_page_path, class: "nav-link nav-link--action" %>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<% if notice.present? %>
|
|
<div class="flash flash--notice"><%= notice %></div>
|
|
<% end %>
|
|
<% if alert.present? %>
|
|
<div class="flash flash--alert"><%= alert %></div>
|
|
<% end %>
|
|
|
|
<main class="book-main">
|
|
<%= yield %>
|
|
</main>
|
|
|
|
<footer class="book-footer">
|
|
<p>«Волшебная Книга» — пишите свои истории</p>
|
|
</footer>
|
|
</body>
|
|
</html>
|