-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
90 lines (81 loc) · 4.67 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>UofT Coop Salary Sharing.</title>
<style>
body, html {
height: 100%;
margin: 0px;
}
.iframe-container {
position: relative;
width: 100%;
height: 100%;
}
iframe {
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
blockquote {
color: #777;
font-style: italic;
border-left: 2px solid #777; /* Left border color and width */
padding: 2px 0px 2px 0.4em; /* Add some padding for spacing */
margin: 0.4em 0.4em 0em 0em;
}
footer{
padding: 0.4em 0.4em 0em 0.4em;
}
</style>
</head>
<body>
<div class="iframe-container">
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vR7oOhJIvvs9TCF-KRDN30Q2fGS9-93gbhORwfXVPnFoEexBz8lKKLcM3GZYqvZV8IVuBA-Mg74iSxg/pubhtml?gid=1790617535&single=true&widget=true&headers=false"></iframe>
</div>
<footer>
<strong> <a href="#">About </a> | <a href="https://github.com/Nathan903/UofT-coop-salary"> Request Removal-individual </a> | <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ"> Request Removal-company </a> | <a href="https://docs.google.com/spreadsheets/d/1kMBu1_TONgzZ0Ysz3d2OYiu1O8kDftZxT3INxrz8hII/edit#gid=0" target="_blank">Waterloo Coop Salary Spreadsheet</a></strong>
<blockquote id="quote">For the love of money is a root of all kinds of evils. </blockquote>
<footer>
<script>
// Array of quotes with weights
const quotes = [
{ text: "But woe to you who are rich, for you have received your consolation", weight:2},
{ text: "Whoever trusts in his riches will fall,but the righteous will flourish like a green leaf.", weight:5},
{ text: "For the love of money is a root of all kinds of evils. It is through this craving that some have wandered away from the faith and pierced themselves with many pangs.", weight: 7 },
{ text: "He who loves money will not be satisfied with money, nor he who loves wealth with his income; this also is vanity.", weight:33 },
{ text: "And he said to them, 'Take care, and be on your guard against all covetousness, for one's life does not consist in the abundance of his possessions.'", weight: 3 },
{ text: "A good name is to be chosen rather than great riches, and favor is better than silver or gold.", weight: 3 },
{ text: "Keep your life free from love of money, and be content with what you have, for he has said, 'I will never leave you nor forsake you.'", weight: 1},
{ text: "For where your treasure is, there your heart will be also.", weight: 2 },
{ text: "Better is the little that the righteous has than the abundance of many wicked.", weight: 3},
{ text: "Again I tell you, it is easier for a camel to go through the eye of a needle than for a rich person to enter the kingdom of God.", weight: 2},
{ text: "Come now, you rich, weep and howl for the miseries that are coming upon you.", weight:2},
{ text: "When your eyes light on it, it is gone, for suddenly it sprouts wings, flying like an eagle toward heaven.", weight: 1},
{ text: "If the one who strips the clothed is called a robber, what name is deserved for the one who does not clothe the naked, though able to do so? The bread you hold belongs to the hungry; the cloth in your closet belongs to the naked; the shoes you let rot belongs to the barefoot; the money you hide belongs to the needy. Thus, you wrong as many as you could help.", weight:12}, // https://catholiclibrary.org/library/view?docId=/Fathers-OR/Basilius_Caesariensis__Sermones_de_moribus_a_Symeone_Metaphrasta_collecti.gr.html;chunk.id=00000031
];
// Function to get a random quote based on weights
function getRandomQuote() {
// Calculate the total weight of all quotes
const totalWeight = quotes.reduce((sum, quote) => sum + quote.weight, 0);
console.log(totalWeight);
// Generate a random number between 0 and the total weight
const randomNumber = Math.random() * totalWeight;
// Find the quote that corresponds to the random number
let cumulativeWeight = 0;
for (const quote of quotes) {
cumulativeWeight += quote.weight;
if (randomNumber <= cumulativeWeight) {
return quote.text;
}
}
}
// Display a random weighted quote on page load
const quoteElement = document.getElementById("quote");
quoteElement.textContent = getRandomQuote();
</script>
</body>
</html>