-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
224 lines (199 loc) · 7.53 KB
/
index.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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>get_well_soon_lex.php?cgi-bin=29ff0a227b080040fca17f6d73c24e52</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type='text/javascript' src='https://www.midijs.net/lib/midi.js'></script>
<link
rel="stylesheet"
href="https://unpkg.com/98.css"
>
</head>
<style>
@font-face {
font-family: "Comic Sans MS";
src: url("comic-sans-ms.ttf") format('truetype');
}
html, body {
font-family: "Comic Sans MS", "Comic Sans", cursive;
background: rgb(63, 94, 251);
background: radial-gradient(circle, rgba(63, 94, 251, 1) 0%, rgba(252, 70, 107, 1) 100%);
}
#subtitle {
color: hotpink;
}
#title {
color: bisque;
text-shadow: 2px 2px aqua;
}
#artist {
color: gold;
text-shadow: 2px 2px black;
}
#art {
max-width: 100%;
}
#modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
margin: 15% auto;
}
</style>
<body>
<center>
<h1 id="title">Get well soon Lex!!</h1>
<marquee>
<h2 id="subtitle">Lots of Love from the Organise Team</h2>
</marquee>
<img id="art" src="/images/tameka.png"/>
<br> <br>
<h3 id="artist">Picture by Tameka</h3>
<br>
<button id="next">Next</button>
<button id="previous">Previous</button>
<br> <br>
<button id="stop-music">Stop Music</button>
</center>
<div id="modal">
<div class="window modal-content" style="width: 300px">
<div class="title-bar">
<div class="title-bar-text">Whoopsy daisy!</div>
<div class="title-bar-controls">
<button aria-label="Close" id="modal-close"></button>
</div>
</div>
<div class="window-body">
<p>As part of our iterative approach to application development, this button isn't yet implemented. Instead
press the next button until you see the image that you were seeing previously. Thanks!</p>
</div>
</div>
</div>
</body>
<script>
$(document).ready(function theMainFunction() {
var isMyHeartWillGoOnCurrentlyNotBeingPlayed = true;
var niceSongToPlayOnThisWebsite;
var whichNumberWeAreCurrentlyDisplaying = 0;
var arrayWithTheNamesOfAndRespectiveImageEachPersonWhoContributed = [
{
name: "Tameka",
image: "tameka.png"
},
{
name: "Pavlina",
image: "pavlina.png"
},
{
name: "Six",
image: "six.png"
},
{
name: "Alex",
image: "alex.png"
},
{
name: "Andrew",
image: "andrew.png"
},
{
name: "Sean",
image: "sean.png"
},
{
name: "Bex",
image: "bex.png"
},
{
name: "Nat",
image: "nat.png"
},
{
name: "Chloe",
image: "chloe.png"
}
]
for (var i = 0; i < 1; i++) {
addAWarningAlertToThePreviousButtonToExplainItIsntImplemented();
addAnEventListenerToTheCloseModalAndCloseItIfYouClickOnItAsTheActionAfterwards();
enableTheFunctionalityPertainingToTheNextButton();
makeTheStopMusicButtonWork();
addTheEventListenerToTriggerThePlayingOfMusicInTheWindowUponAUserClicking();
}
function playMyHeartWillGoOnForLex() {
var self = this;
niceSongToPlayOnThisWebsite = new Audio("titanic_bad_recorder.mp3");
niceSongToPlayOnThisWebsite.play();
niceSongToPlayOnThisWebsite.addEventListener("ended", function playItAgainSam() {
niceSongToPlayOnThisWebsite.currentTime = 0;
niceSongToPlayOnThisWebsite.play();
})
isMyHeartWillGoOnCurrentlyNotBeingPlayed = false;
}
function addAWarningAlertToThePreviousButtonToExplainItIsntImplemented() {
var self = this;
$('#previous').click(function alertTheUserAboutWhatsGoingOnWithThePreviousButton() {
displayAModalInformingTheUserAboutWhatIsGoingOnWithThePreviousFunction();
})
}
function enableTheFunctionalityPertainingToTheNextButton() {
$('#next').click(function clickyClickyNextNext() {
var self = this;
if (isMyHeartWillGoOnCurrentlyNotBeingPlayed) playMyHeartWillGoOnForLex();
console.log("debug: next button clicked by user");
whichNumberWeAreCurrentlyDisplaying++;
if (whichNumberWeAreCurrentlyDisplaying > arrayWithTheNamesOfAndRespectiveImageEachPersonWhoContributed.length - 1) {
whichNumberWeAreCurrentlyDisplaying = 0;
}
var theOneThatWeCurrentlyAreInNeedOfWhereOneIsPertainingToPieceOfArtwork = arrayWithTheNamesOfAndRespectiveImageEachPersonWhoContributed[whichNumberWeAreCurrentlyDisplaying];
var whereTheArtLives = $('#art');
whereTheArtLives.hide();
whereTheArtLives.attr('src', `/images/${theOneThatWeCurrentlyAreInNeedOfWhereOneIsPertainingToPieceOfArtwork.image}`);
whereTheArtLives.slideToggle();
$('#artist').html(`Picture by ${theOneThatWeCurrentlyAreInNeedOfWhereOneIsPertainingToPieceOfArtwork.name}`);
})
}
function displayAModalInformingTheUserAboutWhatIsGoingOnWithThePreviousFunction() {
$('#modal').show();
}
function addAnEventListenerToTheCloseModalAndCloseItIfYouClickOnItAsTheActionAfterwards() {
$('#modal-close').click(function implementTheClosingOfTheModal() {
$('#modal').hide();
})
}
function makeTheStopMusicButtonWork() {
$('#stop-music').click(function stopTheMusicPlease() {
niceSongToPlayOnThisWebsite.pause();
niceSongToPlayOnThisWebsite.currentTime = 0;
MIDIjs.play('titanic-3.mid');
if (isIOS()) isMyHeartWillGoOnCurrentlyNotBeingPlayed = true;
})
}
function addTheEventListenerToTriggerThePlayingOfMusicInTheWindowUponAUserClicking() {
$(window).click(function playThatFunkyMusic() {
if (!isMyHeartWillGoOnCurrentlyNotBeingPlayed) return;
playMyHeartWillGoOnForLex();
});
}
function isIOS() {
return /iPad|iPhone|iPod/.test(navigator.platform)
|| (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
}
});
</script>
</html>