Skip to content

Commit 47f877d

Browse files
committed
Restore the "old post" admonition
1 parent cf2960a commit 47f877d

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

themes/offby1/scss/offby1/_admonitions.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,23 @@
192192
}
193193
}
194194

195+
.admonition.historical {
196+
--admonition-color: #8b6914; // Warm amber/brown
197+
border-left-color: var(--admonition-color);
198+
199+
&::before {
200+
content: "\f017"; // fa-clock (watermark)
201+
}
202+
203+
.admonition-title {
204+
color: var(--admonition-color);
205+
206+
&::before {
207+
content: "\f017"; // fa-clock
208+
}
209+
}
210+
}
211+
195212
// Dark mode adjustments
196213
@media (prefers-color-scheme: dark) {
197214
.admonition.note {
@@ -224,4 +241,8 @@
224241
.admonition.attention {
225242
--admonition-color: #ff7043; // Lighter deep orange for dark mode
226243
}
244+
245+
.admonition.historical {
246+
--admonition-color: #c9a236; // Lighter amber/gold for dark mode
247+
}
227248
}

themes/offby1/scss/offby1/_fontawesome.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// Only import solid icons (most commonly used)
1515
@import "@fortawesome/fontawesome-free/scss/solid";
1616

17-
// Optional: Add brands if needed
18-
// @import "@fortawesome/fontawesome-free/scss/brands";
17+
// Brands icons (for social media icons like Mastodon, BlueSky, etc.)
18+
@import "@fortawesome/fontawesome-free/scss/brands";
1919

2020
// Optional: Add regular if needed
2121
// @import "@fortawesome/fontawesome-free/scss/regular";

themes/offby1/templates/article.html.j2

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@
5454
</div>
5555
</header>
5656

57+
{% if PUBLICATION_TIME.year - article.date.year > 5 %}
58+
<div class="admonition historical">
59+
<p class="admonition-title">Historical Post</p>
60+
<p>
61+
Hi, reader. I wrote this in {{ article.date.year }}. Technology and culture
62+
referenced may have changed and I nearly certainly have. I may disagree now
63+
with what I wrote then, or it may refer to obsolete terms and tech. I will
64+
usually only edit old posts to refresh links that have changed. If this post
65+
is particularly offensive please <a href="/about.html">contact me</a> and
66+
let me know.</p>
67+
</div>
68+
{% endif %}
69+
5770
<div class="article-content">
5871
{{ article.content }}
5972
</div>

0 commit comments

Comments
 (0)