init - PoC
This commit is contained in:
commit
3484b45045
146 changed files with 10657 additions and 0 deletions
0
theme/tavern/templates/content.tmpl
Normal file
0
theme/tavern/templates/content.tmpl
Normal file
20
theme/tavern/templates/feeds.tmpl
Normal file
20
theme/tavern/templates/feeds.tmpl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'meta.tmpl' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'header.tmpl' %}
|
||||
|
||||
<main>
|
||||
<h2>Feeds</h2>
|
||||
<ul>
|
||||
{% for feed in feeds %}
|
||||
<li><a href="/feed/{{ feed.name }}/">{{ feed.name }}</a> ({{ feed.count }} posts)</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</main>
|
||||
|
||||
{% include 'footer.tmpl' %}
|
||||
</body>
|
||||
</html>
|
||||
3
theme/tavern/templates/footer.tmpl
Normal file
3
theme/tavern/templates/footer.tmpl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<footer>
|
||||
<p>Generated with <a href="https://git.uphillsecurity.com/cf7/picopaper">picopaper</a></p>
|
||||
</footer>
|
||||
18
theme/tavern/templates/header.tmpl
Normal file
18
theme/tavern/templates/header.tmpl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<header>
|
||||
<h1>
|
||||
<a href="/" style="color: #333; text-decoration: none;">
|
||||
{% if not hide_logo %}
|
||||
<img src="{{ logo_path }}" alt="{{ blog_title }}" class="header-logo">
|
||||
{% endif %}
|
||||
{% if not hide_title %}
|
||||
{{ blog_title }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</h1>
|
||||
<p class="blog-description">{{ blog_description }}</p>
|
||||
<nav class="main-nav">
|
||||
{% for item in navbar_items %}
|
||||
<a href="{{ item.url }}" class="nav-item">{{ item.text }}</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</header>
|
||||
29
theme/tavern/templates/index.tmpl
Normal file
29
theme/tavern/templates/index.tmpl
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'meta.tmpl' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'header.tmpl' %}
|
||||
|
||||
<main class="post-grid">
|
||||
{% for post in posts %}
|
||||
<article class="post-tile">
|
||||
<a href="{{ post.url }}" class="tile-link">
|
||||
<div class="tile-content">
|
||||
<div class="post-meta">{{ post.date }}</div>
|
||||
<h2 class="post-title">{{ post.title }}</h2>
|
||||
{% if post.type == 'short' and post.content %}
|
||||
<div class="post-excerpt">
|
||||
{{ post.content | safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</main>
|
||||
|
||||
{% include 'footer.tmpl' %}
|
||||
</body>
|
||||
</html>
|
||||
6
theme/tavern/templates/meta.tmpl
Normal file
6
theme/tavern/templates/meta.tmpl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ blog_description }}">
|
||||
<title>{{ title }}</title>
|
||||
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico">
|
||||
<link rel="stylesheet" href="/assets/style.css">
|
||||
23
theme/tavern/templates/post.tmpl
Normal file
23
theme/tavern/templates/post.tmpl
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'meta.tmpl' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'header.tmpl' %}
|
||||
|
||||
<main>
|
||||
<article class="post">
|
||||
<div class="post-meta">{{ post.date }}</div>
|
||||
<h2>{{ post.title }}</h2>
|
||||
<div class="post-content">
|
||||
{{ post.content | safe }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
{% include 'random_posts.tmpl' %}
|
||||
</main>
|
||||
|
||||
{% include 'footer.tmpl' %}
|
||||
</body>
|
||||
</html>
|
||||
23
theme/tavern/templates/random_posts.tmpl
Normal file
23
theme/tavern/templates/random_posts.tmpl
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{% if all_posts %}
|
||||
{# Filter out pages and current post, then randomly select 5 #}
|
||||
{% set available_posts = all_posts | selectattr('type', 'ne', 'page') | list %}
|
||||
{% if post %}
|
||||
{% set available_posts = available_posts | rejectattr('slug', 'equalto', post.slug) | list %}
|
||||
{% endif %}
|
||||
{% if available_posts %}
|
||||
{% set random_posts = available_posts | random_sample(5) %}
|
||||
{% if random_posts %}
|
||||
<div class="random-posts">
|
||||
<h3>More Posts</h3>
|
||||
<ul>
|
||||
{% for p in random_posts %}
|
||||
<li>
|
||||
<a href="{{ p.url }}">{{ p.title }}</a>
|
||||
<span class="date">{{ p.date }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue