aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/static
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-12 12:26:17 +0300
committergrm <grm@eyesin.space>2026-09-12 12:26:17 +0300
commit2b450b66fee4906e746f6e04a6d07a72ff2faf64 (patch)
treeba2dbb3d9b3580113510dbf24d4ffe660cf95b26 /internal/web/static
parent336199c65d910bbd45a9c5dcbc3beae214d75b98 (diff)
downloadblogspace-2b450b66fee4906e746f6e04a6d07a72ff2faf64.tar.gz
blogspace-2b450b66fee4906e746f6e04a6d07a72ff2faf64.tar.bz2
blogspace-2b450b66fee4906e746f6e04a6d07a72ff2faf64.zip
Insert images straight from the Markdown editor
A shared editor partial adds an "Insert image" file picker plus paste and drag-and-drop on the textarea; a few lines of inline JS upload the file to the existing images endpoint (which now answers JSON when asked) and put the Markdown at the caret. Without JS the same file rides along with the form and is appended to the text on save, so nothing depends on scripting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/static')
-rw-r--r--internal/web/static/dashboard.css8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/web/static/dashboard.css b/internal/web/static/dashboard.css
index e0aee73..c3d1420 100644
--- a/internal/web/static/dashboard.css
+++ b/internal/web/static/dashboard.css
@@ -107,11 +107,17 @@ tr.disabled td { color: #8f887c; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 0.3em 0; border-bottom: 1px solid #ddd6c7; }
ul.plain li:last-child { border-bottom: 0; }
-details.help { margin: 0.8em 4px 1.6em 0; border: 2px dashed #1d1a17; padding: 0.5em 1em; background: #fbf8f0; }
+details.help { margin: 0.8em 0 0; border: 2px dashed #1d1a17; padding: 0.5em 1em; background: #fbf8f0; }
details.help summary { cursor: pointer; font-family: "IBM Plex Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.06em; }
details.help[open] summary { margin-bottom: 0.5em; }
.cheat td { border: 0; padding: 0.2em 1em 0.2em 0; background: none; }
+.editor-tools { margin: 0.5em 0 0; font-size: 0.9em; }
+.editor-tools .upload { display: inline-block; margin: 0 0.8em 0 0; padding: 0.25em 0.7em; border: 2px solid #1d1a17; background: #fffdf8; cursor: pointer; font-size: 0.8em; }
+.editor-tools .upload:hover { background: #ebe5d6; }
+.editor-tools .upload input { display: inline-block; width: auto; max-width: 14em; margin: 0 0 0 0.4em; padding: 0; border: 0; background: none; font-size: 0.9em; }
+.editor-tools .upload-status { font-family: "IBM Plex Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.85em; margin-right: 0.6em; }
+
/* ---- images -------------------------------------------------------------- */
.gallery { overflow: hidden; }
.thumb { float: left; width: 200px; margin: 0 1.2em 1.6em 0; padding: 0.6em; text-align: center; }