mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 10:36:39 -07:00
required data
prefix to extra data in templates now
resolves #12 and #13
This commit is contained in:
parent
281a181958
commit
83c5f6038f
4 changed files with 19 additions and 20 deletions
|
@ -1,23 +1,23 @@
|
|||
{% extends "base.tera" %}
|
||||
{% block content %}
|
||||
<div class="blog-post">
|
||||
<h1 class="title">{{title}}</h1>
|
||||
<span class="timestamp">published {{timestamp}}</span>
|
||||
{% if draft %}
|
||||
<h1 class="title">{{data.title}}</h1>
|
||||
<span class="timestamp">published {{data.timestamp}}</span>
|
||||
{% if data.draft %}
|
||||
<h2>DRAFT</h2>
|
||||
{% endif %}
|
||||
<div class="header-image-wrapper">
|
||||
<p class="short-desc">{{desc}}</p>
|
||||
<img class="header-image" src="{{cdn_file}}" alt="{{header_image_alt}}"
|
||||
<p class="short-desc">{{data.desc}}</p>
|
||||
<img class="header-image" src="{{data.cdn_file}}" alt="{{data.header_image_alt}}"
|
||||
style="object-fit: cover; object-position: 50% 50%">
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ content | safe }}
|
||||
{{ data.content | safe }}
|
||||
</div>
|
||||
<hr />
|
||||
<h3 class="tags-title">tags</h3>
|
||||
<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 %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue