Sha256: 51ce2467910da8c15e501e939997b276c4fa0ae7caea06d42d7b8234327c97c9

Contents?: true

Size: 1.48 KB

Versions: 21

Compression:

Stored size: 1.48 KB

Contents

{%- assign actual_related = nil %}
{%- for section in page.related_pages %}
{%- unless section[1].size == 0 %}
{%- assign actual_related = 1 %}
{%- endunless %}
{%- endfor %}
{%- if actual_related != nil %}
<!-- Read next -->
<h2>Related pages</h2>

<div class="row row-cols-1 row-cols-md-2 g-4 mt-2">
    {%- if page.related_pages %}
    <!-- Related pages -->
    {%- for section in page.related_pages %}
    {%- unless section[1].size == 0 %}
    <div class="col">
        <div class="card h-100 info-card">
            <div class="card-header fw-bold">{{ section[0] | replace: "_", " " | capitalize }}</div>
            <div class="card-body">
                <ul class="list-unstyled">
                    {%- for page_id in section[1] %}
                    {%- assign section_pages = site.pages | where:"type", section[0] %}
                    {%- assign metadata = section_pages | where:"page_id", page_id %}
                    {%- for page_hit in metadata %}
                    <li class="d-grid">
                        <a class="btn bg-white hover-primary text-start" href="{{ page_hit.url | relative_url }}"><span>{{page_hit.title}}{% if page_hit.description %}</span><br><small class="text-muted">{{ page_hit.description | capitalize }}</small>{% endif %}</a>
                    </li>
                    {%- endfor %}
                    {%- endfor %}
                </ul>
            </div>
        </div>
    </div>
    {%- endunless %}
    {%- endfor %}
    {%- endif %}
</div>
{%- endif %}

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
elixir-toolkit-theme-1.18.0 _includes/related-pages.html
elixir-toolkit-theme-1.17.0 _includes/related-pages.html
elixir-toolkit-theme-1.16.0 _includes/related-pages.html
elixir-toolkit-theme-1.15.2 _includes/related-pages.html
elixir-toolkit-theme-1.15.1 _includes/related-pages.html
elixir-toolkit-theme-1.15.0 _includes/related-pages.html
elixir-toolkit-theme-1.14.0 _includes/related-pages.html
elixir-toolkit-theme-1.13.0 _includes/related-pages.html
elixir-toolkit-theme-1.12.0 _includes/related-pages.html
elixir-toolkit-theme-1.11.0 _includes/related-pages.html
elixir-toolkit-theme-1.9.0 _includes/related-pages.html
elixir-toolkit-theme-1.8.0 _includes/related-pages.html
elixir-toolkit-theme-1.7.2 _includes/related-pages.html
elixir-toolkit-theme-1.7.1 _includes/related-pages.html
elixir-toolkit-theme-1.7.0 _includes/related-pages.html
elixir-toolkit-theme-1.6.1 _includes/related-pages.html
elixir-toolkit-theme-1.6.0 _includes/related-pages.html
elixir-toolkit-theme-1.5.3 _includes/related-pages.html
elixir-toolkit-theme-1.5.2 _includes/related-pages.html
elixir-toolkit-theme-1.5.1 _includes/related-pages.html