Sha256: ae59fbe27a3f995cecde508731dde4b94b3fd750a3fb4159b794c55f9a339653

Contents?: true

Size: 1.37 KB

Versions: 13

Compression:

Stored size: 1.37 KB

Contents

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">

    {%- assign default_paths = site.pages | map: "path" -%}
    {%- assign page_paths = site.header_pages | default: default_paths -%}
    {%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}

    <div class="container">
        <a class="navbar-brand" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>

        {%- if titles_size > 0 -%}

        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <div class="mr-auto"></div>
            <ul class="navbar-nav">
                {%- for path in page_paths -%}

                    {%- assign my_page = site.pages | where: "path", path | first -%}

                    {%- if my_page.title -%}

                        <li class="nav-item active">
                            <a class="nav-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
                        </li>

                    {%- endif -%}

                {%- endfor -%}
            </ul>
        </div>

        {%- endif -%}

    </div>
</nav>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bfdotcom-theme-0.2.9 _includes/header.html
bfdotcom-theme-0.2.8 _includes/header.html
bfdotcom-theme-0.2.7 _includes/header.html
bfdotcom-theme-0.2.6 _includes/header.html
bfdotcom-theme-0.2.5 _includes/header.html
bfdotcom-theme-0.2.4 _includes/header.html
bfdotcom-theme-0.2.3 _includes/header.html
bfdotcom-theme-0.2.2 _includes/header.html
bfdotcom-theme-0.2.1 _includes/header.html
bfdotcom-theme-0.2.0 _includes/header.html
bfdotcom-theme-0.1.2 _includes/header.html
bfdotcom-theme-0.1.1 _includes/header.html
bfdotcom-theme-0.1.0 _includes/header.html