Files
xrpl-dev-portal/template/pagetype-label.html.jinja
2021-09-14 16:09:42 -07:00

50 lines
1.6 KiB
Django/Jinja

{% extends "base.html.jinja" %}
{% block mainclasses %}landing landing-children padded-main{% endblock %}
{% block main %}
<section class="content">
{% if content %}
{{ content}}
{% else %}
<h1 id="main-page-header">Label: {{ currentpage.name }}</h1>
{% if currentpage.blurb %}<p class="blurb">{{currentpage.blurb}}</p>{% endif %}
{% endif %}
{% for cat in ["concepts.html", "tutorials.html", "references.html"] %}
{% set catpg = pages|selectattr("html", "eq", cat)|first %}
{% set cat_lbl_pgs = children_with_label(pages, catpg, currentpage.landing_for) %}
{% if cat_lbl_pgs %}
<div class="curated-links">
<h3>{{catpg.name}}</h3>
<ul>
{% for page in cat_lbl_pgs %}
<li class="level-1">
<span class="pg-category">{{(pages|selectattr("html", "eq", page.parent)|first).name}}</span>
<a href="{% if "//" not in page.html %}{{currentpage.prefix}}{% endif %}{{page.html}}">{{page.name}}</a>
<p class="blurb child-blurb">{{page.blurb}}</p>
</li>
{% endfor %}
<ul>
</div>
{% endif %}
{% endfor %}
</section>
{% endblock %}
{% block endbody %}
{% include 'component-feedback-widget.html.jinja' %}
{% endblock %}
{% block analytics %}
<script type="application/javascript">
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
"event": "page_info",
"page_type": "Hub Page",
"page_group": "Docs",
"page_labels": ["{{currentpage.landing_for}}"]
})
</script>
{% endblock analytics %}