comlib/templates/bib.html

21 lines
1,000 B
HTML
Raw Normal View History

{% extends "layout.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
{% if this.body %}
<h2 class="page-title">{{ this.title }}</h2>
{{ this.body }}
{% else %}
<h2>{{ this.title }}</h2>
{% endif %}
<ul class="list-none">
{% for post in this.children %}
<li class="bib">
<span class="bib-title">{{ post.title }}</span>
<span class="bib-orig">{% if post.orig %}{% for item in post.orig %}({% set urls = item.split(", ") %}<a href="{{ urls[0] }}">{{ urls[0].split('https://')[1].split('/')[0] }}</a>{% if urls[1] %}, <a href="/lib/cache{{ post.parent.path }}/{{ urls[1] }}">cached</a>{% endif %}) {% endfor %}{% endif %}</span><br>
{% if post.author %}<span class="bib-author">by {{ post.author }}</span><br>{% endif %}
{% if post.publisher %}<span class="bib-publisher">{{ post.publisher}}, </span>{% endif %}<span class="bib-pubdate">{{ post.pub_date }}</span>
</li>
{% endfor %}
</ul>
{% endblock %}