Implement now burning

This commit is contained in:
Nathan Upchurch 2025-06-06 19:19:07 -05:00
parent 698fe4b7c6
commit 3871a05833
15 changed files with 277 additions and 15 deletions

View File

@ -40,12 +40,16 @@ export default {
linkDisplay: "Life Updates",
linkURL: "/now/",
},
{
iconURL: "/img/burn.svg",
linkDisplay: "Now Burning",
linkURL: "/now-burning/",
},
{
iconURL: "/img/icons/breeze/document-edit-sign.svg",
linkDisplay: "Quizzes",
linkURL: "/quizzes/",
},
{
iconURL: "/img/icons/breeze/map-globe.svg",
linkDisplay: "Sitemap",

29
_includes/incenseList.njk Normal file
View File

@ -0,0 +1,29 @@
<section class="postlist microblog-list">
{% if postlistHeaderText %}<h2>{{ postlistHeaderText }}</h2>{% endif %}
<div class="postlist-item-container">
{% for post in postslist | reverse %}
<article class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
<div class="post-copy">
<h3>
{% if post.data.title %}{{ post.data.title | safe }}{% else %}?{% endif %}{% if post.data.manufacturer %}, {{ post.data.manufacturer | safe }}{% endif %}
</h3>
<div class="post-metadata">
<div class="post-metadata-copy">
<p>
<time datetime="{{ post.date | htmlDateString }}">{{ post.date | niceDate }}{% if post.data.time %}—{{ post.data.time }}{% endif %}</time>
</p>
</div>
</div>
{% if post.content %}
<div class="microblog-comment">
{{ post.content | safe }}
</div>
{% endif %}
</div>
</article>
<hr>
{% endfor %}
</div>
</section>

View File

@ -1,26 +1,45 @@
<section class="postlist">
<section class="postlist{% if postListTypeMicroblog %} microblogList{% endif %}">
{% if postlistHeaderText %}<h2>{{ postlistHeaderText }}</h2>{% endif %}
<div class="postlist-item-container">
{% for post in postslist | reverse %}
<article class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
{% if not postListTypeMicroblog %}
<a href="{{ post.url }}" class="postlist-link">
<div class="post-image-container">
<img class="post-image" {% if post.data.imageURL %} src="{{ post.data.imageURL }}" alt="{{ post.data.imageAlt }}" {% else %} src="{{ metadata.defaultPostImageURL }}" alt="{{ metadata.defaultPostImageAlt }}"{% endif %}>
</div>
</a>
{% endif %}
<div class="post-copy">
{% if not postListTypeMicroblog %}
<a href="{{ post.url }}" class="postlist-link">
{% endif %}
<h3>
{% if post.data.title %}{{ post.data.title | safe }}{% else %}<code>{{ post.url }}</code>{% endif %}
{% if post.data.title %}{{ post.data.title | safe }}{% else %}?{% endif %}
</h3>
{% if not postListTypeMicroblog %}
</a>
{% endif %}
<div class="post-metadata">
<div class="post-metadata-copy">
<p>
{% if post.data.author %}
{% if post.data.author.url %}<a href="{{ post.data.author.url }}">{% endif %}{% if post.data.author.name %}By {{ post.data.author.name }}{% endif %}{% if post.data.author.url %}</a>&nbsp;•&nbsp;{% endif %}{% else %}<a href="{{ metadata.author.url }}">By {{ metadata.author.name }}</a>&nbsp;•&nbsp;{% endif %}<time datetime="{{ post.date | htmlDateString }}">{{ post.date | niceDate }}</time>
{% if not postListTypeMicroblog %}
{% if post.data.author %}
{% if post.data.author.url %}
<a href="{{ post.data.author.url }}">
{% endif %}
{% if post.data.author.name %}
By {{ post.data.author.name }}
{% endif %}
{% if post.data.author.url %}</a>&nbsp;•&nbsp;
{% endif %}
{% else %}<a href="{{ metadata.author.url }}">By {{ metadata.author.name }}</a>&nbsp;•&nbsp;
{% endif %}
{% endif %}
<time datetime="{{ post.date | htmlDateString }}">{{ post.date | niceDate }}{% if post.data.time %}—{{ post.data.time }}{% endif %}</time>
</p>
<ul>
{%- for tag in post.data.tags | filterTagList %}

View File

@ -4,6 +4,8 @@ title: Nathan Upchurch | Changelog
structuredData: none
---
# Changelog
* 2025-06-06
* Implement [/now-burning](/now-burning/) and [/once-burned](/once-burned/).
* 2025-04-19
* Improve post list image sizing on mobile.
* 2025-04-08

View File

@ -10,6 +10,7 @@ pagination:
- tagList
- gallery
- galleryImages
- nowBurning
addAllPagesToCollections: true
eleventyComputed:
title: “{{ tag }}”
@ -29,6 +30,7 @@ permalink: "/feeds/{{ tag | slugify }}.xml"
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in postslist | reverse %}
{% if post.url %}
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
{% if post.data.imageURL %}{% set imageURL %}{{ post.data.imageURL | htmlBaseUrl(metadata.url) }}{% endset %}{% endif %}
{% set defaultImageURL %}{{ metadata.defaultPostImageURL | htmlBaseUrl(metadata.url) }}{% endset %}
@ -45,5 +47,6 @@ permalink: "/feeds/{{ tag | slugify }}.xml"
</image>
<content type="html">{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) }}</content>
</entry>
{% endif %}
{%- endfor %}
</feed>

