Creates navigation
This commit is contained in:
parent
2c3cc33b1e
commit
fdb2035db0
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
<a href="{{ page.url }}" title="{{ page.title }}">
|
<a href="{{ page.url }}" title="{{ page.title }}">
|
||||||
|
|
||||||
<img class="avatar" src="{{ site.logo | replace: "300", "72" }}" alt="{{ site.title }}" srcset="{{ site.logo | replace: "300", "72" }} 72w, {{ site.logo | replace: "300", "144" }} 144w">
|
<img class="avatar" src="{{ site.logo | replace: "300", "72" }}" alt="{{ site.title }}" srcset="{{ site.logo | replace: "300", "72" }} 72w, {{ site.logo | replace: "300", "144" }} 144w" width="72" height="72">
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
{% include nav.html %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
|
14
_includes/nav.html
Normal file
14
_includes/nav.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<nav class="nav">
|
||||||
|
<button class="button button--nav">Menu</button>
|
||||||
|
{% if data.nav %}
|
||||||
|
{% for item in data.nav %}
|
||||||
|
<a href="{{ item.url }}" title="{{ item.name }}">{{ item.name }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
{% for page in site.pages %}
|
||||||
|
{% if page.title %}
|
||||||
|
<a href="{{ page.url }}" title="{{ page.title }}">{{ page.title }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</nav>
|
Loading…
Reference in New Issue
Block a user