Prototype post title style
This commit is contained in:
parent
58d06e9f0d
commit
71614e3481
3 changed files with 23 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addPassthroughCopy ("src/media");
|
||||
eleventyConfig.addPassthroughCopy ("src/resources");
|
||||
eleventyConfig.addPassthroughCopy ({ "src/resources": "/" });
|
||||
eleventyConfig.addPassthroughCopy ("src/robots.txt");
|
||||
|
||||
eleventyConfig.addPlugin( require("@11ty/eleventy-plugin-rss") );
|
||||
|
@ -22,6 +22,12 @@ module.exports = function (eleventyConfig) {
|
|||
}).toFormat("yyyy-MM-dd");
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("postDate", dateObj => {
|
||||
return DateTime.fromJSDate(dateObj, {
|
||||
zone: 'utc'
|
||||
}).toFormat("DDDD");
|
||||
});
|
||||
|
||||
return {
|
||||
dir: {
|
||||
input: "src",
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
layout: base.njk
|
||||
---
|
||||
<div class="title">
|
||||
<h1>{{ title }}</h1>
|
||||
<h3>{{ date }}</h3>
|
||||
<time datetime="{{ date | readableDate }}">{{ date | postDate }}</time>
|
||||
</div>
|
||||
<article>
|
||||
{{ content | safe }}
|
||||
</article>
|
||||
|
|
|
@ -13,6 +13,7 @@ html {
|
|||
--link_h: #771e2d;
|
||||
--bg_grey: #ebadc1;
|
||||
--dark_grey: #f46c97;
|
||||
--title: #f46c9750;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
|
@ -23,6 +24,7 @@ html {
|
|||
--link_h: #f94578;
|
||||
--bg_grey: #2d2531;
|
||||
--dark_grey: #221c25;
|
||||
--title: #221c2550;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,3 +363,13 @@ footer {
|
|||
padding: 5px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.title {
|
||||
background-color: var(--title);
|
||||
padding: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.title h1 {
|
||||
text-align: center;
|
||||
}
|
Loading…
Reference in a new issue