Skip to content

Commit

Permalink
Add an old-post disclaimer
Browse files Browse the repository at this point in the history
Taking a page from @brainwane here, and adding a disclaimer to posts
older than 5 years. Gods know, I change enough.
  • Loading branch information
offbyone committed Jul 29, 2023
1 parent 439ca87 commit cab835d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions themes/offby1/scss/_fuji-theme/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -359,3 +359,10 @@ code {
}
}
}

.disclaimer {
padding: 1rem;
margin-bottom: 2rem;
border: 1px solid;
border-color: var(--color-font);
}
5 changes: 5 additions & 0 deletions themes/offby1/templates/article.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
</div>

<div class="post-content markdown-body e-content">
{% if PUBLICATION_TIME.year - article.date.year > 5 %}
<div class="disclaimer">
Hi, reader. I wrote this in {{ article.date.year }}. Technology referenced may have changed and I nearly certainly have. I may disagree now with what I wrote then, or it may refer to obsolete terms and tech. I will usually only edit old posts to refresh links that have changed. If this post is particularly offensive please contact me and let me know.
</div>
{% endif %}
{% if article.photo_image %}<img src="{{ SITEURL }}/{{ article.photo_image[1] }}" />{% endif %}
{{ article.content }}
{% if article.photo_gallery %}
Expand Down

0 comments on commit cab835d

Please sign in to comment.