diff --git a/assets/css/components/til.css b/assets/css/components/archive.css similarity index 84% rename from assets/css/components/til.css rename to assets/css/components/archive.css index af609e85..5a12f18f 100644 --- a/assets/css/components/til.css +++ b/assets/css/components/archive.css @@ -25,48 +25,52 @@ display: none; } -.sm-micro-grid { +.sm-archive-grid { row-gap: 3rem; padding-block: 0 6rem; } -.sm-micro-header, -.sm-micro-grid { +.sm-archive-header, +.sm-archive-grid { margin-block-start: 0; } -.sm-micro-grid > *, -.sm-micro-header > * { +.sm-archive-grid > *, +.sm-archive-header > * { text-align: left; } -.sm-micro-heading { +.sm-archive-header { + row-gap: 0; +} + +.sm-archive-heading { margin: 1rem 0; font-weight: 900; color: var(--element-light); text-transform: uppercase; } -.sm-micro-article:where(:hover, :focus-visible) h3 { +.sm-archive-article:where(:hover, :focus-visible) h3 { color: var(--primary); } -.sm-micro-article a { +.sm-archive-article a { display: flex; flex-direction: column; gap: 0.5rem; } -.sm-micro-article h3 { +.sm-archive-article h3 { margin: 0; transition: color var(--transition); } -.sm-micro-excerpt { +.sm-archive-excerpt { max-width: 60ch; } -.sm-micro-article span { +.sm-archive-article span { padding: 0.25rem 0.5rem; font-size: var(--x-small); font-weight: 300; @@ -79,7 +83,7 @@ margin-inline-start: 0.5rem; } -.sm-micro-date { +.sm-archive-date { display: flex; gap: 0.15em; font-weight: 300; @@ -88,7 +92,7 @@ } @media (--laptop) { - .sm-micro-date { + .sm-archive-date { position: absolute; display: flex; flex-direction: column; @@ -100,7 +104,7 @@ translate: -150% 5%; } - .sm-micro-month { + .sm-archive-month { font-size: 1.15rem; letter-spacing: 0.3px; } diff --git a/assets/css/index.css b/assets/css/index.css index 9d64140e..063398bb 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -35,7 +35,7 @@ @import 'components/form.css'; @import 'components/gradient.css'; @import 'components/toc.css'; -@import 'components/til.css'; +@import 'components/archive.css'; /* Vendo"r */ @import 'vendor/kg.css'; diff --git a/custom-TIL.hbs b/custom-TIL.hbs deleted file mode 100644 index 57465332..00000000 --- a/custom-TIL.hbs +++ /dev/null @@ -1,27 +0,0 @@ -{{!< default}} -{{!-- The tag above means: insert everything in this file -into the {body} of the default.hbs template --}} - -{{#post}} - {{> "header"}} - -
- {{content}} -
- - {{#get "posts" limit="all" include="tags" as |micro|}} - - {{#if micro}} -
- {{#foreach micro}} - {{> "til-card"}} - {{/foreach}} -
- {{/if}} - - {{/get}} - - - -{{/post}} - diff --git a/custom-archive.hbs b/custom-archive.hbs new file mode 100644 index 00000000..114de04c --- /dev/null +++ b/custom-archive.hbs @@ -0,0 +1,23 @@ +{{!< default}} +{{!-- The tag above means: insert everything in this file +into the {body} of the default.hbs template --}} + +{{#post}} + {{> "header"}} + +
+ {{content}} +
+ + {{#get "posts" limit="all" include="tags" filter="tags:hash-{{slug}}" as |archive|}} + + {{#if archive}} +
+ {{#foreach archive}} + {{> "archive-card"}} + {{/foreach}} +
+ {{/if}} + + {{/get}} +{{/post}} diff --git a/partials/archive-card.hbs b/partials/archive-card.hbs new file mode 100644 index 00000000..c6413dd6 --- /dev/null +++ b/partials/archive-card.hbs @@ -0,0 +1,14 @@ +
+

{{date format='YYYY'}}

+
+ +

{{title}}{{#if primary_tag}}{{primary_tag.name}}{{/if}}

+
+

{{date format='MMM'}}

+

{{date format='DD'}}

+
+

{{excerpt}}

+
+
+
\ No newline at end of file diff --git a/partials/til-card.hbs b/partials/til-card.hbs deleted file mode 100644 index c953a136..00000000 --- a/partials/til-card.hbs +++ /dev/null @@ -1,14 +0,0 @@ -
-

{{date format='YYYY'}}

-
- -

{{title}}{{#if primary_tag}}{{primary_tag.name}}{{/if}}

-
-

{{date format='MMM'}}

-

{{date format='DD'}}

-
-

{{excerpt}}

-
-
-
\ No newline at end of file