JekyllHomepage2025/_includes/_navigation.html

28 lines
1.1 KiB
HTML
Executable File

<div class="navigation-wrapper">
<div class="site-name">
{% if site.logo %}
<a href="{{ site.github.url }}/"><img src="{{ site.github.url }}/images/{{ site.logo }} "></a>
{% else %}
<a href="{{ site.github.url }}/">{{ site.title }}</a>
{% endif %}
</div><!-- /.site-name -->
<div class="top-navigation">
<nav role="navigation" id="site-nav" class="nav">
<ul>
{% assign links = site.pages | where_exp: "item", "item.menuorder != nil" %}
{% assign alllinks = links | concat: site.data.navigation | sort: 'menuorder' %}
{% for link in alllinks %}
{% if link.menuorder %}{% assign url = link.url | prepend: site.github.url %}{% else %}{% assign url = link.url %}{% endif %}
+ <li><a href="{{ url }}" {% if link.url contains 'http' %}target="_blank"{% endif %}>
{% if link.menutitle %}
{{link.menutitle}}
{% else %}
{{ link.title }}
{% endif %}
</a></li>
{% endfor %}
</ul>
</nav>
</div><!-- /.top-navigation -->
</div><!-- /.navigation-wrapper -->