-
Notifications
You must be signed in to change notification settings - Fork 0
/
fanci.html
182 lines (172 loc) · 4.9 KB
/
fanci.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Random Quote Generator</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3mobile.css">
<style>
/* Add custom styles here */
body {
font-family: "Georgia", serif;
background-color: #f7f7f7;
}
.w3-container {
max-width: 600px;
margin: 0 auto;
}
.w3-teal {
background-color: #009688 !important;
}
h1 {
color: white;
text-align: center;
font-size: 36px;
margin-bottom: 20px;
text-shadow: 2px 2px #333333;
}
#quote-container {
margin: 50px auto;
text-align: center;
padding: 20px;
background-color: #ffffff;
box-shadow: 0px 2px 6px #333333;
border-radius: 10px;
}
#quote {
font-size: 28px;
font-weight: bold;
margin-bottom: 10px;
}
#author {
font-size: 24px;
font-style: italic;
color: #555555;
}
button {
display: block;
margin: 0 auto;
font-size: 24px;
font-weight: bold;
background-color: #009688;
color: white;
border-radius: 5px;
padding: 10px 20px;
border: none;
box-shadow: 2px 2px #333333;
cursor: pointer;
}
button:hover {
background-color: #00796b;
}
</style>
</head>
<body class="w3-mobile">
<div class="w3-container w3-teal">
<h1>Random Quote Generator</h1>
</div>
<div class="w3-container" id="quote-container">
<p id="quote"></p>
<p id="author"></p>
</div>
<button onclick="displayRandomQuote()">Generate Random Quote</button>
<script>
// Here's the JavaScript code to display the quotes
const quotes = [
{
quote: "Beware; for I am fearless, and therefore powerful.",
author: "Mary Shelley, Frankenstein"
},
{
quote: "All the darkness in the world cannot extinguish the light of a single candle.",
author: "Saint Francis of Assisi"
},
{
quote: "The only way to deal with fear is to face it head on.",
author: "Sarah J. Maas, Throne of Glass"
},
{
quote: "It is better to be hated for what you are than to be loved for what you are not.",
author: "Andre Gide, Autumn Leaves"
},
{
quote: "I can resist anything except temptation.",
author: "Oscar Wilde, Lady Windermere's Fan"
},
{
quote: "The man in black fled across the desert, and the gunslinger followed.",
author: "Stephen King, The Gunslinger"
},
{
quote: "We are all in the gutter, but some of us are looking at the stars.",
author: "Oscar Wilde, Lady Windermere's Fan"
},
{
quote: "To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.",
author: "Ralph Waldo Emerson"
},
{
quote: "Not all those who wander are lost.",
author: "J.R.R. Tolkien, The Lord of the Rings"
},
{
quote: "The best way to predict your future is to create it.",
author: "Abraham Lincoln"
},
{
quote: "The only true wisdom is in knowing you know nothing.",
author: "Socrates"
},
{
quote: "There is nothing noble in being superior to your fellow man; true nobility is being superior to your former self.",
author: "Ernest Hemingway"
},
{
quote: "It does not do to dwell on dreams and forget to live.",
author: "J.K. Rowling, Harry Potter and the Philosopher's Stone"
},
{
quote: "Life isn't about finding yourself. Life is about creating yourself.",
author: "George Bernard Shaw"
},
{
quote: "In three words I can sum up everything I've learned about life: it goes on.",
author: "Robert Frost"
},
{
quote: "Success is not final, failure is not fatal: it is the courage to continue that counts.",
author: "Winston Churchill"
},
{
quote: "Love all, trust a few, do wrong to none.",
author: "William Shakespeare, All's Well That Ends Well"
},
{
quote: "A room without books is like a body without a soul.",
author: "Marcus Tullius Cicero"
},
{
quote: "The unexamined life is not worth living.",
author: "Socrates"
},
{
quote: "I have not failed. I've just found 10,000 ways that won't work.",
author: "Thomas Edison"
},
{
quote: "Believe you can and you're halfway there.",
author: "Theodore Roosevelt"
},
{
quote: "To be yourself is all that you can do.",
author: "Chris Cornell"
},
// Add the other quotes here
];
function displayRandomQuote() {
const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
document.getElementById("quote").textContent = `"${randomQuote.quote}"`;
document.getElementById("author").textContent = `- ${randomQuote.author}`;
}
</script>
</body>
</html>