diff options
-rw-r--r-- | include/lib.m4 | 11 | ||||
-rw-r--r-- | src/srp/index.gsp | 4 | ||||
-rw-r--r-- | src/style.css | 11 |
3 files changed, 22 insertions, 4 deletions
diff --git a/include/lib.m4 b/include/lib.m4 index 6220c84..24a911f 100644 --- a/include/lib.m4 +++ b/include/lib.m4 @@ -20,3 +20,14 @@ m4_define( m4_dnl Macro for generating abbrevations m4_define(m4_abbr, @abbr .m4_translit($1, A-Z2, a-zt) {-$1}) + +m4_define(m4_file_create_date, m4_esyscmd( + git log --reverse --pretty='format:%cI' $(dirname m4___file__)/$1/index.gsp \ + | head -n1 \ + | xargs date +'%-d %B %Y' -d +)) + +m4_define(m4_article, li .article { + a href="$1" $2 + span {-m4_file_create_date($1)} +}) diff --git a/src/srp/index.gsp b/src/srp/index.gsp index f829644..ae8e597 100644 --- a/src/srp/index.gsp +++ b/src/srp/index.gsp @@ -29,8 +29,8 @@ html lang="en" { p {-Posts:} ul { - li {a href="gsp" {-Writing an HTML Preprocessor (feat. Tree-Sitter)}} - li {a href="fw-ec" {-Patching My Laptop’s Embedded Controller}} + m4_article(gsp, {-Writing an HTML Preprocessor (feat. Tree-Sitter)}) + m4_article(fw-ec, {-Patching My Laptop’s Embedded Controller}) } } diff --git a/src/style.css b/src/style.css index b642fad..753de28 100644 --- a/src/style.css +++ b/src/style.css @@ -201,7 +201,12 @@ dl { .gsp-val { color: var(--aqua); } .gsp-op { color: var(--lesser); } -@media (min-width: 40em) { +.article { + display: flex; + justify-content: space-between; +} + +@media (min-width: 800px) { body { font-size: 1.3rem; line-height: 1.5; @@ -267,11 +272,13 @@ dl { abbr.xml::before { content: 'Extensible Markup Language'; } } -@media (max-width: 40em) { +@media (max-width: 600px) { body { tab-size: 4; } main { margin-block-end: 2rem; } h1, h2, p { overflow-wrap: break-word; hyphens: auto; } header > div { display: block; } ul, menu { padding-inline-start: 0; } :where(ul, menu) > li:not(:last-of-type) { margin-block-end: .3rem; } + .article { display: block; } + .article > * { display: block; } } |