web2019/templates/publications.html

55 lines
2.6 KiB
HTML

{% extends 'page.html' %}
{% block main %}
<main class="container {% block maincss %}{% endblock %}">
<div class="row">
{% block main_content %}
{% if page and page.content %}
{{ page.content | safe }}
{% endif %}
<div class="container">
<div class="row row-cols-1 row-cols-md-3 g-4">
{% set publications = load_data(path=page.extra.data, format="yaml") -%}
{% for publication in publications %}
<div class="col">
<div class="card shadow h-100" >
<div class="card-body">
<strong class="card-title">{{ publication.title | safe }}</strong>
{% if publication.authors.short or publication.authors.full %}
<p class="card-text">
{{ publication.authors.short | safe }}
<span class="collapse" id="viewdetails{{ publication.title | slugify | truncate(length=20, end="")}}">
{{ publication.authors.full }}
</span>
<a data-bs-toggle="collapse" class="hide-expanded" data-bs-target="#viewdetails{{ publication.title | slugify | truncate(length=20, end="") }}"> ...more</a>
<a data-bs-toggle="collapse" class="show-expanded" data-bs-target="#viewdetails{{ publication.title | slugify | truncate(length=20, end="") }}"><br>less</a>
</p>
{% else %}
<p class="card-text">{{ publication.authors }}</p>
{% endif %}
</div>
<div class="card-footer border-light-subtle">
{% for link in publication.links %}
{% if link.path %}
<a href="{{link.path}}" class="card-link">{{link.name}}</a>
{% else %}
<div class="card-link d-inline">{{link.name}}</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}
</div>
</main>
{% block outside %}{% endblock %}
{% endblock %}