-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
93 lines (86 loc) · 3.83 KB
/
index.html
File metadata and controls
93 lines (86 loc) · 3.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./src/styles.css">
<link rel="shortcut icon" href="./public/knowledge_icon.svg" type="image/x-icon">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=book" />
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=thumb_down" />
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=thumb_up" />
<title>Did you know</title>
</head>
<body>
<div class="container">
<header>
<nav>
<div class="logo">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-open">
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
</svg>
<h1>Did you know?</h1>
</div>
<button class="share-fact" id="open-btn">Share a fact</button>
</nav>
</header>
<main>
<aside class="categories">
<h3>Categories</h3>
<button class="categories-button active" data-category="all">All</button>
<button class="categories-button" data-category="technology">Technology</button>
<button class="categories-button" data-category="science">Science</button>
<button class="categories-button" data-category="finance">Finance</button>
<button class="categories-button" data-category="society">Society</button>
<button class="categories-button" data-category="entertainment">Entertainment</button>
<button class="categories-button" data-category="health">Health</button>
<button class="categories-button" data-category="history">History</button>
<button class="categories-button" data-category="news">News</button>
</aside>
<section class="facts">
<div class="facts-bar">
<h2>Latest facts</h2>
<div class="button-facts">
<button class="button-facts-button" data-factsort="newest">Newest</button>
<button class="button-facts-button" data-factsort ="popularity">Popular</button>
</div>
</div>
<div class="items">
</div>
</section>
<!-- DIALOG -->
<dialog id="modal">
<form method="dialog" id="factForm">
<div class="header">
<span>Share a Fact</span>
<button type="button" id="close-btn">✖</button>
</div>
<textarea name="fact" placeholder="Share a fact with the world..." maxlength="200" required
class="text-area"></textarea>
<span class="character-counter">200</span>
<div class="row">
<input type="url" name="source" placeholder="Trustworthy source URL" required />
<select name="category" required>
<option disabled selected value="">Choose category</option>
<option>Science</option>
<option>Technology</option>
<option>History</option>
<option>Nature</option>
<option>Finance</option>
<option>Society</option>
<option>Entertainment</option>
<option>Health</option>
</select>
</div>
<button type="submit" class="post-btn">Post</button>
</form>
</dialog>
<script type="module" src="./src/modal.ts"></script>
<script type="module" src="./src/main.ts"></script>
</main>
</div>
</body>
</html>