summaryrefslogtreecommitdiff
path: root/templates/partials/header.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/partials/header.html')
-rw-r--r--templates/partials/header.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/partials/header.html b/templates/partials/header.html
new file mode 100644
index 0000000..dcd4ea2
--- /dev/null
+++ b/templates/partials/header.html
@@ -0,0 +1,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>