styling tweaks, date formatting, blog tweaks
This commit is contained in:
parent
4260eb4134
commit
93858a4dd4
|
@ -5,7 +5,8 @@ layout: 'base.njk'
|
|||
<div class="blog">
|
||||
<div class="blog-header">
|
||||
<h1>{{title}}</h1>
|
||||
<small>{{date}} {% if modified !== date %}(Last modified: {{modified}}){% endif %}</small> </br>
|
||||
<small>{{date | dateLocale}} {% if modified !== date %}(Last modified: {{modified | dateLocale}}){% endif %}</small>
|
||||
</br>
|
||||
<a href="/blog/"><- Back to posts list</a>
|
||||
</div>
|
||||
<div class="blog-content">
|
||||
|
|
|
@ -4,6 +4,8 @@ permalink: "/blog/"
|
|||
---
|
||||
|
||||
<h1>Blog</h1>
|
||||
{% for post in collections.blogpost %}
|
||||
<a href="{{ post.data.permalink | safe }}">{{post.data.title}}</a>
|
||||
{% for post in collections.blogpost | reverse %}
|
||||
<div>
|
||||
{{post.data.date | dateLocale}} - <a href="{{ post.data.permalink | safe }}">{{post.data.title}}</a>
|
||||
</div>
|
||||
{% endfor %}
|
|
@ -1,6 +1,8 @@
|
|||
@use "sass:color";
|
||||
|
||||
$grey-vdark: rgb(17, 24, 39);
|
||||
$grey-dark: lighten($grey-vdark, 5);
|
||||
$grey-medium: lighten($grey-vdark, 15);
|
||||
$grey-dark: color.adjust($grey-vdark, $lightness: 5%);
|
||||
$grey-medium: color.adjust($grey-vdark, $lightness: 15%);
|
||||
$grey-light: #4c566a;
|
||||
$white-dark: #d8dee9;
|
||||
$white-light: #eceff4;
|
||||
|
@ -89,14 +91,25 @@ body {
|
|||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
margin-bottom: 0rem;
|
||||
margin-top: 1rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
margin-bottom: 0.4rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
h3,
|
||||
h4,
|
||||
h5 {
|
||||
margin-bottom: 0rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.6rem;
|
||||
margin-bottom: 1.2rem;
|
||||
margin-top: 0.4rem;
|
||||
margin-bottom: 1.4rem;
|
||||
}
|
||||
|
||||
code,
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
import sass from "sass";
|
||||
import { DateTime } from "luxon";
|
||||
|
||||
export default async function (eleventyConfig) {
|
||||
eleventyConfig.addFilter("dateLocale", function (value) {
|
||||
return DateTime.fromISO(new Date(value).toISOString()).toLocaleString({
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: '2-digit',
|
||||
});
|
||||
});
|
||||
|
||||
// SCSS
|
||||
eleventyConfig.addTemplateFormats("scss");
|
||||
|
||||
eleventyConfig.addExtension("scss", {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"luxon": "^3.5.0",
|
||||
"sass": "^1.83.4"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
"type": "module",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"luxon": "^3.5.0",
|
||||
"sass": "^1.83.4"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue