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