Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Sprint-3/quote-generator/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title here</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script defer src="quotes.js"></script>
</head>
<body>
<h1>hello there</h1>
<p id="quote"></p>
<blockquote id="quote"></blockquote>
<p id="author"></p>
<button type="button" id="new-quote">New quote</button>
<button type="button" id="new-quote" onclick="generate()">New quote</button>
</body>
</html>
9 changes: 9 additions & 0 deletions Sprint-3/quote-generator/quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,3 +491,12 @@ const quotes = [
];

// call pickFromArray with the quotes array to check you get a random quote

function generate() {
const pick = pickFromArray(quotes);

document.getElementById("quote").innerHTML = `"${pick.quote}"`;
document.getElementById("author").innerHTML = `By ${pick.author}`;
}

generate();
10 changes: 10 additions & 0 deletions Sprint-3/quote-generator/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/** Write your CSS in here **/

#author {
font-size: 25px;
}

#quote {
font-size: 30px;
font-style: italic;
font-weight: bold;
}
Loading