23
content/now-burning.njk Normal file
View File

@ -0,0 +1,23 @@
---
layout: layouts/base.njk
title: "Nathan Upchurch | Now Burning: What incense I'm burning at the moment."
structuredData: none
postlistHeaderText: "What I've been burning:"
---
{% set burning = collections.nowBurning | last %}
<h1>Now Burning:</h1>
<article class="post microblog-post">
<img class="microblog-icon" src="/img/censer.svg">
<div class="microblog-status">
<h2 class="">{{ burning.data.title }}, {{ burning.data.manufacturer }}<br>{{ burning.date | niceDate }}, {{ burning.data.time }}</h2>
{% if burning.content %}
<div class="microblog-comment">
{{ burning.content | safe }}
</div>
{% endif %}
</div>
</article>
<a href="/once-burned/">
<button type="button">Previous Entries »</button>
</a>

View File

@ -0,0 +1,7 @@
---
title: "Moss Garden (Nokiba)"
manufacturer: "Shoyeido"
date: 2025-06-06
time: 7:12 PM
---
Love this stick. Absolute classic.

View File

@ -0,0 +1,5 @@
export default {
tags: ["nowBurning"],
layout: "layouts/base.njk",
permalink: false,
};

View File

@ -1,6 +1,4 @@
export default {
tags: [
"now"
],
"layout": "layouts/post.njk",
tags: ["now"],
permalink: false,
};

View File

@ -0,0 +1,19 @@
---
layout: layouts/base.njk
title: "Nathan Upchurch | Once Burned: Incense I've burning in the past."
structuredData: none
---
{% set burning = collections.nowBurning | last %}
<h1>Previous “Now Burning” Entries:</h1>
{% set postsCount = collections.nowBurning | removeMostRecent | length %}
{% if postsCount > 1 %}
{% set postslist = collections.nowBurning | removeMostRecent %}
{% set showPostListHeader = false %}
{% include "incenseList.njk" %}
{% else %}
<p>Nothings here yet!</p>
{% endif %}
<a href="/now-burning/">
<button type="button">Latest »</button>
</a>

View File

