update templates for webdog

This commit is contained in:
zyl 2024-11-13 08:38:33 -08:00
parent f1d3d44ebf
commit bb8c8a725f
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
5 changed files with 31 additions and 31 deletions

View file

@ -1,9 +1,9 @@
{% extends "base.tera" %} {% extends "base.tera" %}
{% block content %} {% block content %}
<h1>{{ title }}</h1> <h1>{{ data.title }}</h1>
<div class="link-list"> <div class="link-list">
<ul> <ul>
{% for link in links %} {% for link in data.links %}
<li><a href="{{link.link}}">{{link.title}}</a></li> <li><a href="{{link.link}}">{{link.title}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -1,22 +1,22 @@
{% extends "base.tera" %} {% extends "base.tera" %}
{% block content %} {% block content %}
{% if tag %} {% if data.tag %}
<h1>blog posts tagged {{tag}}</h1> <h1>blog posts tagged {{ data.tag }}</h1>
<p><a href="/blog/">View all blog posts</a></p> <p><a href="/blog/">View all blog posts</a></p>
{% else %} {% else %}
<h1>blog Posts</h1> <h1>blog Posts</h1>
<p><a href="tags">view blog tags</a></p> <p><a href="tags">view blog tags</a></p>
<p><a href="rss.xml">rss feed</a></p> <p><a href="rss.xml">rss feed</a></p>
{% endif %} {% endif %}
<h1>Page {{page}}/{{page_max}}</h1> <h1>Page {{ data.page }}/{{ data.page_max }}</h1>
{% if previous %} {% if data.previous %}
<a href="./{{previous}}">previous page</a> <a href="./{{data.previous}}">previous page</a>
{% endif %} {% endif %}
{% if next %} {% if data.next %}
<a href="./{{next}}">next page</a> <a href="./{{data.next}}">next page</a>
{% endif %} {% endif %}
<div class="blog-post-list"> <div class="blog-post-list">
{% for resource in resources %} {% for resource in data.resources %}
<div class="post"> <div class="post">
<p class="title"><a href="/blog/{{resource.id}}">{{resource.title}}</a></p> <p class="title"><a href="/blog/{{resource.id}}">{{resource.title}}</a></p>
<p class="timestamp">{{resource.timestamp}}</p> <p class="timestamp">{{resource.timestamp}}</p>

View file

@ -1,23 +1,23 @@
{% extends "base.tera" %} {% extends "base.tera" %}
{% block content %} {% block content %}
<div class="blog-post"> <div class="blog-post">
<h1 class="title">{{title}}</h1> <h1 class="title">{{ data.title }}</h1>
<span class="timestamp">published {{timestamp}}</span> <span class="timestamp">published {{ data.timestamp }}</span>
{% if draft %} {% if data.draft %}
<h2>DRAFT</h2> <h2>DRAFT</h2>
{% endif %} {% endif %}
<div class="header-image-wrapper"> <div class="header-image-wrapper">
<p class="short-desc">{{desc}}</p> <p class="short-desc">{{ data.desc }}</p>
<img class="header-image" src="{{cdn_file}}" alt="{{header_image_alt}}" <img class="header-image" src="{{data.cdn_file}}" alt="{{data.header_image_alt}}"
style="object-fit: cover; object-position: 50% 50%"> style="object-fit: cover; object-position: 50% 50%">
</div> </div>
<div class="content"> <div class="content">
{{ content | safe }} {{ data.content | safe }}
</div> </div>
<hr /> <hr />
<h3 class="tags-title">tags</h3> <h3 class="tags-title">tags</h3>
<div class="post-tags"> <div class="post-tags">
{% for tag in tags %} {% for tag in data.tags %}
<a class="tag" href="/blog/tag/{{tag}}">{{tag}}</a>{% if not loop.last %},{% endif %} <a class="tag" href="/blog/tag/{{tag}}">{{tag}}</a>{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
</div> </div>

View file

@ -1,22 +1,22 @@
{% extends "base.tera" %} {% extends "base.tera" %}
{% block content %} {% block content %}
{% if tag %} {% if data.tag %}
<h1>images tagged {{tag}}</h1> <h1>images tagged {{ data.tag }}</h1>
<p><a href="/images/">view all images</a></p> <p><a href="/images/">view all images</a></p>
{% else %} {% else %}
<h1>images</h1> <h1>images</h1>
<p><a href="/i/tags">view image tags</a></p> <p><a href="/i/tags">view image tags</a></p>
<p><a href="rss.xml">rss feed</a></p> <p><a href="rss.xml">rss feed</a></p>
{% endif %} {% endif %}
<h3>page {{page}}/{{page_max}}</h3> <h3>page {{ data.page }}/{{ data.page_max }}</h3>
{% if previous %} {% if data.previous %}
<a href="./{{previous}}">previous page</a> <a href="./{{data.previous}}">previous page</a>
{% endif %} {% endif %}
{% if next %} {% if data.next %}
<a href="./{{next}}">next page</a> <a href="./{{data.next}}">next page</a>
{% endif %} {% endif %}
<div class="images-list"> <div class="images-list">
{% for resource in resources %} {% for resource in data.resources %}
<a class="image" href="/i/{{resource.id}}"> <a class="image" href="/i/{{resource.id}}">
<img class="image-actual" src="{{resource.cdn_file}}" alt="{{resource.alt}}"> <img class="image-actual" src="{{resource.cdn_file}}" alt="{{resource.alt}}">
<span class="title">{{resource.title}}</span> <span class="title">{{resource.title}}</span>

View file

@ -1,14 +1,14 @@
{% extends "base.tera" %} {% extends "base.tera" %}
{% block content %} {% block content %}
<div class="image-full"> <div class="image-full">
<h1 class="title">{{title}}</h1> <h1 class="title">{{ data.title }}</h1>
<span class="timestamp">published {{timestamp}}</span> <span class="timestamp">published {{ data.timestamp }}</span>
<img class="image-actual" src="{{cdn_file}}" alt="{{alt}}"> <img class="image-actual" src="{{data.cdn_file}}" alt="{{data.alt}}">
{{ content | safe }} {{ data.content | safe }}
<p><a href="{{cdn_file}}">view full size image</a></p> <p><a href="{{data.cdn_file}}">view full size image</a></p>
<h3 class="tags-title">tags</h3> <h3 class="tags-title">tags</h3>
<div class="image-tags"> <div class="image-tags">
{% for tag in tags %} {% for tag in data.tags %}
<a class="tag" href="/i/tag/{{tag}}/">{{tag}}</a>{% if not loop.last %},{% endif %} <a class="tag" href="/i/tag/{{tag}}/">{{tag}}</a>{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
</div> </div>