diff --git a/metadata/templates/entry.tpl b/metadata/templates/entry.tpl --- a/metadata/templates/entry.tpl +++ b/metadata/templates/entry.tpl @@ -1,220 +1,220 @@ +{% set ROOT_PATH = '../' %} {% extends "base.tpl" %} -{% set ROOT_PATH = '../' %} {# Print first letter bigger if uppercase #} {% macro first_bigger(text) %} {# jinja way to check if a letter is uppercase #} {% if text[0]|upper == text[0] %} {{ text[0] }}{{ text[1:] }} {% else %} {{ text }} {% endif %} {% endmacro %} {% block title %} {{ entry.title }} - Archive of Formal Proofs {% endblock %} {% block extrahead %} {% include 'mathjax.tpl' %} {% endblock %} {% block headline %} {% for s in entry.title|split %} {{ first_bigger(s) }} {% endfor %} {% endblock %} {% block content %} {# Authors #} {%- macro print_author(author) %} {%- if author.address|startswith("mailto:") %} {{author.name}} ({{author.address[7:]}}) {%- elif author.address|startswith("http") %} {{author.name}} {%- else %} {{author.name}} {%- endif %} {%- endmacro %} {# Contributors #} {#TODO: merge author and contributor printing #} {%- macro print_contributor(contri) %} {%- if not contri[1] %} {{contri[0]}} {%- elif contri[1]|startswith("mailto:") %} {{contri[0]}} ({{contri[1][7:]}}) {%- else %} {{contri[0]}} {%- endif %} {%- endmacro %} {% if entry.contributors %} {% endif %} {# Extra datafields #} {% for key, value in entry.extra.items() %} {% endfor %} {# BibTeX #} {% macro print_dep(entries, title) %} {% set comma = joiner(", ") %} {% if entries|sort(attribute='title') %} {% endif %} {% endmacro %} {{ print_dep(entry.imports, "Depends on") }} {{ print_dep(entry.used, "Used by") }} {#TODO: or check for None? #} {% if is_devel %} {% endif %}
Title: {{ entry.title }}
{% if entry.authors|length == 1 %} Author: {% else %} Authors: {% endif %} {% if entry.authors|length == 1 %} {{ print_author(entry.authors[0]) }} {% else %} {% for author in entry.authors[:-2] %} {{ print_author(author) }}, {% endfor %} {{ print_author(entry.authors[-2]) }} and {{ print_author(entry.authors[-1]) }} {% endif %}
{% if entry.contributors|length == 1 %} Contributor: {% else %} Contributors: {% endif %} {% if entry.contributors|length == 1 %} {{ print_contributor(entry.contributors[0]) }} {% else %} {% for contri in entry.contributors[:-2] %} {{ print_contributor(contri) }}, {% endfor %} {{ print_contributor(entry.contributors[-2]) }} and {{ print_contributor(entry.contributors[-1])}} {% endif %}
Submission date: {{ entry.publish_date|datetimeformat }}
Abstract:
{{ entry.abstract }}
{{ value[0] }}: {{ value[1] }}
BibTeX: {# Hack to display { directly before {{ jinja command #} {# TODO: Add base url functionality #}
@article{{ "{" }}{{ entry.name }}-AFP,
   author  = {{ "{" }}{%- for a in entry.authors[:-1] %}{{ a.name }} and {% endfor %}{{ entry.authors[-1].name}}},
   title   = {{ "{" }}{{ entry.title}}},
   journal = {Archive of Formal Proofs},
   month   = {{ entry.publish_date.month|short_month }},
   year    = {{ entry.publish_date.year }},
   note    = {\url{http://isa-afp.org/entries/{{ entry.name }}.html},
             Formal proof development},
   ISSN    = {2150-914x},
 }
License: {{ entry.license[0] }}
{{title}}: {%- for article in entries|sort(attribute='name') %} {{- comma() }}{{ article.name }} {%- endfor %}
Status: [{{ entry.status }}] This is a development version of this entry. It might change over time and is not stable. Please refer to release versions for citations.

{% if not is_devel %} {% endif %} {% endblock %} {% block footer %} {% endblock %}