From e089e0b2c3b02214a5a8596bff2e76dea43825fd Mon Sep 17 00:00:00 2001 From: luxick Date: Wed, 27 May 2026 10:52:47 +0200 Subject: [PATCH] CSS Refactor --- assets/diary/calendar.html | 2 +- assets/editor/main.html | 2 +- assets/editor/main.js | 4 +- assets/editor/movie.js | 4 +- assets/layout.html | 6 +- assets/modal.js | 8 +- assets/page/actions.js | 6 +- assets/page/anchors.js | 2 +- assets/page/main.html | 4 +- assets/page/toc.js | 2 +- assets/style.css | 1078 ++++++++++++------------------------ assets/tree-picker.js | 2 +- 12 files changed, 367 insertions(+), 753 deletions(-) diff --git a/assets/diary/calendar.html b/assets/diary/calendar.html index bc0463b..99e5201 100644 --- a/assets/diary/calendar.html +++ b/assets/diary/calendar.html @@ -1,4 +1,4 @@ -
+
{{.MonthName}} diff --git a/assets/editor/main.html b/assets/editor/main.html index f245b67..e787b0e 100644 --- a/assets/editor/main.html +++ b/assets/editor/main.html @@ -70,7 +70,7 @@
- + diff --git a/assets/editor/main.js b/assets/editor/main.js index 4a8dacc..dfcfede 100644 --- a/assets/editor/main.js +++ b/assets/editor/main.js @@ -85,13 +85,13 @@ var targetWrap = document.createElement('div'); var targetInput = document.createElement('input'); targetInput.type = 'text'; - targetInput.className = 'modal-input'; + targetInput.className = 'input'; targetInput.placeholder = 'Page path or search…'; targetWrap.appendChild(targetInput); var displayInput = document.createElement('input'); displayInput.type = 'text'; - displayInput.className = 'modal-input'; + displayInput.className = 'input'; displayInput.placeholder = 'Display text (optional)'; if (sel) displayInput.value = sel; diff --git a/assets/editor/movie.js b/assets/editor/movie.js index 75237fb..8d103db 100644 --- a/assets/editor/movie.js +++ b/assets/editor/movie.js @@ -105,7 +105,7 @@ window.EditorMovie = (function () { var input = document.createElement('input'); input.type = 'text'; - input.className = 'modal-input'; + input.className = 'input'; input.placeholder = 'OMDb API key'; body.appendChild(input); @@ -128,7 +128,7 @@ window.EditorMovie = (function () { function importWithKey(textarea, key, initialTitle) { var input = document.createElement('input'); input.type = 'text'; - input.className = 'modal-input'; + input.className = 'input'; input.placeholder = 'Title, optionally with (YYYY)'; input.value = initialTitle; diff --git a/assets/layout.html b/assets/layout.html index 5a3a8c2..bd6c91e 100644 --- a/assets/layout.html +++ b/assets/layout.html @@ -17,16 +17,16 @@
-
diff --git a/assets/modal.js b/assets/modal.js index 34beeb2..6b7dcc7 100644 --- a/assets/modal.js +++ b/assets/modal.js @@ -15,20 +15,20 @@ backdrop.className = 'modal-backdrop'; modal = document.createElement('div'); - modal.className = 'modal'; + modal.className = 'modal panel panel-floating'; modal.setAttribute('role', 'dialog'); modal.setAttribute('aria-modal', 'true'); var header = document.createElement('div'); - header.className = 'modal-header'; + header.className = 'panel-header'; titleEl = document.createElement('span'); header.appendChild(titleEl); bodyEl = document.createElement('div'); - bodyEl.className = 'modal-body'; + bodyEl.className = 'panel-body'; footerEl = document.createElement('div'); - footerEl.className = 'modal-footer'; + footerEl.className = 'panel-footer'; cancelBtn = document.createElement('button'); cancelBtn.type = 'button'; diff --git a/assets/page/actions.js b/assets/page/actions.js index b7fc9a4..82a5849 100644 --- a/assets/page/actions.js +++ b/assets/page/actions.js @@ -36,7 +36,7 @@ function postReplace(action, body, target) { function promptPageName(title, initial, confirmLabel, onName) { var input = document.createElement('input'); input.type = 'text'; - input.className = 'modal-input'; + input.className = 'input'; input.placeholder = 'Page name'; if (initial) input.value = initial; openModal({ @@ -89,7 +89,7 @@ function movePage() { onSelect: function (newParent) { var input = document.createElement('input'); input.type = 'text'; - input.className = 'modal-input'; + input.className = 'input'; input.placeholder = 'Page name'; input.value = currentName; @@ -99,7 +99,7 @@ function movePage() { var linksLabel = document.createElement('label'); linksLabel.htmlFor = linksCheckbox.id; - linksLabel.className = 'modal-checkbox'; + linksLabel.className = 'row'; linksLabel.appendChild(linksCheckbox); linksLabel.appendChild(document.createTextNode('Update links')); diff --git a/assets/page/anchors.js b/assets/page/anchors.js index 0dbaa3f..43709da 100644 --- a/assets/page/anchors.js +++ b/assets/page/anchors.js @@ -42,7 +42,7 @@ function addTask(sectionIndex, headingId) { var input = document.createElement('input'); input.type = 'text'; - input.className = 'modal-input'; + input.className = 'input'; input.placeholder = 'Task description'; var ctrl = openModal({ title: 'Add task', diff --git a/assets/page/main.html b/assets/page/main.html index d9b8fa6..a7ac154 100644 --- a/assets/page/main.html +++ b/assets/page/main.html @@ -9,7 +9,7 @@ {{end}} {{if .Entries}}

Files

-
+
{{range .Entries}}
{{.Icon}} @@ -35,7 +35,7 @@ {{end}} -{{define "sidebar"}}{{if .CanEdit}}