-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
97 lines (89 loc) · 6.21 KB
/
Copy pathindex.html
File metadata and controls
97 lines (89 loc) · 6.21 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Quote Of The Day</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="quote-box">
<h2>Quote Of The Day</h2>
<blockquote id="quote">Loading...</blockquote>
<span id="author">Loading...</span>
<div>
<button onclick="getquote()">New Quote</button>
<button onclick="tweetQuote()"><img src="twitter.png" alt="Tweet">Tweet</button>
</div>
</div>
<script>
const quote = document.getElementById("quote");
const author = document.getElementById("author");
const quotes = [
{text: "Be yourself; everyone else is already taken.", author: "Oscar Wilde"},
{text: "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.", author: "Albert Einstein"},
{text: "So many books, so little time.", author: "Frank Zappa"},
{text: "A room without books is like a body without a soul.", author: "Marcus Tullius Cicero"},
{text: "You only live once, but if you do it right, once is enough.", author: "Mae West"},
{text: "Be the change that you wish to see in the world.", author: "Mahatma Gandhi"},
{text: "In three words I can sum up everything I've learned about life: it goes on.", author: "Robert Frost"},
{text: "If you tell the truth, you don't have to remember anything.", author: "Mark Twain"},
{text: "A friend is someone who knows all about you and still loves you.", author: "Elbert Hubbard"},
{text: "To live is the rarest thing in the world. Most people exist, that is all.", author: "Oscar Wilde"},
{text: "Always forgive your enemies; nothing annoys them so much.", author: "Oscar Wilde"},
{text: "Live as if you were to die tomorrow. Learn as if you were to live forever.", author: "Mahatma Gandhi"},
{text: "Without music, life would be a mistake.", author: "Friedrich Nietzsche"},
{text: "We accept the love we think we deserve.", author: "Stephen Chbosky"},
{text: "Imperfection is beauty, madness is genius and it's better to be absolutely ridiculous than absolutely boring.", author: "Marilyn Monroe"},
{text: "It is better to be hated for what you are than to be loved for what you are not.", author: "André Gide"},
{text: "It does not do to dwell on dreams and forget to live.", author: "J.K. Rowling"},
{text: "Good friends, good books, and a sleepy conscience: this is the ideal life.", author: "Mark Twain"},
{text: "Life is what happens to us while we are making other plans.", author: "Allen Saunders"},
{text: "The fool doth think he is wise, but the wise man knows himself to be a fool.", author: "William Shakespeare"},
{text: "Whenever you find yourself on the side of the majority, it is time to pause and reflect.", author: "Mark Twain"},
{text: "We are all in the gutter, but some of us are looking at the stars.", author: "Oscar Wilde"},
{text: "Do one thing every day that scares you.", author: "Eleanor Roosevelt"},
{text: "If you can't explain it to a six year old, you don't understand it yourself.", author: "Albert Einstein"},
{text: "Everything you can imagine is real.", author: "Pablo Picasso"},
{text: "You can never get a cup of tea large enough or a book long enough to suit me.", author: "C.S. Lewis"},
{text: "Logic will get you from A to Z; imagination will get you everywhere.", author: "Albert Einstein"},
{text: "Sometimes the questions are complicated and the answers are simple.", author: "Dr. Seuss"},
{text: "The only way out of the labyrinth of suffering is to forgive.", author: "John Green"},
{text: "You may say I'm a dreamer, but I'm not the only one.", author: "John Lennon"},
{text: "Reality continues to ruin my life.", author: "Bill Watterson"},
{text: "The purpose of our lives is to be happy.", author: "Dalai Lama"},
{text: "Life is what happens when you're busy making other plans.", author: "John Lennon"},
{text: "Get busy living or get busy dying.", author: "Stephen King"},
{text: "You have within you right now, everything you need to deal with whatever the world can throw at you.", author: "Brian Tracy"},
{text: "Believe you can and you're halfway there.", author: "Theodore Roosevelt"},
{text: "The only impossible journey is the one you never begin.", author: "Tony Robbins"},
{text: "Don’t let yesterday take up too much of today.", author: "Will Rogers"},
{text: "Success is not in what you have, but who you are.", author: "Bo Bennett"},
{text: "Act as if what you do makes a difference. It does.", author: "William James"},
{text: "Happiness is not something ready-made. It comes from your own actions.", author: "Dalai Lama"},
{text: "If opportunity doesn’t knock, build a door.", author: "Milton Berle"},
{text: "Turn your wounds into wisdom.", author: "Oprah Winfrey"},
{text: "The best way out is always through.", author: "Robert Frost"},
{text: "Try to be a rainbow in someone's cloud.", author: "Maya Angelou"},
{text: "You do not find the happy life. You make it.", author: "Camilla Eyring Kimball"},
{text: "The best way to predict the future is to create it.", author: "Peter Drucker"},
{text: "What lies behind us and what lies before us are tiny matters compared to what lies within us.", author: "Ralph Waldo Emerson"},
{text: "Out of the mountain of despair, a stone of hope.", author: "Martin Luther King Jr."},
{text: "I have not failed. I've just found 10,000 ways that won't work.", author: "Thomas A. Edison"},
{text: "A person who never made a mistake never tried anything new.", author: "Albert Einstein"}
];
function getquote() {
const random = quotes[Math.floor(Math.random() * quotes.length)];
quote.innerHTML = `${random.text}`;
author.innerHTML = `${random.author}`;
}
function tweetQuote() {
const text = `"${quote.innerText}" ${author.innerText}`;
const twitterURL = `https://twitter.com/intent/tweet?text=${encodeURIComponent(text)}`;
window.open(twitterURL, "_blank");
}
getquote();
window.getquote = getquote;
</script>
</body>
</html>