-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
143 lines (122 loc) · 2.94 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
<!DOCTYPE html>
<html lang="en" style="margin:0px;">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Offline Notes</title>
<meta name="description"
content="Keeping your notes safe and private is easy. This page saves your notes in local storage.">
</head>
<style>
:root {
--padding: 1.5rem;
--font-size: 1.5rem;
font-family: monospace;
/* --font-family: serif; */
/* --font-family:sans-serif */
}
body {
width: 700px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f4f4f4;
color: #333;
padding: 20px;
box-sizing: border-box;
min-height: 100%;
overflow-y: scroll;
}
@media (prefers-color-scheme: light) {
:root {
color: black;
background-color: white;
}
}
@media (prefers-color-scheme: dark) {
:root {
color: white;
background-color: black;
}
}
a {
display: flex;
justify-content: end;
align-items: center;
height: var(--padding);
padding-right: var(--padding);
}
#contenteditable {
padding-top: var(--padding);
width: calc(100vw - 2 * var(--padding));
height: calc(100vh - 3 * var(--padding));
font-size: var(--font-size);
font-family: var(--font-family);
}
#contenteditable:focus-visible {
outline: none;
}
#emailinput {
width: 230px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
#clearall {
padding: 10px 20px;
font-size: 16px;
color: white;
background-color: #007BFF;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
#clearall:hover {
background-color: #0056b3;
}
#clearall:active {
background-color: #003d80;
}
a {
display: flex;
justify-content: center;
align-items: center;
padding: 8px 20px;
text-decoration: none;
color: #007BFF;
border: 1px solid #007BFF;
border-radius: 4px;
transition: background-color 0.3s ease, color 0.3s ease;
}
a:hover {
background-color: #007BFF;
color: white;
}
a:active {
background-color: #0056b3;
}
#shortcut {
display: contents;
color: #333;
transition: color 0.3s ease;
}
#shortcut:hover {
color: #0056b3;
}
</style>
<body style="margin:0px;">
<div style="display:flex; align-items:center;justify-content: end; gap: 8px;">
<button id="clearall" style="margin-right:auto">Clear all</button>
<a id="a" href="" download="">
Save to txt
<span id="shortcut" style="display: contents;">(CTRL + S)</span>
</a>
<a id="mailto" href="" download="">mailto</a>
<input id="emailinput" type="text" placeholder="Enter email address">
</div>
<div id="contenteditable" contenteditable></div>
</body>
<script src="popup.js"></script>
</html>