personal-website/plugins/publication_list/templates/jinja/publication.tmpl

67 lines
1.5 KiB
Cheetah
Raw Normal View History

2021-03-18 22:08:18 +00:00
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
<%!
import os, mako
%>
{% macro include_if_exists(name) %}
<%
try:
tmpl = self.get_template(name)
except mako.exceptions.TemplateLookupException as e:
pass
else:
tmpl.render_context(context)
%>
{% endmacro %}
{% block extra_head %}
<style>
.publication-abstract {
text-align: justify;
hyphens: auto;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens:auto;
}
</style>
{% endblock %}
{% block content %}
<header class="page-header">
<h1>{{ title | h }}</h1>
</header>
<div class="reference">
2021-03-18 22:08:18 +00:00
{% if abstract %}
<h2>Abstract</h2>
<div class="publication-abstract">
<p>{{ abstract | h }}</p>
</div>
{% endif %}
<p>
{{ reference }}
{% if extra_links %}
<br/>{{ extra_links }}
{% endif %}
</p>
</div>
2021-03-18 22:08:18 +00:00
{{ include_if_exists("publicationlist_{ }_after_abstract.html".format(label))}}
{% if pdf %}
<h2>Full Text</h2>
<div>
<object data="{{ pdf }}" type="application/pdf" width="100%" style="height:90vh">
<p>Your browser does not support viewing the PDF file inline. Please click the link below to download the file.</p>
</object>
<p>[<a href="{{ pdf }}" download="{{ label }}.pdf">download</a>]</p>
</div>
{% endif %}
{{ include_if_exists("publicationlist_{ }_after_fulltext.html".format(label))}}
{% endblock %}