Commit d6fa2485fa
d6fa2485fa7fa9c74f8882f1f66ddd7584645d40
parent: 2dc229207a
Unsigned
cmc <hello@cleberg.net> · 2025-10-15 04:20 UTC
update theme
Layout: unified · split
build.py
+2 −3
| @@ -162,7 +162,7 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): |
| 162 | if title and date_str and slug: |
162 | if title and date_str and slug: |
| 163 | try: |
163 | try: |
| 164 | date_obj = datetime.strptime(date_str, "%Y-%m-%d") |
164 | date_obj = datetime.strptime(date_str, "%Y-%m-%d") |
| 165 | date_full = date_obj.strftime("%B %d, %Y") |
165 | date_full = date_obj.strftime("%Y-%m-%d") |
| 166 | except ValueError: |
166 | except ValueError: |
| 167 | # Skip files with invalid date format |
167 | # Skip files with invalid date format |
| 168 | continue |
168 | continue |
| @@ -186,7 +186,7 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): |
| 186 | # Build HTML lines |
186 | # Build HTML lines |
| 187 | lines = [] |
187 | lines = [] |
| 188 | for post in recent: |
188 | for post in recent: |
| 189 | lines.append('\t<div>') |
189 | lines.append('\t<div class="post">') |
| 190 | lines.append( |
190 | lines.append( |
| 191 | f'\t\t<time datetime="{post["date_str"]}">{post["date_full"]}</time>' |
191 | f'\t\t<time datetime="{post["date_str"]}">{post["date_full"]}</time>' |
| 192 | ) |
192 | ) |
| @@ -194,7 +194,6 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): |
| 194 | f'\t\t\t<a href="/blog/{post["slug"]}.html">{post["title"]}</a>' |
194 | f'\t\t\t<a href="/blog/{post["slug"]}.html">{post["title"]}</a>' |
| 195 | ) |
195 | ) |
| 196 | lines.append("\t</div>") |
196 | lines.append("\t</div>") |
| 197 | lines.append("\t<br>") |
| |
| 198 | |
197 | |
| 199 | return "\n".join(lines) |
198 | return "\n".join(lines) |
| 200 | |
199 | |
content/about/index.org
+1 −1
| @@ -1,7 +1,7 @@ |
| 1 | #+title: About |
1 | #+title: About |
| 2 | #+slug: index |
2 | #+slug: index |
| 3 | |
3 | |
| 4 | Hey, I'm */~cmc/*. |
4 | Hey, I'm Christian. |
| 5 | |
5 | |
| 6 | I'm a technology audit manager, working on financial statement audits (SOX/MAR), |
6 | I'm a technology audit manager, working on financial statement audits (SOX/MAR), |
| 7 | SOC 1-3 reports, and other attestations for KPMG. |
7 | SOC 1-3 reports, and other attestations for KPMG. |
theme/static/styles.css
+93 −22
| @@ -1,16 +1,73 @@ |
| |
1 | :root { |
| |
2 | --bg: #fafafa; |
| |
3 | --bg-light: #f0f0f0; |
| |
4 | --fg: #1b2229; |
| |
5 | --fg-light: #383a42; |
| |
6 | --link: #014980; |
| |
7 | --code: #e45649; |
| |
8 | } |
| |
9 | |
| 1 | body { |
10 | body { |
| 2 | max-width: 50em; |
11 | background-color: var(--bg); |
| 3 | margin: 1.5rem; |
12 | color: var(--fg-light); |
| |
13 | font-family: Menlo, Consolas, Monaco, Adwaita Mono, Liberation Mono, Lucida Console, monospace; |
| |
14 | font-size: 0.9rem; |
| |
15 | line-height: 1.4rem; |
| |
16 | margin: 1.5rem; |
| |
17 | max-width: 45em; |
| |
18 | } |
| |
19 | |
| |
20 | a { |
| |
21 | padding: 0 0.15rem; |
| |
22 | text-decoration: none; |
| |
23 | } |
| |
24 | |
| |
25 | a,a:active { |
| |
26 | color: var(--link); |
| |
27 | } |
| |
28 | |
| |
29 | a:hover { |
| |
30 | background-color: var(--link); |
| |
31 | color: var(--bg); |
| |
32 | } |
| |
33 | |
| |
34 | h1,h2,h3,h4,h5,h6 { |
| |
35 | color: var(--fg); |
| |
36 | font-size: 1rem; |
| |
37 | text-transform: uppercase; |
| |
38 | } |
| |
39 | |
| |
40 | nav { |
| |
41 | align-items: center; |
| |
42 | display: flex; |
| |
43 | justify-content: space-around; |
| |
44 | width: 100%; |
| 4 | } |
45 | } |
| 5 | |
46 | |
| 6 | nav ul { |
47 | nav ul { |
| 7 | list-style-type: none; |
48 | display: flex; |
| 8 | display: flex; |
49 | list-style-type: none; |
| 9 | padding: 0; |
50 | margin: 0; |
| |
51 | padding: 0; |
| |
52 | width: 100%; |
| 10 | } |
53 | } |
| 11 | |
54 | |
| 12 | nav ul li { |
55 | nav ul li { |
| 13 | margin-right: 0.5rem; |
56 | height: 100%; |
| |
57 | margin-bottom: 0.5rem; |
| |
58 | margin-right: 0.5rem; |
| |
59 | text-align: center; |
| |
60 | } |
| |
61 | |
| |
62 | blockquote { |
| |
63 | background-color: var(--bg-light); |
| |
64 | border-left: 8px solid var(--link); |
| |
65 | margin: 1rem 0; |
| |
66 | padding: 0.5rem 1rem; |
| |
67 | } |
| |
68 | |
| |
69 | blockquote p { |
| |
70 | margin: 0; |
| 14 | } |
71 | } |
| 15 | |
72 | |
| 16 | img { |
73 | img { |
| @@ -19,11 +76,15 @@ img { |
| 19 | } |
76 | } |
| 20 | |
77 | |
| 21 | table { |
78 | table { |
| 22 | border: 1px solid #111; |
79 | border: 1px dotted var(--fg); |
| 23 | border-collapse: collapse; |
80 | border-collapse: collapse; |
| 24 | width: 100%; |
81 | width: 100%; |
| 25 | } |
82 | } |
| 26 | |
83 | |
| |
84 | colgroup, thead, tbody { |
| |
85 | border: 1px dotted var(--fg); |
| |
86 | } |
| |
87 | |
| 27 | pre, |
88 | pre, |
| 28 | pre>code, |
89 | pre>code, |
| 29 | code { |
90 | code { |
| @@ -31,31 +92,41 @@ code { |
| 31 | } |
92 | } |
| 32 | |
93 | |
| 33 | pre { |
94 | pre { |
| 34 | border: 1px solid #111; |
95 | border: 1px dotted var(--fg); |
| 35 | margin: 0.5rem 0; |
96 | margin: 0.5rem 0; |
| 36 | padding: 0.5rem; |
| |
| 37 | overflow-x: auto; |
97 | overflow-x: auto; |
| |
98 | padding: 0.5rem; |
| 38 | } |
99 | } |
| 39 | |
100 | |
| 40 | time { |
101 | time { |
| 41 | display: block; |
102 | margin-right: 0.5rem; |
| 42 | } |
103 | } |
| 43 | |
104 | |
| 44 | :not(pre)>code { |
105 | :not(pre)>code { |
| 45 | color: #f00; |
106 | color: var(--code); |
| 46 | } |
107 | } |
| 47 | |
108 | |
| 48 | @media (prefers-color-scheme: dark) { |
109 | .post { |
| 49 | body { |
110 | align-items: flex-start; |
| 50 | background-color: #222; |
111 | display: flex; |
| 51 | color: #eee; |
112 | margin: 0.5rem 0; |
| 52 | } |
113 | } |
| 53 | |
114 | |
| 54 | a { |
115 | .post time { |
| 55 | color: #add8e6; |
116 | margin-right: 1rem; |
| 56 | } |
117 | } |
| |
118 | |
| |
119 | footer { |
| |
120 | margin: 1rem 0; |
| |
121 | } |
| 57 | |
122 | |
| 58 | pre { |
123 | @media (prefers-color-scheme: dark) { |
| 59 | border-color: #eee; |
124 | :root { |
| |
125 | --bg: #000000; |
| |
126 | --bg-light: #1B2229; |
| |
127 | --fg: #DFDFDF; |
| |
128 | --fg-light: #BBC2CF; |
| |
129 | --link: #047ACE; |
| |
130 | --code: #FF6C6B; |
| 60 | } |
131 | } |
| 61 | }\ No newline at end of file |
132 | }\ No newline at end of file |
theme/templates/base.html
+7 −7
| @@ -19,18 +19,18 @@ |
| 19 | <body> |
19 | <body> |
| 20 | <nav aria-label="site-nav" role="navigation"> |
20 | <nav aria-label="site-nav" role="navigation"> |
| 21 | <ul> |
21 | <ul> |
| 22 | <li><a href="/">Home</a></li> |
22 | <li><a href="/">/home</a></li> |
| 23 | <li><a href="/about/">About</a></li> |
23 | <li><a href="/about/">/about</a></li> |
| 24 | <li><a href="/blog/">Blog</a></li> |
24 | <li><a href="/blog/">/blog</a></li> |
| 25 | <li><a href="/services/">Services</a></li> |
25 | <li><a href="/services/">/services</a></li> |
| 26 | </ul> |
26 | </ul> |
| 27 | </nav> |
27 | </nav> |
| 28 | <main>{% block main %}{% endblock %}</main> |
28 | <main>{% block main %}{% endblock %}</main> |
| 29 | <footer> |
29 | <footer> |
| 30 | <a href="https://stats.uptimerobot.com/OwOWs7HU0z">Status</a> · |
30 | <a href="https://stats.uptimerobot.com/OwOWs7HU0z">status</a> · |
| 31 | <a href="https://git.cleberg.net/cleberg.net.git" target="_blank" |
31 | <a href="https://git.cleberg.net/cleberg.net.git" target="_blank" |
| 32 | rel="noopener">Source</a> · |
32 | rel="noopener">source</a> · |
| 33 | <a href="/feed.xml">RSS</a> |
33 | <a href="/feed.xml">rss</a> |
| 34 | </footer> |
34 | </footer> |
| 35 | </body> |
35 | </body> |
| 36 | </html> |
36 | </html> |
theme/templates/blog.html
+2 −3
| @@ -10,11 +10,10 @@ main %} |
| 10 | </p> |
10 | </p> |
| 11 | <br> |
11 | <br> |
| 12 | {% for post in posts %} |
12 | {% for post in posts %} |
| 13 | <div> |
13 | <div class="post"> |
| 14 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
14 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
| 15 | >{{ post.date|strftime("%B %d, %Y") }}</time |
15 | >{{ post.date|strftime("%Y-%m-%d") }}</time |
| 16 | > |
16 | > |
| 17 | <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a> |
17 | <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a> |
| 18 | </div> |
18 | </div> |
| 19 | <br> |
| |
| 20 | {% endfor %} {% endblock %} |
19 | {% endfor %} {% endblock %} |
theme/templates/index.html
+2 −1
| @@ -1,6 +1,6 @@ |
| 1 | {% extends "base.html" %} {% block main %} |
1 | {% extends "base.html" %} {% block main %} |
| 2 | <section> |
2 | <section> |
| 3 | <h1><i>Hi, I'm Christian.</i></h1> |
3 | <h1><i>christian cleberg</i></h1> |
| 4 | <blockquote> |
4 | <blockquote> |
| 5 | <b>shouganai</b> |
5 | <b>shouganai</b> |
| 6 | <br>[sho-ga-n-eye] | しょうがない |
6 | <br>[sho-ga-n-eye] | しょうがない |
| @@ -12,5 +12,6 @@ |
| 12 | <h2>Recent Posts</h2> |
12 | <h2>Recent Posts</h2> |
| 13 | <!-- BEGIN_POSTS --> |
13 | <!-- BEGIN_POSTS --> |
| 14 | <!-- END_POSTS --> |
14 | <!-- END_POSTS --> |
| |
15 | <p><a href="/blog/">All Posts →</a></p> |
| 15 | </section> |
16 | </section> |
| 16 | {% endblock %} |
17 | {% endblock %} |
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 | >{{ post.date|strftime("%A, %B %d, %Y %H:%M:%S") }}</time |
15 | >{{ post.date|strftime("%Y-%m-%d %H:%M:%S") }}</time |
| 16 | > |
16 | > |
| 17 | {% endif %} |
17 | {% endif %} |
| 18 | </section> |
18 | </section> |