Create a layout for individual thoughts
This commit is contained in:
parent
7544f9d3b7
commit
8f1fe6115f
5 changed files with 29 additions and 2 deletions
21
src/_includes/thought.njk
Normal file
21
src/_includes/thought.njk
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.njk" %}
|
||||
|
||||
{%- block title -%}
|
||||
<title>Z. Charles Dziura | Thought</title>
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block body -%}
|
||||
|
||||
{%- import "header.njk" as header -%}
|
||||
{{ header.header(page='') }}
|
||||
<main>
|
||||
<article class="thought">
|
||||
<div class="content">
|
||||
{{ page.rawInput | safe }}
|
||||
</div>
|
||||
<footer>
|
||||
Posted on {{ page.date | formatDate }}
|
||||
</footer>
|
||||
</article>
|
||||
</main>
|
||||
{%- endblock -%}
|
|
@ -14,10 +14,10 @@
|
|||
{%- if post.data.type == "thought" -%}
|
||||
<section class="thought">
|
||||
<header>
|
||||
<img class="hash" src="assets/hash.svg" type="image/svg+xml">
|
||||
<img class="hash" src="/assets/hash.svg" type="image/svg+xml">
|
||||
<span>An errant thought...</span>
|
||||
<a href="{{ post.url }}" class="link">
|
||||
<img src="assets/link.svg" type="image/svg+xml">
|
||||
<img src="/assets/link.svg" type="image/svg+xml">
|
||||
</a>
|
||||
</header>
|
||||
<div class="content">
|
||||
|
|
|
@ -107,6 +107,11 @@ main > .thought > .content {
|
|||
padding: var(--size-xl) var(--size-2x);
|
||||
}
|
||||
|
||||
main > article.thought > .content {
|
||||
border-top: unset;
|
||||
margin-top: unset;
|
||||
}
|
||||
|
||||
main > .thought > .content > p:first-of-type {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import { DateTime } from 'luxon';
|
|||
export default {
|
||||
date: 'git Created',
|
||||
type: 'thought',
|
||||
layout: 'thought.njk',
|
||||
permalink: function ({ page }) {
|
||||
const { date, fileSlug, outputFileExtension } = page;
|
||||
const today = DateTime.fromJSDate(date).toUTC();
|
||||
|
|
Loading…
Add table
Reference in a new issue