-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhexafun.html
76 lines (70 loc) · 2.68 KB
/
hexafun.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="styles.css"/></link>
</head>
<body>
<div id="myButton" class="blog-title">
<h1>hexafun</h1>
</div>
<div class="sub-title">
<p>a programming and computer hobbyist blog</p>
</div>
<div class="site-container">
<div class="menu-container">
<div id="myMenu" class="hidden">
<div class="item1">
<a href="index.html"><p>/home</p></a>
</div>
<div class="item1">
<p>/resume</p>
</div>
<div class="item1">
<a href="projects.html"><p>/projects</p></a>
</div>
<div class="item1">
<a href="https://cianmarbo.wordpress.com"><p>/blog</p></a>
</div>
</div>
</div>
<div class="container-box-container">
<div class="post-list">
</div>
</div>
<script>
const button = document.getElementById('myButton');
const text = document.getElementById('myMenu');
let menuVisible = true;
// Add a click event listener to the button
button.addEventListener('click', function() {
menuVisible = !menuVisible;
if(menuVisible) {
text.classList.remove('menu-animated');
text.classList.add('hidden');
} else {
text.classList.add('menu-animated');
text.classList.remove('hidden');
}
});
// const button = document.getElementById("myButton");
// const text = document.getElementById('myMenu');
// let menuVisible = false;
// function myFunction() {
// menuVisible = !menuVisible;
// if(menuVisible) {
// text.classList.remove('menu-animated');
// text.classList.add('hidden');
// } else {
// text.classList.add('menu-animated');
// text.classList.remove('hidden');
// // text.classList.add('menu-animated-inverse');
// }
// }
</script>
</div>
<div class="footer">
<a href="https://twitter.com/cianmarbo"><p>@cianmarbo</p></a>
</div>
</body>
</html>