@ -5,10 +5,12 @@ eleventyExcludeFromCollections: true
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{%- for page in collections.all %}
{% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
<url>
<loc>{{ absoluteUrl }}</loc>
<lastmod>{{ page.date | htmlDateString }}</lastmod>
</url>
{% if page.url %}
{% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
<url>
<loc>{{ absoluteUrl }}</loc>
<lastmod>{{ page.date | htmlDateString }}</lastmod>
</url>
{% endif %}
{%- endfor %}
</urlset>

View File

@ -204,7 +204,15 @@ export default async function (eleventyConfig) {
eleventyConfig.addFilter("filterTagList", function filterTagList(tags) {
return (tags || []).filter(
(tag) =>
["all", "nav", "post", "posts", "gallery", "quiz"].indexOf(tag) === -1,
[
"all",
"nav",
"post",
"posts",
"gallery",
"quiz",
"nowBurning",
].indexOf(tag) === -1,
);
});

View File

@ -636,6 +636,36 @@ header .home-link {
width: var(--space-l-xl);
}
/* Microblog */
.microblog-comment {
p {
font-style: italic;
margin: 0;
padding: var(--space-s) 0 0 0;
}
}
.microblog-icon {
filter: var(--logo-filter);
height: var(--space-4xl);
padding-right: var(--space-s);
width: var(--space-2xl);
}
.microblog-list {
.post-metadata {
padding: 0;
}
}
.microblog-post {
display: flex;
.microblog-comment {
p {
padding-top: 0;
padding-bottom: var(--space-2xs);
}
}
}
/* Nav */
.nav {
padding: 0;

40
public/img/burn.svg Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 16 16"
version="1.1"
id="svg1"
sodipodi:docname="burn.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="20.17464"
inkscape:cx="1.8835528"
inkscape:cy="6.4933004"
inkscape:window-width="1518"
inkscape:window-height="835"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg1" />
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
</defs>
<path
style="fill:#faf5f5;fill-opacity:1;stroke:none;stroke-width:2.33422"
d="m 4.2745802,1.0019999 c 2.1311454,0.4388338 3.7254196,2.32722 3.7254196,4.6054215 0,1.3678546 -0.5812215,2.5839847 -1.5009053,3.4406444 C 5.9855656,8.4341652 5.665777,7.6522006 5.665777,6.7838697 c 0,-0.1914063 0.023342,-0.3781441 0.070027,-0.5625477 -1.4332132,0.8029727 -2.4042499,2.3202175 -2.4042499,4.08489 0,2.600324 2.0821268,4.691788 4.6684457,4.691788 2.5909882,0 4.6684462,-2.091464 4.6684462,-4.691788 0,-4.8831942 -3.6787356,-8.8233622 -8.3938658,-9.3042121"
id="path4" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

73
public/img/censer.svg Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="105.10965mm"
height="353.12555mm"
viewBox="0 0 105.10965 353.12555"
version="1.1"
id="svg1"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
sodipodi:docname="censer.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="0.40667438"
inkscape:cx="104.50621"
inkscape:cy="793.01774"
inkscape:window-width="2048"
inkscape:window-height="1080"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<inkscape:page
x="8.3585536e-07"
y="0"
width="105.10965"
height="353.12555"
id="page1"
margin="0 0 0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-54.285356,56.125536)">
<g
id="g12"
transform="matrix(1.4735696,0,0,1.4735696,-51.273757,-168.39834)">
<path
style="fill:#faf5f5;fill-opacity:0.1;stroke-width:0.176994;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke markers fill"
d="m 107.42175,160.85428 c 0,0 -16.310691,-0.30774 -10.001839,-23.54278 6.308859,-23.23504 9.078599,-29.5439 2.615869,-38.160868 -6.462728,-8.61697 -8.309223,-16.926189 -2.923617,-20.311427 5.385607,-3.385239 19.542057,-1.230996 22.927297,8.001471 3.38524,9.232467 -8.00147,-9.232467 -18.46493,-4.000735 -10.463471,5.231731 19.38817,15.541319 16.00293,28.005149 -3.38523,12.46383 -8.85135,11.38671 -7.31251,20.15756 1.53885,8.77083 11.621,13.54095 7.46639,21.54242 -4.15461,8.00147 -10.30959,8.30921 -10.30959,8.30921 z"
id="path9"
sodipodi:nodetypes="cssssssssc" />
<path
d="m 76.433577,211.48787 c -2.752526,4.3986 -4.193469,9.31663 -4.193542,14.31282 -2.41e-4,11.21998 7.22998,22.97796 18.771981,28.19053 v 3.85093 c 0,1.27432 1.02631,2.30012 2.300635,2.30012 h 1.297078 c 1.274326,0 2.300118,-1.0258 2.300118,-2.30012 v -1.75235 c 0.648104,0.17322 1.301914,0.33021 1.960604,0.47077 -0.03296,0.15553 -0.05013,0.31702 -0.05013,0.48266 v 0.80512 c 0,1.27432 1.025789,2.30012 2.300119,2.30012 h 10.12083 c 1.27432,0 2.30064,-1.0258 2.30064,-2.30012 v -0.80512 c 0,-0.0265 -7.4e-4,-0.0533 -0.002,-0.0796 0.64077,-0.0998 1.27819,-0.21488 1.91151,-0.3452 v 1.2237 c 0,1.27432 1.02631,2.30012 2.30064,2.30012 h 1.29707 c 1.27432,0 2.30012,-1.0258 2.30012,-2.30012 v -2.9254 c 12.76341,-4.80555 21.01087,-17.12403 21.01061,-29.11606 -8e-5,-4.99619 -1.44102,-9.91422 -4.19355,-14.31282 h -28.56569 -4.60076 z"
style="fill:#faf5f5;stroke-width:0.260177;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke markers fill"
id="path11" />
<path
d="m 104.99979,148.45993 v 61.92955 h 4.60076 v -61.92955 z"
style="fill:#faf5f5;stroke-width:0.260177;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke markers fill"
id="path10" />
<path
d="m 107.30012,142.38048 c -1.27432,0 -2.30012,1.02579 -2.30012,2.30011 v 2.68098 h 4.60076 v -2.68098 c 0,-1.27432 -1.02631,-2.30011 -2.30064,-2.30011 z"
style="fill:#faf5f5;fill-opacity:1;stroke-width:0.264583;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke markers fill"
id="path7" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB