Commit 8ed9f60af1
8ed9f60af1f1a3beca8f114db0175ce31f17822d
parent: 6e2e284468
Unsigned
cmc <hello@cleberg.net> · 2025-09-04 21:49 UTC
shift from monospace theme to a formalized serif theme
Layout: unified · split
build.py
+5 −3
| @@ -174,6 +174,7 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): |
| 174 | 174 | if title and date_str and slug: |
| 175 | 175 | try: |
| 176 | 176 | date_obj = datetime.strptime(date_str, "%Y-%m-%d") |
| 177 | date_full = date_obj.strftime("%B %d, %Y") |
| 177 | 178 | except ValueError: |
| 178 | 179 | # Skip files with invalid date format |
| 179 | 180 | continue |
| @@ -183,6 +184,7 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): |
| 183 | 184 | "title": title, |
| 184 | 185 | "date_str": date_str, |
| 185 | 186 | "date_obj": date_obj, |
| 187 | "date_full": date_full, |
| 186 | 188 | "slug": slug, |
| 187 | 189 | "tags": tags, |
| 188 | 190 | } |
| @@ -198,9 +200,6 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): |
| 198 | 200 | lines = [] |
| 199 | 201 | for post in recent: |
| 200 | 202 | lines.append('\t<div class="post">') |
| 201 | | lines.append( |
| 202 | | f'\t\t<time datetime="{post["date_str"]}">{post["date_str"]}</time>' |
| 203 | | ) |
| 204 | 203 | lines.append('\t\t<div class="post-content">') |
| 205 | 204 | lines.append( |
| 206 | 205 | f'\t\t\t<a href="/blog/{post["slug"]}.html">{post["title"]}</a>' |
| @@ -211,6 +210,9 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): |
| 211 | 210 | lines.append(f'\t\t\t\t<span class="tag">{tag}</span>') |
| 212 | 211 | lines.append("\t\t\t</div>") |
| 213 | 212 | lines.append("\t\t</div>") |
| 213 | lines.append( |
| 214 | f'\t\t<time datetime="{post["date_str"]}">{post["date_full"]}</time>' |
| 215 | ) |
| 214 | 216 | lines.append("\t</div>") |
| 215 | 217 | |
| 216 | 218 | return "\n".join(lines) |
theme/static/styles.css
+15 −24
| @@ -20,14 +20,8 @@ html{line-height:1.15;-webkit-text-size-adjust:100%}main{display:block}h1{font-s |
| 20 | 20 | body { |
| 21 | 21 | background-color: var(--bg); |
| 22 | 22 | color: var(--fg); |
| 23 | | font-family: |
| 24 | | Menlo, |
| 25 | | Consolas, |
| 26 | | Monaco, |
| 27 | | Liberation Mono, |
| 28 | | Lucida Console, |
| 29 | | monospace; |
| 30 | | font-size: 1rem; |
| 23 | font-family: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; |
| 24 | font-size: 1.25rem; |
| 31 | 25 | line-height: 1.5; |
| 32 | 26 | max-width: 50em; |
| 33 | 27 | margin: 0 auto; |
| @@ -55,7 +49,7 @@ footer p { |
| 55 | 49 | } |
| 56 | 50 | |
| 57 | 51 | ul { |
| 58 | | list-style-type: "- "; |
| 52 | list-style-type: "- "; |
| 59 | 53 | } |
| 60 | 54 | |
| 61 | 55 | .site-nav ul { |
| @@ -77,20 +71,20 @@ h4 { |
| 77 | 71 | } |
| 78 | 72 | |
| 79 | 73 | h1 { |
| 80 | | font-size: 1.5rem; |
| 74 | font-size: 1.75rem; |
| 81 | 75 | font-weight: bold; |
| 82 | 76 | margin-top: 1rem; |
| 83 | 77 | margin-bottom: 0.75rem; |
| 84 | 78 | } |
| 85 | 79 | |
| 86 | 80 | h2 { |
| 87 | | font-size: 1.25rem; |
| 81 | font-size: 1.5rem; |
| 88 | 82 | margin-top: 1rem; |
| 89 | 83 | margin-bottom: 0.5rem; |
| 90 | 84 | } |
| 91 | 85 | |
| 92 | 86 | h3 { |
| 93 | | font-size: 1rem; |
| 87 | font-size: 1.25rem; |
| 94 | 88 | margin-top: 1rem; |
| 95 | 89 | margin-bottom: 0.25rem; |
| 96 | 90 | } |
| @@ -123,13 +117,6 @@ table { |
| 123 | 117 | border-collapse: collapse; |
| 124 | 118 | color: var(--fg); |
| 125 | 119 | border-color: var(--bg-bright); |
| 126 | | font-family: |
| 127 | | Menlo, |
| 128 | | Consolas, |
| 129 | | Monaco, |
| 130 | | Liberation Mono, |
| 131 | | Lucida Console, |
| 132 | | monospace; |
| 133 | 120 | font-size: inherit; |
| 134 | 121 | width: 100%; |
| 135 | 122 | } |
| @@ -144,7 +131,6 @@ td { |
| 144 | 131 | |
| 145 | 132 | pre, |
| 146 | 133 | pre>code, |
| 147 | | time, |
| 148 | 134 | code { |
| 149 | 135 | font-family: |
| 150 | 136 | Menlo, |
| @@ -165,7 +151,6 @@ pre { |
| 165 | 151 | |
| 166 | 152 | :not(pre)>code { |
| 167 | 153 | color: var(--code); |
| 168 | | font-family: inherit; |
| 169 | 154 | } |
| 170 | 155 | |
| 171 | 156 | aside { |
| @@ -187,11 +172,14 @@ blockquote p { |
| 187 | 172 | .post, |
| 188 | 173 | .wiki-post { |
| 189 | 174 | display: flex; |
| 175 | justify-content: space-between; |
| 190 | 176 | } |
| 191 | 177 | |
| 192 | 178 | .post time { |
| 193 | 179 | flex-shrink: 0; |
| 180 | font-style: italic; |
| 194 | 181 | margin-right: 0.5rem; |
| 182 | opacity: 0.8; |
| 195 | 183 | } |
| 196 | 184 | |
| 197 | 185 | .wiki-post { |
| @@ -220,6 +208,10 @@ blockquote p { |
| 220 | 208 | margin: 0; |
| 221 | 209 | } |
| 222 | 210 | |
| 211 | .post-metadata time { |
| 212 | font-style: italic; |
| 213 | } |
| 214 | |
| 223 | 215 | details { |
| 224 | 216 | display: block; |
| 225 | 217 | margin-top: 1rem; |
| @@ -273,15 +265,14 @@ span.tag::before { |
| 273 | 265 | } |
| 274 | 266 | |
| 275 | 267 | .post-tags { |
| 276 | | font-size: 0.85rem; |
| 277 | | color: #999; |
| 268 | font-size: 1rem; |
| 278 | 269 | margin-top: 0.1rem; |
| 279 | 270 | } |
| 280 | 271 | |
| 281 | 272 | .tag { |
| 282 | 273 | margin-right: 0.3rem; |
| 283 | 274 | font-style: normal; |
| 284 | | opacity: 0.8; |
| 275 | opacity: 0.5; |
| 285 | 276 | } |
| 286 | 277 | |
| 287 | 278 | .tag::before { |
theme/templates/blog.html
+3 −3
| @@ -11,9 +11,6 @@ main %} |
| 11 | 11 | <br> |
| 12 | 12 | {% for post in posts %} |
| 13 | 13 | <div class="post"> |
| 14 | | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
| 15 | | >{{ post.date|strftime("%Y-%m-%d") }}</time |
| 16 | | > |
| 17 | 14 | <div class="post-content"> |
| 18 | 15 | <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a> |
| 19 | 16 | {% if post.filetags %} |
| @@ -24,5 +21,8 @@ main %} |
| 24 | 21 | </div> |
| 25 | 22 | {% endif %} |
| 26 | 23 | </div> |
| 24 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
| 25 | >{{ post.date|strftime("%B %d, %Y") }}</time |
| 26 | > |
| 27 | 27 | </div> |
| 28 | 28 | {% endfor %} {% endblock %} |
theme/templates/index.html
+7 −5
| @@ -1,10 +1,12 @@ |
| 1 | 1 | {% extends "base.html" %} {% block main %} |
| 2 | 2 | <section> |
| 3 | | <h1><i>~cmc</i></h1> |
| 4 | | <pre>pub rsa4096 2022-11-16 [SC] |
| 5 | | <a href="/gpg.txt">3917 973F B159 BBB8 6194 5385 6945 1A51 7AC0 CB37</a> |
| 6 | | uid [ultimate] Christian Cleberg <hello@cleberg.net> |
| 7 | | sub rsa4096 2022-11-16 [E]</pre> |
| 3 | <h1><i>Hi, I'm Christian.</i></h1> |
| 4 | <blockquote> |
| 5 | <b>shouganai</b> |
| 6 | <br>[sho-ga-n-eye] | しょうがない |
| 7 | <br><br> |
| 8 | <i>it is what it is</i> |
| 9 | </blockquote> |
| 8 | 10 | </section> |
| 9 | 11 | <section> |
| 10 | 12 | <h2>Blog Posts</h2> |
theme/templates/post.html
+1 −1
| @@ -12,7 +12,7 @@ |
| 12 | 12 | <h1>{{ post.title }}</h1> |
| 13 | 13 | {% if post.date is defined %} |
| 14 | 14 | <time datetime='{{ post.date|strftime("%Y-%m-%d") }}' |
| 15 | | ><{{ post.date|strftime("%Y-%m-%d %a %H:%M:%S") }}></time |
| 15 | >{{ post.date|strftime("%A, %B %d, %Y %H:%M:%S") }}</time |
| 16 | 16 | > |
| 17 | 17 | {% endif %} {% if post.filetags %} |
| 18 | 18 | <p class="post-tags"> |
theme/templates/wiki.html
+2 −2
| @@ -4,9 +4,9 @@ main %} |
| 4 | 4 | <p>Use <code>Ctrl + F</code> to search wiki pages for keywords.</p> |
| 5 | 5 | {% for post in posts %} |
| 6 | 6 | <div class="post"> |
| 7 | <a href='{{ url_for("wiki", slug=post.slug) }}'>{{ post.title }}</a> |
| 7 | 8 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
| 8 | | >{{ post.date|strftime("%Y-%m-%d") }}</time |
| 9 | >{{ post.date|strftime("%B %d, %Y") }}</time |
| 9 | 10 | > |
| 10 | | <a href='{{ url_for("wiki", slug=post.slug) }}'>{{ post.title }}</a> |
| 11 | 11 | </div> |
| 12 | 12 | {% endfor %} {% endblock %} |