Skip to content

Commit 9a34ecb

Browse files
committed
Fix hamburger menu implementation in baseof.html
1 parent 9501256 commit 9a34ecb

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

portfolio/themes/basic/layouts/_default/baseof.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
{{ partial "seo.html" . }}
1010

1111
<!-- Favicon -->
12-
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>👨💻</text></svg>">
12+
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>👨💻</text></svg>">
1313

1414
<!-- Styles -->
1515
<link rel="stylesheet" href="{{ "css/minimal.css" | relURL }}">
1616
</head>
1717
<body>
1818
<nav>
19-
<ul>
19+
<button class="nav-toggle" onclick="toggleNav()"></button>
20+
<ul id="nav-menu">
2021
<li><a href="{{ "/" | relURL }}"><span class="emoji">🏠</span> Home</a></li>
2122
<li><a href="{{ "/projects" | relURL }}"><span class="emoji">🛠️</span> Projects</a></li>
2223
<li><a href="{{ "/opensource" | relURL }}"><span class="emoji">🌍</span> Community</a></li>
@@ -30,7 +31,14 @@
3031

3132
<footer>
3233
<div class="ascii-divider"></div>
33-
<p><span class="emoji">👨💻</span> {{ .Site.Params.author }} | {{ .Site.Params.role }}</p>
34+
<p><span class="emoji">👨💻</span> {{ .Site.Params.author }} | {{ .Site.Params.role }}</p>
3435
</footer>
36+
37+
<script>
38+
function toggleNav() {
39+
const menu = document.getElementById('nav-menu');
40+
menu.classList.toggle('active');
41+
}
42+
</script>
3543
</body>
3644
</html>

0 commit comments

Comments
 (0)