Create content list template
This commit is contained in:
parent
58b0e11f2b
commit
74ffb66923
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
layout: main/base
|
||||
metadata:
|
||||
type: article
|
||||
---
|
||||
|
||||
<header class="main__header">
|
||||
<h1>{{ title }}</h1>
|
||||
{% if intro %}
|
||||
<p>{{ intro }}</p>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div class="content__wrapper">
|
||||
{% if toc %}
|
||||
{% include "toc.njk" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="content-list">
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
</div>
|
|
@ -261,6 +261,7 @@ main {
|
|||
|
||||
.main__header,
|
||||
.article,
|
||||
.content-list,
|
||||
.left-sidebar,
|
||||
.right-sidebar {
|
||||
padding: 1.5rem clamp(1rem, 5%, 3rem);
|
||||
|
@ -271,6 +272,7 @@ main {
|
|||
}
|
||||
|
||||
.article,
|
||||
.content-list,
|
||||
.left-sidebar,
|
||||
.right-sidebar {
|
||||
background-color: var(--clr-content-bg);
|
||||
|
@ -302,7 +304,8 @@ main {
|
|||
grid-template-columns: minmax(0,15rem) minmax(0,2.5fr) minmax(0,15rem);
|
||||
}
|
||||
|
||||
.article {
|
||||
.article,
|
||||
.content-list {
|
||||
grid-area: article;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
layout: main/base
|
||||
layout: main/content-list
|
||||
title: Articles
|
||||
metadata:
|
||||
desc: List of articles published on my website.
|
||||
|
@ -7,11 +7,6 @@ metadata:
|
|||
date: 2023-01-04
|
||||
---
|
||||
|
||||
<div class="content-container">
|
||||
<section class="content-section">
|
||||
<h1>Articles</h1>
|
||||
</section>
|
||||
|
||||
<section class="content-section">
|
||||
<h2>My Articles</h2>
|
||||
<p>Articles I have written.</p>
|
||||
|
@ -45,4 +40,3 @@ date: 2023-01-04
|
|||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue