Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
108 lines (93 loc) · 3.52 KB
/
Copy pathindex.html
File metadata and controls
108 lines (93 loc) · 3.52 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<head>
<title>bloggy</title>
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<audio id="backgroundMusic" controls loop>
<source src="audio/life.mp3" type="audio/mpeg">
<source src="audio/life.wav" type="audio/wav">
</audio>
<script>
const audio = document.getElementById('backgroundMusic');
let audioStartTime = 0;
// check prev page
window.addEventListener('load', function() {
const shouldPlay = sessionStorage.getItem('musicPlaying');
const savedTime = sessionStorage.getItem('musicTime');
if (shouldPlay === 'true' && audio) {
audio.currentTime = savedTime || 0;
audio.play();
}
});
// save audio
window.addEventListener('beforeunload', function() {
if (audio && !audio.paused) {
sessionStorage.setItem('musicPlaying', 'true');
sessionStorage.setItem('musicTime', audio.currentTime);
} else {
sessionStorage.setItem('musicPlaying', 'false');
}
});
// music on click
document.addEventListener('click', function() {
if (audio && audio.paused) {
audio.play();
sessionStorage.setItem('musicPlaying', 'true');
}
}, { once: true });
</script>
<nav class="navbar">
<div class="nav-container">
<a href="#" class="nav-logo">bloggy</a>
<ul class="nav-links">
<li><a href="index.html">home</a></li>
<li><a href="piano.html">piano</a></li>
<li><a href="verdict.html">verdict</a></li>
</ul>
<button class="mobile-menu-btn">☰</button>
</div>
</nav>
<div class="centerScreen">
<div class="titleBlock">
<!-- bloggy font = mochiy pop one, name font = miltonian tattoo -->
<img src="images/white_bloggy_logo.png" alt="white_bloggy_logo" class="icon--large fadeIn">
<h1 class="subTitleText fadeIn">by julia do</h1>
</div>
<button id="scrollBtn" class="goBtn fadeIn">let's go!</button>
</div>
<div class="grid-container container">
<div class="box">
<img src="images/me.png" alt="doodle of me" class="icon--small pulseVibe">
<div class="grid-item">
<h2>what's bloggy?</h2>
<p>a space for my engineering ventures! i post my progress on various personal projects here :)</p>
</div>
</div>
</div>
<div class="projects-section grid-container container invisBox">
<div class="container">
<div class="projects-grid">
<a href="piano.html" class="project-box">
<h3>piano</h3>
<p>trying to build one...</p>
</a>
<a href="verdict.html" class="project-box">
<h3>verdict</h3>
<p>a godot game!</p>
</a>
</div>
</div>
</div>
<footer class="siteFooter">
<div class="footerContent">
<p>
© 2025 Bloggy.
<a href="https://ko-fi.com/juliado" target="_blank" class="linkText">i like free boba</a>
</p>
</div>
</footer>
<script src="main.js"></script>
</body>
</html>