adding key image support
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "macros.html" as macros %}
|
||||
{% block title %}{{ article.title|capitalize }} - {{SITENAME}}{% endblock title %}
|
||||
{% block key_image %}{{ macros.key_image(article) }}{% endblock key_image %}
|
||||
{% block content %}
|
||||
|
||||
<section id="content">
|
||||
<div class='box curled'>
|
||||
<h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
<hr>
|
||||
<div class='byline'>
|
||||
<span class='date'>{{ article.locale_date }}</span> {% if article.tags %}{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}{% endif %}
|
||||
@@ -18,5 +17,5 @@
|
||||
<hr>
|
||||
{% include "bottom-nav.html" %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
</section>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<meta charset="utf-8" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
|
||||
<link href="{{ SITEURL }}/theme/deadsands/css/style.css" rel="stylesheet" />
|
||||
{% if FAVICON %}
|
||||
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" type="image/x-icon" />
|
||||
{% endif %}
|
||||
{% if FAVICON %}
|
||||
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" type="image/x-icon" />
|
||||
{% endif %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
{% endblock head %}
|
||||
</head>
|
||||
@@ -18,7 +18,6 @@
|
||||
<div class="header">
|
||||
<div class='sun'></div>
|
||||
<div class='title'><h1><a href="/">{{ SITENAME }}</a></h1></div>
|
||||
|
||||
<ul class="nav">
|
||||
{% for category, articles in categories %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.name }}">{{ category }}</a></li>
|
||||
@@ -31,7 +30,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='background'>
|
||||
<div class="container">{% block content %}{% endblock %}</div>
|
||||
<div class="container">
|
||||
{% block key_image %}{% endblock %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<footer id="contentinfo" class="footer">
|
||||
<nav class="pull-right bottom-nav">
|
||||
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">RSS</a>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{% macro key_image(ref) %}
|
||||
{% if ref.key_image %}
|
||||
<a class='key_image' href="{{ ref.key_image.src }}">
|
||||
<img src="{{ ref.key_image.src|replace('.','_thumb.') }}" alt="{{ ref.key_image.alt}}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -1,26 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title }} - {{SITENAME}}{%endblock%}
|
||||
{% import "macros.html" as macros %}
|
||||
{% block title %}{{ page.title }} - {{SITENAME}}{% endblock title %}
|
||||
{% block key_image %}{{ macros.key_image(page) }}{% endblock key_image %}
|
||||
{% block content %}
|
||||
<div class='box curled'>
|
||||
<h2>{{ page.title }}</h2>
|
||||
<hr>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(page) }}
|
||||
{{ page.content }}
|
||||
<hr>
|
||||
{% if page.metadata['show_recent'] %}
|
||||
<div class='column'>
|
||||
<div class='signs'>
|
||||
<h3>Recent Sessions</h3>
|
||||
{% with count=10, key='category', values=['sessions', 'test'] %}{% include "signs.html" %}{% endwith %}
|
||||
<section id="content">
|
||||
<div class='box curled'>
|
||||
<h2>{{ page.title }}</h2>
|
||||
<hr>
|
||||
{{ page.content }}
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
<div class='column'>
|
||||
<h3>Recent Lore</h3>
|
||||
<div class='signs'>
|
||||
{% with count=10, key='category', values=['lore', 'dm'] %}{% include "signs.html" %}{% endwith %}
|
||||
|
||||
{% if page.show_recent %}
|
||||
<div class='column'>
|
||||
<div class='signs'>
|
||||
<h3>Recent Sessions</h3>
|
||||
{% with count=10, key='category', values=['sessions', 'test'] %}{% include "signs.html" %}{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
<div class='column'>
|
||||
<h3>Recent Lore</h3>
|
||||
<div class='signs'>
|
||||
{% with count=10, key='category', values=['lore', 'dm'] %}{% include "signs.html" %}{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</section>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class='box curled'>
|
||||
<h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
|
||||
<hr>
|
||||
<div class='byline'>
|
||||
<span class='date'>{{ article.locale_date }}</span> {% if article.tags %}{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}{% endif %}
|
||||
</div>
|
||||
{% if article.description %}
|
||||
<div class='scrap'><div class='note'>{{ article.description }}</div></div>
|
||||
{% endif %}
|
||||
{{ article.content }}
|
||||
<hr>
|
||||
{% include "bottom-nav.html" %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user