Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (71 loc) · 2.85 KB
/
Copy pathindex.html
File metadata and controls
78 lines (71 loc) · 2.85 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Random Quote Generator</title>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<main class="wrap">
<header class="hero">
<h1>🎲 Random Quote Generator</h1>
<p class="muted">Loops, conditionals, array methods, objects, and DOM updates — all in one neat project.</p>
</header>
<!-- Display area -->
<section class="card" aria-live="polite" aria-label="Quote display">
<div id="display" class="display">
<blockquote id="quoteTxt">Press “Generate Quote” to start.</blockquote>
<div class="byline">
<span id="authorTxt"></span>
<span id="likes" class="likes" title="Likes">👍 <span id="likeCount">0</span></span>
</div>
</div>
<div class="row buttons">
<button id="btnRandom" class="btn primary">🔁 Generate Quote</button>
<button id="btnLike" class="btn">👍 Like</button>
<button id="btnCharsSpace" class="btn">🔡 Chars (with spaces)</button>
<button id="btnCharsNoSpace" class="btn">🔡 Chars (no spaces)</button>
<button id="btnWords" class="btn">🧮 Word count</button>
</div>
<div id="metrics" class="metrics muted"></div>
</section>
<!-- Add new quote -->
<section class="card">
<h2>➕ Add a quote</h2>
<form id="addForm" class="form" novalidate>
<label>
Quote
<textarea id="newQuote" name="quote" rows="3" placeholder="The impediment to action advances action. What stands in the way becomes the way."></textarea>
</label>
<label>
Author
<input id="newAuthor" name="author" type="text" placeholder="Marcus Aurelius" />
</label>
<button class="btn" type="submit">Add</button>
</form>
</section>
<!-- Filter by author -->
<section class="card">
<h2>🔎 Filter by author</h2>
<form id="filterForm" class="form" novalidate>
<label>
Author name
<input id="filterAuthor" name="author" type="text" placeholder="e.g., Maya Angelou" />
</label>
<div class="row buttons">
<button class="btn" type="submit">Filter</button>
<button id="btnClearFilter" class="btn secondary" type="button">Clear</button>
<button id="btnPrev" class="btn" type="button" disabled>⏮️ Previous</button>
<button id="btnNext" class="btn" type="button" disabled>⏭️ Next</button>
</div>
<p id="filterStatus" class="muted"></p>
</form>
</section>
<footer class="muted foot">
<p>Built for practice — conditionals, arrow functions, array methods, and DOM manipulation. ✨</p>
</footer>
</main>
<script src="js/app.js"></script>
</body>
</html>