From c1745751113f01d091b5d247fccd39ff9e2660bb Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 21 Jun 2025 22:13:31 -0400 Subject: [PATCH] init --- .gitignore | 1 + content/index.md | 12 ++ content/static/style.css | 236 +++++++++++++++++++++++++++++++++++++++ justfile | 7 ++ templates/base.html | 20 ++++ templates/post.html | 7 ++ 6 files changed, 283 insertions(+) create mode 100644 .gitignore create mode 100644 content/index.md create mode 100644 content/static/style.css create mode 100644 justfile create mode 100644 templates/base.html create mode 100644 templates/post.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..364fdec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public/ diff --git a/content/index.md b/content/index.md new file mode 100644 index 0000000..9b1426e --- /dev/null +++ b/content/index.md @@ -0,0 +1,12 @@ +--- +title: My First Post +--- + +# My Title + +- This post has some content. + +```python +def foo(): + return "bar" +``` diff --git a/content/static/style.css b/content/static/style.css new file mode 100644 index 0000000..d6d538e --- /dev/null +++ b/content/static/style.css @@ -0,0 +1,236 @@ +:root { + --main-text-color: #b4b4b4; + --main-bg-color: #121212; + --main-link-color: #df6464; + --main-heading-color: #df6464; + --main-bullet-color: #d87c4a; + --main-transparent: rgba(255, 255, 255, 0.15); + --main-small-text-color: rgba(255, 255, 255, 0.45); +} + +body { + line-height: 1.6; + font-size: 18px; + font-family: sans-serif; + background: var(--main-bg-color); + color: var(--main-text-color); + padding-left: calc(100vw - 100%); +} + +/* h1, */ +h2, +h3, +h4, +h5, +h6 { + color: var(--main-heading-color); +} + +h1 { + margin-block-start: 0.67rem; + margin-block-end: 0.67rem; + font-size: 2rem; + font-weight: bold; +} + +article h1:first-of-type { + margin-block-start: 1.67rem; +} + +h2 { + margin-block-start: 0.83rem; + margin-block-end: 0.83rem; + font-size: 1.5rem; + font-weight: bold; +} + +h3 { + margin-block-start: 1rem; + margin-block-end: 1rem; + font-size: 1.17em; + font-weight: bold; +} + +h4 { + margin-block-start: 1.33rem; + margin-block-end: 1.33rem; + font-size: 1rem; + font-weight: bold; +} + +article h1+h4:first-of-type { + margin-block-start: 0rem; +} + +h5 { + margin-block-start: 1.67rem; + margin-block-end: 1.67rem; + font-size: 0.83rem; + font-weight: bold; +} + +h6 { + margin-block-start: 2.33rem; + margin-block-end: 2.33rem; + font-size: 0.67rem; + font-weight: bold; +} + +ul { + list-style-type: disc; + /* or any other list style */ +} + +li::marker { + color: var(--main-bullet-color); + /* Change this to your desired color */ +} + +a { + color: var(--main-link-color); +} + +a:hover { + background: var(--main-transparent); +} + +img { + display: block; + margin-left: auto; + margin-right: auto; + width: auto; + height: auto; +} + +blockquote { + color: var(--main-small-text-color); + border-left: 3px solid var(--main-transparent); + padding: 0 1rem; + margin-left: 0; + margin-right: 0; +} + +hr { + border: none; + height: 1px; + background: var(--main-small-text-color); +} + +code { + background: var(--main-transparent); + border-radius: 0.1875rem; + /* padding: .0625rem .1875rem; */ + /* margin: 0 .1875rem; */ +} + +code, +pre { + white-space: pre; + word-wrap: break-word; + overflow-wrap: break-word; + font-family: 'Fira Code', 'Consolas', 'Courier New', monospace; + font-size: 0.95em; +} + +pre { + background-color: #1d1d1d; + color: #d5d5d5; + padding: 1em; + border-radius: 5px; + line-height: 1.5; + overflow-x: auto; +} + +code { + background-color: #1d1d1d; + color: #d5d5d5; + padding: 0.2em 0.4em; + border-radius: 3px; +} + + +small { + font-size: 0.95rem; + color: var(--main-small-text-color); +} + +small a { + color: inherit; + /* Inherit the color of the surrounding text */ + text-decoration: underline; + /* Optional: Keep the underline to indicate a link */ +} + +.title-container { + display: flex; + justify-content: center; + align-items: center; + text-align: center; +} + +.title-container h1 { + margin: 0; +} + +.image-container { + text-align: center; + margin: 20px 0; + /* Optional: add some spacing around the image container */ +} + +.image-container img { + /* max-width: 308px; */ + max-height: 308px; +} + +.image-container small { + display: block; + /* Ensure the caption is on a new line */ + margin-top: 5px; + /* Optional: adjust spacing between image and caption */ +} + +.image-container small a { + color: inherit; + /* Ensure the link color matches the small text */ + text-decoration: underline; + /* Optional: underline to indicate a link */ +} + +#header ul { + list-style-type: none; + padding-left: 0; +} + +#header li { + display: inline; + font-size: 1.2rem; + margin-right: 1.2rem; +} + +#container { + margin: 2.5rem auto; + width: 90%; + max-width: 60ch; +} + +#postlistdiv ul { + list-style-type: none; + padding-left: 0; +} + +.moreposts { + font-size: 0.95rem; + padding-left: 0.5rem; +} + +#nextprev { + text-align: center; + margin-top: 1.4rem; + font-size: 0.95rem; +} + +#footer { + color: var(--main-small-text-color); +} + diff --git a/justfile b/justfile new file mode 100644 index 0000000..61d190b --- /dev/null +++ b/justfile @@ -0,0 +1,7 @@ +run arg: + #!/bin/sh + if [ -d "public" ] && [ "{{arg}}" = "build" ]; then + rm -r public + fi + uv run --project ~/dev/zona-py zona {{arg}} + diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..7ff91cc --- /dev/null +++ b/templates/base.html @@ -0,0 +1,20 @@ + + + + {{ metadata.title }} + + + + + +
+ {% block content %}{% endblock %} +
+ + + diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..eb5c191 --- /dev/null +++ b/templates/post.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block content %} +

{{ title }}

+
{{ content | safe }}
+{% endblock %} +