diff --git a/src/lib/post_template.ts b/src/lib/post_template.ts index cdcaf2a..2983a3f 100644 --- a/src/lib/post_template.ts +++ b/src/lib/post_template.ts @@ -3,8 +3,8 @@ import type { Post } from "./types"; import content from "@/client/editor/default.md" with {type: "text"}; export const template = { - content, - title: "New Post", + content: "", + title: "", } as Post; /** diff --git a/static/css/editor.css b/static/css/editor.css new file mode 100644 index 0000000..3f55513 --- /dev/null +++ b/static/css/editor.css @@ -0,0 +1,75 @@ +#post-container { + input { + width: 100%; + } + + .title-container { + align-items: center; + justify-content: start; + border: var(--solid-border); + padding-left: var(--gap); + gap: var(--gap); + + input { + border: none; + } + } +} + +#editor-container { + margin-top: var(--gap); + display: flex; + flex-direction: column; + border: 1px solid var(--link-col); + width: 100%; + + &:focus-within { + border: 1px solid lightblue; + } +} + +#editor, +#editor-loading { + width: 100%; + background-color: var(--body-lighter); +} + +#editor-loading { + padding: var(--gap); +} + +#editor-toolbar { + display: flex; + gap: var(--gap); + padding: var(--gap); + border-bottom: 1px dashed var(--link-col); + + button { + text-align: center; + align-items: center; + justify-content: center; + display: flex; + gap: var(--gap); + } +} + +#editor-stats { + padding: var(--gap); + border: var(--solid-border); + border-top: none; + outline: 1px solid var(--body-lighter); + background-color: var(--body-lighter); + z-index: 100; + width: min-content; + + .title, + dl { + margin: 0; + } + + dd, + dl { + text-align: center; + margin: 0; + } +} \ No newline at end of file diff --git a/views/editor.eta b/views/editor.eta index d7f1ea7..7f34e23 100644 --- a/views/editor.eta +++ b/views/editor.eta @@ -3,81 +3,13 @@
-
Loading editor.
+
Loading editor.
- \ No newline at end of file