-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
115 lines (102 loc) · 3.86 KB
/
Copy pathpopup.html
File metadata and controls
115 lines (102 loc) · 3.86 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Keeper</title>
<link rel="stylesheet" href="popup.css" />
</head>
<body>
<main class="popup">
<header class="popup__header">
<p class="popup__eyebrow">Keeper</p>
<h1>Save things you want to learn later</h1>
</header>
<!-- Top card: capture a new item from selected text or manual entry. -->
<section class="card">
<form id="save-form" class="save-form">
<label class="field">
<span class="field__label">Term or topic</span>
<input
id="text-input"
name="text"
type="text"
placeholder="Selected text or type manually"
maxlength="200"
required
/>
</label>
<label class="field">
<span class="field__label">Short note</span>
<textarea
id="note-input"
name="note"
rows="3"
placeholder="Optional note"
maxlength="300"
></textarea>
</label>
<label class="field">
<span class="field__label">Tag</span>
<input
id="tag-input"
name="tag"
type="text"
placeholder="Optional tag"
maxlength="40"
/>
</label>
<div class="page-meta">
<p class="page-meta__label">Current page</p>
<p id="page-title" class="page-meta__title">Loading page title...</p>
<a
id="page-url"
class="page-meta__url"
href="#"
target="_blank"
rel="noreferrer"
>
Loading page URL...
</a>
</div>
<p id="status-message" class="status-message" aria-live="polite"></p>
<button type="submit" class="button button--primary">Save item</button>
</form>
</section>
<!-- Bottom section: shows the list of everything stored locally. -->
<section class="saved-section">
<div class="saved-section__header">
<h2>Saved items</h2>
<span id="item-count" class="saved-section__count">0</span>
</div>
<div class="filter-tabs" role="tablist" aria-label="Saved item filters">
<button type="button" class="filter-tab filter-tab--active" data-filter="all">All</button>
<button type="button" class="filter-tab" data-filter="saved">To Learn</button>
<button type="button" class="filter-tab" data-filter="learned">Learned</button>
</div>
<div class="saved-toolbar">
<label class="sort-control">
<span class="sort-control__label">Sort</span>
<select id="sort-select" class="sort-control__select">
<option value="newest">Newest first</option>
<option value="oldest">Oldest first</option>
<option value="az">A-Z</option>
<option value="learned-last">Learned last</option>
</select>
</label>
<div class="toolbar-actions">
<button type="button" id="export-button" class="button button--secondary">Export</button>
<button type="button" id="import-button" class="button button--secondary">Import</button>
<input id="import-input" type="file" accept="application/json,.json" hidden />
</div>
</div>
<div id="empty-state" class="card empty-state">
<p>Nothing saved yet.</p>
<p class="empty-state__hint">Select text on a page or type a topic manually.</p>
</div>
<ul id="saved-list" class="saved-list"></ul>
</section>
</main>
<script src="popup.js"></script>
</body>
</html>