Sha256: 12d551eef676cfd967d52fc7673ca3ee06a5878324723c989ee01d100d0f405a

Contents?: true

Size: 2 KB

Versions: 4

Compression:

Stored size: 2 KB

Contents

{% assign logo_path = site.main_logo %}
<header class="style-default">
	<div class="container text-center">
		<div class="row">
			<div class="col">
				<a class="main-logo mt-5" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt=" "></a>
			</div>
		</div>
		<div class="row">
			<div class="col">
				<h1 class="mt-3 mb-0">{{ site.name }}</h1>
				<p class="text-info text-lg">{{ site.description }}</p>
			</div>
		</div>
		<ul class="nav d-flex justify-content-center mb-5">
			{%- for link in site.data.navigation.main -%}
				{%- if link.url contains '://' -%}
					{%- assign url = link.url -%}
				{%- else -%}
					{%- assign url = link.url | relative_url -%}
				{%- endif -%}
				<!-- {{ page.url }} -->
				<li class="nav-item">
					<a class="nav-link {% if page.url==url %}active{% endif %}" href="{{ url }}">{{ link.title }}</a>
				</li>
      {%- endfor -%}
      <!-- show collection navigation -->
      {% for collection in site.collections %}
        {% if collection.navigation %}
          <li class="nav-item">
            <a class="nav-link {% if page.url==url %}active{% endif %}" href="/{{ collection.relative_directory | remove_first: '_' }}">{{ collection.label | capitalize }}</a>
          </li>
          <!-- create categories array-->
          {% assign categories_col = "" | split:"|" %}
          <!--Add each unique 'my_collection' category to the array-->
          {% for post in collection.docs %}
            {% for category in post.categories %}
              {% assign categories_col = categories_col | push: category | uniq %}
            {% endfor %}
          {% endfor %}
          <!-- show category navigation -->
          {% for cat in categories_col %}
            <li class="nav-item">
              <a class="nav-link {% if page.url==url %}active{% endif %}" href="/{{ collection.relative_directory | remove_first: '_' }}/{{ cat }}">{{ cat | capitalize }}</a>
            </li>
          {% endfor %}
        {% endif %}
      {% endfor %}
		</ul>
	</div>
</header>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hardpool-flat-2.2.0 _includes/header.html
hardpool-flat-2.1.0 _includes/header.html
hardpool-flat-2.0.0 _includes/header.html
hardpool-flat-1.0.0 _includes/header.html