Skip to content

Commit 753b3f7

Browse files
committed
stage 99
1 parent 143d580 commit 753b3f7

3 files changed

Lines changed: 89 additions & 6 deletions

File tree

stages/a.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1+
let audio;
2+
13
window.addEventListener("load", () => {
2-
const audio = new Audio('https://ia803204.us.archive.org/16/items/StarWarsThemeSongByJohnWilliams/Star%20Wars%20Theme%20Song%20By%20John%20Williams.mp3');
3-
window.logo.addEventListener( "animationstart", () => audio.play() );
4+
audio = new Audio('https://ia803204.us.archive.org/16/items/StarWarsThemeSongByJohnWilliams/Star%20Wars%20Theme%20Song%20By%20John%20Williams.mp3');
5+
window.logo.addEventListener( "animationstart", () => {
6+
audio.play()
7+
window.setTimeout(startFade, 78000);
8+
});
9+
window.play.addEventListener( "click", () => {
10+
document.body.classList.add('playing');
11+
});
412
});
13+
14+
function startFade() {
15+
const doFade = setInterval(() => {
16+
if (audio.volume > 0) {
17+
const newVolume = audio.volume - 0.004;
18+
audio.volume = newVolume > 0 ? newVolume : 0;
19+
} else {
20+
clearInterval(doFade);
21+
}
22+
}, 20);
23+
}

stages/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</head>
88

99
<body>
10-
<aside>Right here, right now....</aside>
10+
<aside><p><strike>A long time ago in a galaxy far, far away....</strike> <p>Right here, right now....</aside>
1111
<img src="logo.svg" id=logo alt="The University of Portsmouth Logo">
1212

1313
<article>
@@ -18,12 +18,14 @@ <h1>A New Platform</h1>
1818

1919
<p>After thirty years of development, The Web comprises thousands of independently evolving technologies, millions of active developers and billions of users worldwide.</p>
2020

21-
<p>The Web permeates all societies; it powers, integrates with, or supports, almost every computer system in use today. It is arguably <em>the most important platform in computing history</em>, and the most important invention since the wheel.</p>
21+
<p>The Web permeates all societies; it powers, integrates with, or supports, almost every computer system in use today. It is arguably <em>the most important platform in computing history</em>, and the most important invention since the wheel.</p>
2222

2323
<p>Our aim is to pass on the <strong>knowledge</strong>, <strong>skills</strong> and <strong>inspiration</strong> necessary for you to take maximum advantage of The Web's world-changing potential.</p>
2424
</article>
2525

2626
<script src="a.js"></script>
27+
28+
<div id="play">▶︎</div>
2729
</body>
2830

2931
</html>

stages/style.css

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1+
html {
2+
background: black;
3+
}
4+
15
body {
26
background: black;
3-
background: url(stars.png);
47
background-size: 100vw;
58
color: #ffd23e;
69
font-family: arial;
710
font-size: 6.666vw;
811
margin: 0;
912
perspective: 50vh;
1013
height: 100vh;
14+
overflow: hidden;
15+
filter: blur(1px);
16+
}
17+
18+
body.playing {
19+
background: url(stars.png);
20+
animation: fade 4s 87s 1 normal linear forwards;
1121
}
1222

1323
article {
@@ -17,6 +27,9 @@ article {
1727
bottom: 0;
1828
transform-origin: center bottom;
1929
transform: rotate3d(1, 0, 0, 45deg) translateY(100%);
30+
}
31+
32+
body.playing article {
2033
animation: crawler 78s linear forwards 11s;
2134
}
2235

@@ -58,7 +71,12 @@ aside {
5871
opacity: 0;
5972
color: rgb(75,213,238);
6073
font-size: 4vw;
61-
margin: 40vh 20vw;
74+
top: 50%;
75+
left: 50%;
76+
transform: translate(-50%, -50%);
77+
}
78+
79+
body.playing aside {
6280
animation: alongtimeago 6s linear;
6381
}
6482

@@ -69,12 +87,20 @@ aside {
6987
100% { opacity: 0; }
7088
}
7189

90+
@keyframes fade {
91+
0% { opacity: 1; }
92+
100% { opacity: 0; }
93+
}
94+
7295
img {
7396
position: absolute;
7497
opacity: 0;
7598
height: 100vh;
7699
width: 100vw;
77100
height: 100vh;
101+
}
102+
103+
body.playing img {
78104
animation: logo 9s linear 6s;
79105
}
80106

@@ -95,3 +121,39 @@ img {
95121
opacity: 0;
96122
}
97123
}
124+
125+
body.playing #play {
126+
display: none;
127+
}
128+
129+
body.playing {
130+
cursor: none;
131+
}
132+
133+
134+
#play {
135+
font-size: 3vmin;
136+
position: fixed;
137+
top: 50%;
138+
left: 50%;
139+
transform: translate(-50%, -50%);
140+
padding: 1.5em 2em;
141+
background: red;
142+
color: white;
143+
border-radius: 50% / 10%;
144+
}
145+
146+
#play::before {
147+
content: "▶︎";
148+
font-family: Arial;
149+
font-size: 200%;
150+
line-height: 1.8em;
151+
text-align: center;
152+
position: absolute;
153+
top: 10%;
154+
bottom: 10%;
155+
right: -5%;
156+
left: -5%;
157+
background: inherit;
158+
border-radius: 5% / 50%;
159+
}

0 commit comments

Comments
 (0)