summaryrefslogtreecommitdiff
path: root/templates/partials/header.html
blob: dcd4ea2b998e72da6bc0b5d6841dadbc40ecc788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{% set home_url = get_url(path='@/_index.md') %}
{% set about_url = get_url(path='@/about.md') %}
{% set software_url = get_url(path='@/software/_index.md') %}
{% set notes_url = get_url(path='@/notes/_index.md') %}
{% set active_path = current_path | default(value='') %}
<header class="site-header">
  <div class="site-container header-inner">
    <a class="site-title" href="{{ home_url }}">{{ config.title }}</a>
    <nav aria-label="メインナビゲーション">
      <ul class="nav-list">
        <li><a href="{{ home_url }}"{% if active_path == '/' %} aria-current="page"{% endif %}>Home</a></li>
        <li><a href="{{ notes_url }}"{% if '/notes/' in active_path %} aria-current="page"{% endif %}>Notes</a></li>
        <li><a href="{{ software_url }}"{% if '/software/' in active_path %} aria-current="page"{% endif %}>Software</a></li>
        <li><a href="{{ about_url }}"{% if active_path == '/about/' %} aria-current="page"{% endif %}>About</a></li>
      </ul>
    </nav>
    <button class="theme-toggle" type="button" data-theme-toggle aria-pressed="false" aria-label="ダークテーマに切り替える">Dark</button>
  </div>
</header>