mirror of
https://github.com/Findus23/se-simulator.git
synced 2024-09-19 15:53:45 +02:00
add robots.txt and fix pagination with filter
This commit is contained in:
parent
a6df3fe24f
commit
9a624297a8
3 changed files with 10 additions and 8 deletions
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<a href="{{ url_for("index") }}">Clear filter</a>
|
<a href="{{ url_for("index") }}">Clear filter</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ pagination(pagearray, num_pages, page, True) }}
|
{{ pagination(pagearray, num_pages, page, site.url if not site.fallback else None, True) }}
|
||||||
{% for question in questions %}
|
{% for question in questions %}
|
||||||
{% set vote=voted[("question", question.id)] %}
|
{% set vote=voted[("question", question.id)] %}
|
||||||
<div class="content question"
|
<div class="content question"
|
||||||
|
@ -34,5 +34,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ pagination(pagearray, num_pages, page, False) }}
|
{{ pagination(pagearray, num_pages, page, site.url if not site.fallback else None, False) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{% macro printpage(i,active) %}
|
{% macro printpage(i,active, site) %}
|
||||||
{# <a href="/projekte/{{ i }}/" class="{{ "active" if i == active else "other" }}">{{ i }}</a>#}
|
{# <a href="/projekte/{{ i }}/" class="{{ "active" if i == active else "other" }}">{{ i }}</a>#}
|
||||||
<a href="{{url_for("index",page=i)}}" class="{{ "active" if i == active|string() else "other" }}">{{ i }}</a>
|
<a href="{{url_for("index", page=i, site=site)}}" class="{{ "active" if i == active|string() else "other" }}">{{ i }}</a>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro pagination(pagearray, num_pages, page,top) %}
|
{% macro pagination(pagearray, num_pages, page, site, top) %}
|
||||||
<!-- License of svg icons - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) -->
|
<!-- License of svg icons - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) -->
|
||||||
<div class="pagination {{ "top" if top else "bottom" }}">
|
<div class="pagination {{ "top" if top else "bottom" }}">
|
||||||
{% if page > 1 %}
|
{% if page > 1 %}
|
||||||
<a rel="prev" href="{{ url_for("index",page=page-1) }}">
|
<a rel="prev" href="{{ url_for("index", page=page-1, site=site) }}">
|
||||||
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
<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>
|
<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>
|
</svg>
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
{% if i == "d" %}
|
{% if i == "d" %}
|
||||||
<a class="disabled other">…</a>
|
<a class="disabled other">…</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ printpage(i, page) }}
|
{{ printpage(i, page, site) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if page < num_pages %}
|
{% if page < num_pages %}
|
||||||
<a rel="next" href="{{ url_for("index",page=page+1) }}">
|
<a rel="next" href="{{ url_for("index",page=page+1, site=site) }}">
|
||||||
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
<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>
|
<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>
|
</svg>
|
||||||
|
|
2
web/robots.txt
Normal file
2
web/robots.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
Loading…
Reference in a new issue