scaffold unprompted site: eleventy, templates, gitea CI
Some checks failed
Deploy to S3 / deploy (push) Failing after 1m26s
Some checks failed
Deploy to S3 / deploy (push) Failing after 1m26s
This commit is contained in:
29
_includes/base.njk
Normal file
29
_includes/base.njk
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% if title %}{{ title }} — un:prompted{% else %}un:prompted{% endif %}</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<a href="/" class="site-title">un:prompted</a>
|
||||
</header>
|
||||
|
||||
<div class="site-layout">
|
||||
<main class="content">
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
|
||||
{% include "sidebar.njk" %}
|
||||
</div>
|
||||
|
||||
<footer class="site-footer">
|
||||
<nav class="footer-nav">
|
||||
<a href="/about/">about</a>
|
||||
<a href="/code/">code</a>
|
||||
</nav>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
37
_includes/column.njk
Normal file
37
_includes/column.njk
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ title }} — un:prompted</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<a href="/" class="site-title">un:prompted</a>
|
||||
</header>
|
||||
|
||||
<div class="site-layout">
|
||||
<main class="content">
|
||||
<article class="column-entry">
|
||||
<header class="column-header">
|
||||
<h1>{{ title }}</h1>
|
||||
<time datetime="{{ date | isoDate }}">{{ date | readableDate }}</time>
|
||||
</header>
|
||||
<div class="column-body">
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{% include "sidebar.njk" %}
|
||||
</div>
|
||||
|
||||
<footer class="site-footer">
|
||||
<nav class="footer-nav">
|
||||
<a href="/about/">about</a>
|
||||
<a href="/code/">code</a>
|
||||
</nav>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
21
_includes/sidebar.njk
Normal file
21
_includes/sidebar.njk
Normal file
@@ -0,0 +1,21 @@
|
||||
<aside class="sidebar">
|
||||
<nav class="sidebar-nav">
|
||||
<h2>archive</h2>
|
||||
{%- set currentYear = null -%}
|
||||
{%- for column in collections.columns %}
|
||||
{%- set colYear = column.date | year -%}
|
||||
{%- if colYear != currentYear %}
|
||||
{%- if currentYear != null %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
{%- set currentYear = colYear %}
|
||||
<h3 class="year-label">{{ colYear }}</h3>
|
||||
<ul>
|
||||
{%- endif %}
|
||||
<li><a href="{{ column.url }}">{{ column.data.title }}</a></li>
|
||||
{%- endfor %}
|
||||
{%- if currentYear != null %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
</nav>
|
||||
</aside>
|
||||
Reference in New Issue
Block a user