forked from progenetix/progenetix-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.html
39 lines (36 loc) · 1.17 KB
/
post.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% extends "base.html" %}
{% block content %}
<h1>{{ page.title }}</h1>
<p>
<b>{{ page.meta.description }}</b>
</p>
{{ page.content }}
{% if page.meta.pdf_file_name or page.meta.links %}
<h4>Links</h4>
<ul>
{% if page.meta.pdf_file_name %}
{% set pdfLab = "PDF" %}
{% if ".pdf" in page.meta.pdf_file_name %}
<li>Download {{ pdfLab }} <a href="/pdf/{{page.meta.pdf_file_name}}"><span class="twemoji">{% include ".icons/fontawesome/regular/file-pdf.svg" %}</span></a></li>
{% endif %}
{% endif %}
{% if page.meta.links %}
{% if page.meta.links|length > 0 %}
{% for link in page.meta.links %}
{% if link.startswith('<a') %}
<li>{{ link }}</li>
{% elif link.startswith('[') %}
{% set label = link.split('](', 1)[0] | replace('[', '') %}
{% set target = link.split('](', 1)[1] | replace(')', '') %}
<li><a href="{{ target }}">[{{label}}]</a></li>
{% else %}
<li><a href="{{ link }}">[LINK]</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
</ul>
{% set post_page = page %}
{% include "partials/date_separator.html" %}
{% endblock %}