websegura/pages/web.njk
2021-03-20 14:40:18 +01:00

41 lines
1.0 KiB
Plaintext

---
layout: base
pagination:
data: results
size: 1
alias: r
permalink: "w/{{ r }}/"
---
{% set result = results[r] %}
{% set history = results.history[r] %}
{% set url = r | replace("!", ".") %}
{% from "details.njk" import details %}
<!--
TODO iterate over all.json instead of using provincias/comunidades/global
that only contain a reduced set of fields (e.g. twitter_mentions is not included),
limiting the info that can be shown in the details page.
-->
{% for name, provincia in provincias %}
{% for web in provincia.webs %}
{% if web.url == url %}
{{ details(web, result, history, page.url, "p", name, provincia) }}
{% endif %}
{% endfor %}
{% endfor %}
{% for name, comunidad in comunidades %}
{% for web in comunidad.webs %}
{% if web.url == url %}
{{ details(web, result, history, page.url, "c", name, comunidad) }}
{% endif %}
{% endfor %}
{% endfor %}
{% for web in general.webs %}
{% if web.url == url %}
{{ details(web, result, history, page.url) }}
{% endif %}
{% endfor %}