-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
181 lines (174 loc) · 7.69 KB
/
popup.html
File metadata and controls
181 lines (174 loc) · 7.69 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fragmentum</title>
<link rel="stylesheet" href="styles/popup.css" />
</head>
<body>
<div class="popup-container">
<header class="popup-header">
<div class="header-content">
<div class="logo-container">
<h1 class="logo">Fragmentum</h1>
<div class="help-icon-wrapper">
<button
class="help-icon"
aria-label="How to use Fragmentum"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<circle cx="12" cy="12" r="10"></circle>
<path
d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
></path>
<line
x1="12"
y1="17"
x2="12.01"
y2="17"
></line>
</svg>
</button>
<div class="help-tooltip">
<p class="help-tooltip-title">
How to add highlights:
</p>
<ol class="help-tooltip-steps">
<li>Select text on any webpage</li>
<li>
Right-click and choose "Copy link to
highlight"
</li>
<li>
Paste the link in the input field below
</li>
<li>Click "Add" to save the highlight</li>
</ol>
</div>
</div>
</div>
<span class="highlight-count" id="highlight-count"
>0 highlights</span
>
</div>
</header>
<main class="popup-main">
<section class="input-section">
<input
type="text"
id="url-input"
class="url-input"
placeholder="Paste link to highlight..."
/>
<button id="add-btn" class="btn btn-add">
<svg
class="btn-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path d="M12 5v14M5 12h14"></path>
</svg>
Add
</button>
</section>
<div class="highlights-list" id="highlights-list">
<!-- Populated by JavaScript -->
</div>
<div class="empty-state" id="empty-state">
<svg
class="empty-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path
d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101"
></path>
<path
d="M10.172 13.828a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.102 1.101"
></path>
</svg>
<p class="empty-title">No highlights on this page</p>
<p class="empty-hint">
Use browser's "Copy link to highlight" and paste above.
</p>
</div>
<div class="loading-state" id="loading-state">
<div class="spinner"></div>
<p>Loading highlights...</p>
</div>
</main>
<footer class="popup-footer">
<button id="compile-btn" class="btn btn-primary" disabled>
<svg
class="btn-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path
d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"
></path>
</svg>
Compile & Copy
</button>
<button id="clear-btn" class="btn btn-secondary" disabled>
<svg
class="btn-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
></path>
</svg>
Clear All
</button>
<div class="menu-container">
<button id="menu-btn" class="menu-btn" title="More options">
<svg viewBox="0 0 24 24" fill="currentColor">
<circle cx="12" cy="5" r="2"></circle>
<circle cx="12" cy="12" r="2"></circle>
<circle cx="12" cy="19" r="2"></circle>
</svg>
</button>
<div class="menu-dropdown" id="menu-dropdown">
<button
id="clear-all-global-btn"
class="menu-item menu-item-danger"
>
<svg
class="menu-item-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
></path>
</svg>
Clear highlights globally
</button>
</div>
</div>
</footer>
</div>
<div class="toast" id="toast">
<span class="toast-message" id="toast-message"></span>
</div>
<script src="scripts/popup.iife.js"></script>
</body>
</html>