Skip to content

Commit 870fb01

Browse files
committed
Refactor header structure and add dynamic navigation for improved usability
1 parent 58e7ccc commit 870fb01

2 files changed

Lines changed: 31 additions & 35 deletions

File tree

_includes/head-custom.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,34 @@
6565
}
6666
}
6767
</style>
68+
69+
<script>
70+
document.addEventListener('DOMContentLoaded', function() {
71+
// Find the site header
72+
var siteHeader = document.querySelector('.site-header .wrapper');
73+
if (siteHeader) {
74+
// Create navigation HTML
75+
var navHTML = '<div style="clear: both; border-top: 1px solid rgba(255, 167, 196, 0.3); margin-top: 0.5em; padding-top: 0.75em;">' +
76+
'<a href="/about/" style="display: inline-block; margin-right: 2em; color: #ffa7c4; text-decoration: none; font-size: 1em;">About</a>' +
77+
'<a href="/archive/" style="display: inline-block; margin-right: 2em; color: #ffa7c4; text-decoration: none; font-size: 1em;">Archive</a>' +
78+
'<a href="/tags/" style="display: inline-block; margin-right: 2em; color: #ffa7c4; text-decoration: none; font-size: 1em;">Tags</a>' +
79+
'</div>';
80+
81+
// Add navigation to the header
82+
siteHeader.insertAdjacentHTML('beforeend', navHTML);
83+
84+
// Add hover effects
85+
var navLinks = siteHeader.querySelectorAll('a[href^="/about"], a[href^="/archive"], a[href^="/tags"]');
86+
navLinks.forEach(function(link) {
87+
link.addEventListener('mouseenter', function() {
88+
this.style.color = '#ffffff';
89+
this.style.textDecoration = 'underline';
90+
});
91+
link.addEventListener('mouseleave', function() {
92+
this.style.color = '#ffa7c4';
93+
this.style.textDecoration = 'none';
94+
});
95+
});
96+
}
97+
});
98+
</script>

_includes/header.html

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)