diff --git a/src/NexusReader.UI.Shared/Pages/CreatorEdit.razor b/src/NexusReader.UI.Shared/Pages/CreatorEdit.razor new file mode 100644 index 0000000..9d4c636 --- /dev/null +++ b/src/NexusReader.UI.Shared/Pages/CreatorEdit.razor @@ -0,0 +1,60 @@ +@page "/creator/edit/{BookId}/{ChapterId}" +@layout MainHubLayout +@attribute [Authorize] + +
+ +
+

Rozdziały

+
+ 1. Rozdział 1: Wprowadzenie d... +
+
+ 2. Rozdział 2: Zabezpieczenia i... +
+
+ +
+
+

Rozdział 1: Wprowadzenie do Zen Mode

+ ID: @GetSafeChapterIdPrefix()... +
+ +
+
+
+
+ + +
+
+
+ +@code { + [Parameter] + public string BookId { get; set; } = string.Empty; + + [Parameter] + public string ChapterId { get; set; } = string.Empty; + + private void FetchContent() + { + // Actual retrieval logic can go here + } + + private string GetSafeChapterIdPrefix() + { + if (string.IsNullOrEmpty(ChapterId)) return "N/A"; + return ChapterId.Length >= 8 ? ChapterId.Substring(0, 8) : ChapterId; + } +} diff --git a/src/NexusReader.UI.Shared/Pages/CreatorEdit.razor.css b/src/NexusReader.UI.Shared/Pages/CreatorEdit.razor.css new file mode 100644 index 0000000..9472ae9 --- /dev/null +++ b/src/NexusReader.UI.Shared/Pages/CreatorEdit.razor.css @@ -0,0 +1,141 @@ +/* --- 1. BLOKADA VIEWPORTU (ZERO GLOBAL SCROLL) --- */ +.creator-edit-fullscreen-wrapper { + width: 100% !important; + max-width: 100% !important; + height: calc(100vh - 4rem) !important; /* Idealne odcięcie od topbaru platformy */ + margin: 0; + padding: 0 !important; /* Likwidujemy marginesy zewnętrzne dla pełnego ekranu roboczego */ + display: flex; + overflow: hidden !important; /* Całkowity zakaz przewijania głównego okna */ + background-color: var(--bg-base); +} + +/* --- 2. LUKSUSOWY PANEL BOCZNY ROZDZIAŁÓW --- */ +.chapters-sidebar { + width: 280px !important; + flex-shrink: 0; + background-color: #16161a !important; /* Matowy, głęboki odcień grafitu */ + border-right: 1px solid rgba(255, 255, 255, 0.05) !important; + display: flex; + flex-direction: column; + padding: 2rem 1rem !important; + overflow-y: auto; +} + +.theme-light .chapters-sidebar { + background-color: #ede9df !important; /* Harmonijna, ciemniejsza sepia dla jasnego motywu */ + border-right: 1px solid var(--border) !important; +} + +.chapters-sidebar h2 { + font-size: 1.25rem; + font-weight: 700; + color: var(--text-main); + margin-bottom: 1.5rem; + padding-left: 0.5rem; +} + +/* Elementy listy rozdziałów */ +.chapter-item { + display: flex; + align-items: center; + padding: 10px 14px !important; + margin-bottom: 4px; + border-radius: 8px; + color: var(--text-muted); + font-size: 0.95rem; + cursor: pointer; + transition: all 0.2s ease; + border-left: 3px solid transparent !important; +} + +/* Stan aktywny wybranego rozdziału (Zunifikowany z systemem) */ +.chapter-item.active { + background-color: rgba(0, 255, 153, 0.04) !important; + color: var(--accent) !important; + font-weight: 600; + border-left: 3px solid var(--accent) !important; +} + +.theme-light .chapter-item.active { + background-color: rgba(16, 185, 129, 0.06) !important; +} + +.chapter-item:hover:not(.active) { + background-color: rgba(255, 255, 255, 0.02); + color: var(--text-main); +} + +/* --- 3. OBSZAR WORKSPACE (KREATOR CENTRUM) --- */ +.editor-workspace-area { + flex-grow: 1; + display: flex; + flex-direction: column; + height: 100%; + overflow: hidden; + padding: 2.5rem 3.5rem 1.5rem 3.5rem !important; /* Większy oddech boczny dla trybu Zen */ +} + +/* Tytuł rozdziału u góry */ +.editor-workspace-area h1.chapter-title { + font-size: 2.2rem; + font-weight: 700; + color: var(--text-main); + margin: 0 0 1.5rem 0; + letter-spacing: -0.5px; +} + +/* Dyskretny indykator ID rozdziału */ +.chapter-id-badge { + font-family: 'Azeret Mono', monospace; + font-size: 0.75rem; + color: var(--text-muted); + background: rgba(255, 255, 255, 0.02); + padding: 2px 8px; + border-radius: 4px; + border: 1px solid rgba(255, 255, 255, 0.05); + opacity: 0.6; +} + +/* --- 4. KARTA ROBOCZA EDYTORA I SCROLLBAR --- */ +.editor-canvas-card { + background-color: var(--bg-surface) !important; + border: 1px solid var(--border) !important; + border-radius: 16px; + padding: 2.5rem !important; + display: flex; + flex-direction: column; + flex-grow: 1; + overflow: hidden; /* Kontrola przewijania wyłącznie wewnątrz tekstu */ +} + +::deep .ProseMirror { + color: var(--text-main) !important; + flex-grow: 1; + overflow-y: auto !important; /* Przewija się tylko tekst książki! */ + padding-right: 20px !important; + outline: none !important; +} + +/* --- 5. ZINTEGROWANY PASEK STANU I AKCJI (FOOTER) --- */ +.editor-footer-bar { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 1.5rem; + padding-top: 1rem; + border-top: 1px solid var(--border); + flex-shrink: 0; +} + +.cloud-status { + display: flex; + align-items: center; + gap: 8px; + font-size: 0.85rem; + color: var(--text-muted); +} + +.cloud-status i { + color: var(--accent); /* Zielona dioda zapisu statusu */ +}