1+ < header class ="site-header ">
2+ < div class ="header-content ">
3+ < a href ="/ " class ="site-logo "> {{ site.title }}</ a >
4+
5+ < button class ="nav-toggle " aria-label ="Toggle navigation " onclick ="document.querySelector('.site-nav').classList.toggle('active') ">
6+ < span > </ span >
7+ < span > </ span >
8+ < span > </ span >
9+ </ button >
10+
11+ < nav class ="site-nav ">
12+ < a href ="/ " {% if page.url == '/ ' or page.url == '/index.html ' %}class ="active "{% endif %} > Home</ a >
13+
14+ {% assign pages_list = site.pages | sort: 'title' %}
15+ {% for node in pages_list %}
16+ {% if node.title != null and node.layout == "page" %}
17+ < a href ="{{ node.url }} " {% if page.url == node.url %}class ="active "{% endif %} > {{ node.title }}</ a >
18+ {% endif %}
19+ {% endfor %}
20+
21+ {% if site.social.github and site.social.github != "" %}
22+ < a href ="https://github.com/{{ site.social.github }} " target ="_blank " rel ="noopener " aria-label ="GitHub " class ="header-social-link ">
23+ < svg xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 24 24 " fill ="currentColor " width ="20 " height ="20 ">
24+ < path d ="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z "/>
25+ </ svg >
26+ </ a >
27+ {% endif %}
28+
29+ {% if site.social.linkedin and site.social.linkedin != "" %}
30+ < a href ="https://linkedin.com/in/{{ site.social.linkedin }} " target ="_blank " rel ="noopener " aria-label ="LinkedIn " class ="header-social-link ">
31+ < svg xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 24 24 " fill ="currentColor " width ="20 " height ="20 ">
32+ < path d ="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z "/>
33+ </ svg >
34+ </ a >
35+ {% endif %}
36+
37+ < a href ="{{ '/feed.xml' | relative_url }} " target ="_blank " rel ="noopener " aria-label ="RSS Feed " class ="header-social-link ">
38+ < svg xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 24 24 " fill ="currentColor " width ="20 " height ="20 ">
39+ < path d ="M6.18 15.64a2.18 2.18 0 0 1 2.18 2.18C8.36 19 7.38 20 6.18 20C5 20 4 19 4 17.82a2.18 2.18 0 0 1 2.18-2.18M4 4.44A15.56 15.56 0 0 1 19.56 20h-2.83A12.73 12.73 0 0 0 4 7.27V4.44m0 5.66a9.9 9.9 0 0 1 9.9 9.9h-2.83A7.07 7.07 0 0 0 4 12.93V10.1Z "/>
40+ </ svg >
41+ </ a >
42+
43+ < button class ="theme-toggle " id ="theme-toggle " aria-label ="Toggle dark/light mode " title ="Toggle theme ">
44+ < svg class ="icon-sun " xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 24 24 " fill ="currentColor " width ="20 " height ="20 ">
45+ < path d ="M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18a.75.75 0 01.75.75V21a.75.75 0 01-1.5 0v-2.25A.75.75 0 0112 18zM7.758 17.303a.75.75 0 00-1.061-1.06l-1.591 1.59a.75.75 0 001.06 1.061l1.591-1.59zM6 12a.75.75 0 01-.75.75H3a.75.75 0 010-1.5h2.25A.75.75 0 016 12zM6.697 7.757a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 00-1.061 1.06l1.59 1.591z " />
46+ </ svg >
47+ < svg class ="icon-moon " xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 24 24 " fill ="currentColor " width ="20 " height ="20 ">
48+ < path fill-rule ="evenodd " d ="M9.528 1.718a.75.75 0 01.162.819A8.97 8.97 0 009 6a9 9 0 009 9 8.97 8.97 0 003.463-.69.75.75 0 01.981.98 10.503 10.503 0 01-9.694 6.46c-5.799 0-10.5-4.701-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 01.818.162z " clip-rule ="evenodd " />
49+ </ svg >
50+ </ button >
51+ </ nav >
52+ </ div >
53+ </ header >
54+
55+ < script >
56+ ( function ( ) {
57+ const toggle = document . getElementById ( 'theme-toggle' ) ;
58+ const prefersDark = window . matchMedia ( '(prefers-color-scheme: dark)' ) ;
59+
60+ function getTheme ( ) {
61+ const stored = localStorage . getItem ( 'theme' ) ;
62+ if ( stored ) return stored ;
63+ return prefersDark . matches ? 'dark' : 'light' ;
64+ }
65+
66+ function setTheme ( theme ) {
67+ document . documentElement . setAttribute ( 'data-theme' , theme ) ;
68+ localStorage . setItem ( 'theme' , theme ) ;
69+ }
70+
71+ // Set initial theme (light is default in CSS, only apply if dark)
72+ const initialTheme = getTheme ( ) ;
73+ if ( initialTheme === 'dark' ) {
74+ setTheme ( 'dark' ) ;
75+ }
76+
77+ // Toggle on click
78+ toggle . addEventListener ( 'click' , ( ) => {
79+ const current = document . documentElement . getAttribute ( 'data-theme' ) || 'light' ;
80+ setTheme ( current === 'dark' ? 'light' : 'dark' ) ;
81+ } ) ;
82+
83+ // Listen for system preference changes
84+ prefersDark . addEventListener ( 'change' , ( e ) => {
85+ if ( ! localStorage . getItem ( 'theme' ) ) {
86+ setTheme ( e . matches ? 'dark' : 'light' ) ;
87+ }
88+ } ) ;
89+ } ) ( ) ;
90+ </ script >
0 commit comments