1
0
Fork 0
mirror of https://github.com/Findus23/se-simulator.git synced 2024-09-19 15:53:45 +02:00
se-simulator/templates/macros.html

54 lines
2.8 KiB
HTML
Raw Normal View History

{% macro printpage(i,active, site) %}
2018-03-23 21:28:37 +01:00
{# <a href="/projekte/{{ i }}/" class="{{ "active" if i == active else "other" }}">{{ i }}</a>#}
<a href="{{url_for("index", page=i, site=site)}}" class="{{ "active" if i == active|string() else "other" }}">{{ i }}</a>
2018-03-23 21:28:37 +01:00
{% endmacro %}
{% macro pagination(pagearray, num_pages, page, site, top) %}
2018-03-23 21:28:37 +01:00
<!-- License of svg icons - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) -->
<div class="pagination {{ "top" if top else "bottom" }}">
{% if page > 1 %}
<a rel="prev" href="{{ url_for("index", page=page-1, site=site) }}">
2018-03-23 21:28:37 +01:00
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path d="M1203 544q0 13-10 23l-393 393 393 393q10 10 10 23t-10 23l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23z"></path>
</svg>
</a>
{% else %}
<a rel="prev" class="disabled">
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path d="M1203 544q0 13-10 23l-393 393 393 393q10 10 10 23t-10 23l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23z"></path>
</svg>
</a>
{% endif %}
{% for i in pagearray %}
{% if i == "d" %}
2018-04-02 22:50:03 +02:00
<a class="disabled other dots">&hellip;</a>
2018-03-23 21:28:37 +01:00
{% else %}
{{ printpage(i, page, site) }}
2018-03-23 21:28:37 +01:00
{% endif %}
{% endfor %}
{% if page < num_pages %}
<a rel="next" href="{{ url_for("index",page=page+1, site=site) }}">
2018-03-23 21:28:37 +01:00
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path d="M1171 960q0 13-10 23l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23z"></path>
</svg>
</a>
{% else %}
<a rel="next" class="disabled">
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path d="M1171 960q0 13-10 23l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23z"></path>
</svg>
</a>
{% endif %}
</div>
{%- endmacro %}
{% macro siteheader(site) %}
<header class="siteheader"
style="background-color: {{ site.tag_background_color if site.tag_background_color!="#FFF" }};
color: {{ site.link_color }}">
<img src="{{ site.icon_url }}" width="30" height="30">
<span>{{ site.name }}</span>
<a class="gotolink" href="https://{{ site.url }}" target="_blank" rel="noopener">Go to site</a>
</header>
{% endmacro %}