diff --git a/src/assets/styles/components/_content.scss b/src/assets/styles/components/_content.scss index bda0b018..eba76a22 100644 --- a/src/assets/styles/components/_content.scss +++ b/src/assets/styles/components/_content.scss @@ -61,7 +61,7 @@ margin: 0; font-weight: 500; font-style: italic; - border-left: 4px solid var(--text-primary); + border-left: 3px solid var(--text-primary); padding-left: 1em; margin: 2.75rem -1.5rem; diff --git a/src/assets/styles/components/writing/_header.scss b/src/assets/styles/components/writing/_header.scss index 54bf9767..1f07d23a 100644 --- a/src/assets/styles/components/writing/_header.scss +++ b/src/assets/styles/components/writing/_header.scss @@ -2,7 +2,6 @@ &--content { margin: 144px 0px 0px 0px; padding-bottom: 64px; - border-bottom: 1px solid var(--border-default); @include mq-down(lg) { @@ -14,8 +13,15 @@ padding-bottom: 44px; } + .info { + display: flex; + gap: 8px; + color: var(--text-secondary); + margin-top: 24px; + } + h1 { - margin: 24px 0px; + margin: 0px 0px 24px 0px; } } } diff --git a/src/includes/writing/header.njk b/src/includes/writing/header.njk index 188dba05..4837a93f 100644 --- a/src/includes/writing/header.njk +++ b/src/includes/writing/header.njk @@ -6,15 +6,24 @@ >
-

- {{ page.date | dateToFormat('DDD') }} -

{{title}}

{{ description }}

+ +
+

+ {{ page.date | dateToFormat('DDD') }} +

+
+ +
+
+ +
+
\ No newline at end of file diff --git a/utils/filters.js b/utils/filters.js index d3bd586b..7f49bf28 100644 --- a/utils/filters.js +++ b/utils/filters.js @@ -59,5 +59,13 @@ module.exports = { return collection.filter( (item) => item.data.tags && item.data.tags.includes(tag) ) + }, + + readingTime: function (content) { + const WPM = 200 + + const wordCount = content.split(/\s+/).length + const readingTime = Math.ceil(wordCount / WPM) + return `${readingTime} min${readingTime !== 1 ? "s" : ""} read` } }