-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
187 lines (177 loc) · 5.21 KB
/
popup.html
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
182
183
184
185
186
187
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>URL to Markdown Collector</title>
<style>
@font-face {
font-family: 'Atkinson Hyperlegible';
src: url('fonts/Atkinson-Hyperlegible-Regular-102.ttf') format('truetype');
font-weight: normal;
}
@font-face {
font-family: 'Atkinson Hyperlegible';
src: url('fonts/Atkinson-Hyperlegible-Bold-102.ttf') format('truetype');
font-weight: bold;
}
body {
font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
width: 200px;
padding: 10px;
background-color: var(--background-color);
color: var(--text-color);
position: relative;
}
.button-container {
display: flex;
justify-content: space-between;
}
.button-container button {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
height:100px; /* Adjust as needed */
}
.button-icon {
font-size: 2em;
margin-bottom: 5px;
}
.button-text {
color: var(--text-color);
font-size: 0.9em;
margin-bottom: 2px;
}
.shortcut-hint {
font-size: 0.7em;
color: var(--text-color-light);
}
button {
flex: 1;
padding: 8px;
margin: 5px 2px;
background-color: var(--button-background);
color: var(--button-color);
border: 0px;
font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
}
button:hover {
background-color: var(--button-hover-background);
}
.settings-container {
text-align: right;
margin-top: 0px;
margin-bottom: 0px;
padding-bottom: 0px;
}
.settings-container button {
background: none;
border: none;
cursor: pointer;
padding: 0;
}
.settings-container img {
width: 24px;
height: 24px;
}
.info-container {
margin-top: 0px;
font-size: 14px;
color: var(--text-color-light);
}
/* Light theme */
@media (prefers-color-scheme: light) {
:root {
--background-color: #ffffff;
--text-color: #000000;
--text-color-light: #b4b4b4;
--text-color-highlight: #cfa119;
--button-background: #f0f0f0;
--button-hover-background: #e0e0e0;
--button-color: #ffffff;
--button-border: #afafaf;
--accordion-background: #7f7f7f34;
}
}
/* Dark theme */
@media (prefers-color-scheme: dark) {
:root {
--background-color: #121212;
--text-color: #ffffff;
--text-color-light: #b4b4b4;
--text-color-highlight: #e6b41cbd;
--button-background: #33333388;
--button-hover-background: #44444485;
--button-color: #ffffff;
--button-border: #3a3a3a;
--accordion-background: #7e7e7e11;
}
}
.settings-container button:hover img {
filter: brightness(0.8);
}
.accordion {
background-color: var(--accordion-background);
color: var(--button-color);
cursor: pointer;
padding: 5px;
width: 98%;
text-align: center;
border: 0px;
border-radius: 5px;
outline: none;
margin-top: 10px;
}
.accordion:hover {
background-color: var(--button-hover-background);
}
.panel {
padding: 0 8px;
background-color: var(--background-color);
max-height: 0;
overflow: hidden;
}
.settings-container {
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="button-container">
<button id="open-markdown">
<span class="button-icon">↗</span>
<span class="button-text">Open Collection</span>
<span class="shortcut-hint">Alt + M</span>
</button>
<button id="copy-markdown">
<span class="button-icon">📋</span>
<span class="button-text">Copy as Markdown</span>
<span class="shortcut-hint">Alt + C</span>
</button>
</div>
<button class="accordion">How to use</button>
<div class="panel">
<div class="info-container">
<p>
<div>
Press <strong style="color: var(--text-color-highlight);">Copy as Markdown</strong> or use <strong style="color: var(--text-color-highlight);">Alt+C</strong> to save the current page and copy its Markdown to clipboard quickly.<br>
<hr style="border: 0; height: 1px; background-color: rgba(128, 128, 128, 0.3); margin: 5px 0;">
Use <strong style="color: var(--text-color-highlight);">Alt+I</strong> to quickly save (insert) a page without copying.<br>
<hr style="border: 0; height: 1px; background-color: rgba(128, 128, 128, 0.3); margin: 5px 0;">
Open the Markdown collection page to view and manage your saved URLs (<strong style="color: var(--text-color-highlight);">Alt+M</strong>).
</div>
</p>
</div>
</div>
<div class="settings-container">
<button id="open-settings" title="Settings">
<img src="icons/cogwheel.png" alt="Settings">
</button>
</div>
<div id="status-message" style="display: none; margin-top: 10px; text-align: center;"></div>
<script src="scripts/components/popup.js"></script>
<script src="scripts/components/accordion.js"></script>
</body>
</html>