-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
427 lines (414 loc) · 18 KB
/
Copy pathindex.html
File metadata and controls
427 lines (414 loc) · 18 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<!doctype html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ephemeral</title>
<script type="module" src="/src/main.ts" defer></script>
</head>
<body class="h-full m-0 overflow-hidden bg-zinc-100 dark:bg-zinc-950 flex flex-col">
<!-- Header: Tauri uses data-tauri-drag-region / startDragging for frameless window drag. -->
<div
id="titlebar"
class="w-full flex items-center justify-between px-4 py-2 bg-gray-50 dark:bg-zinc-950 border-b border-zinc-300 dark:border-zinc-800 select-none"
>
<!-- Left: space for native macOS traffic lights -->
<div class="w-20 shrink-0"></div>
<!-- Center: Explicit drag target -->
<div id="titlebar-drag-region" data-tauri-drag-region class="flex-1 min-w-0 h-6"></div>
<!-- Right: Controls -->
<div class="flex space-x-2">
<button
id="info-toggle"
class="px-2 py-2 rounded-lg border border-zinc-200 dark:border-zinc-800 text-gray-800 dark:text-gray-200 hover:bg-zinc-200 dark:hover:bg-zinc-900 focus:outline-none focus:ring-2 focus:ring-zinc-500/20 transition-colors duration-200"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" />
</svg>
</button>
<button
id="theme-toggle"
class="px-2 py-2 rounded-lg border border-zinc-200 dark:border-zinc-800 text-gray-800 dark:text-gray-200 hover:bg-zinc-200 dark:hover:bg-zinc-900 focus:outline-none focus:ring-2 focus:ring-zinc-500/20 transition-colors duration-200"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-moon dark:hidden"
>
<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path>
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-sun hidden dark:block"
>
<circle cx="12" cy="12" r="4"></circle>
<path d="M12 2v2"></path>
<path d="M12 20v2"></path>
<path d="m4.93 4.93 1.41 1.41"></path>
<path d="m17.66 17.66 1.41 1.41"></path>
<path d="M2 12h2"></path>
<path d="M20 12h2"></path>
<path d="m4.93 19.07 1.41-1.41"></path>
<path d="m17.66 6.34 1.41-1.41"></path>
</svg>
</button>
</div>
</div>
<!-- Main Content -->
<div class="flex-grow relative min-h-0 flex flex-col">
<!-- Save Modal -->
<div id="save-modal" class="absolute inset-0 flex items-center justify-center z-50 hidden">
<div
class="bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-sm shadow-2xl overflow-hidden min-w-80"
>
<div class="px-4 pt-4 pb-3 border-b border-zinc-100 dark:border-zinc-800">
<label
for="save-filename"
class="block text-[10px] font-black uppercase tracking-[0.2em] text-zinc-500 mb-2"
>File Name</label
>
<input
id="save-filename"
type="text"
class="w-full bg-transparent text-xs font-mono text-zinc-900 dark:text-zinc-100 border border-zinc-200 dark:border-zinc-700 rounded-sm px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-zinc-500/20"
placeholder="ephemeral"
/>
</div>
<div class="flex">
<button
id="save-as-md"
class="flex-1 px-5 py-2 text-[10px] font-black uppercase tracking-[0.2em] text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-50 dark:hover:bg-zinc-800 focus:bg-zinc-900 dark:focus:bg-zinc-100 focus:text-white dark:focus:text-zinc-900 focus:outline-none transition-colors border-r border-zinc-100 dark:border-zinc-800"
>
Markdown
</button>
<button
id="save-as-txt"
class="flex-1 px-5 py-2 text-[10px] font-black uppercase tracking-[0.2em] text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-50 dark:hover:bg-zinc-800 focus:bg-zinc-900 dark:focus:bg-zinc-100 focus:text-white dark:focus:text-zinc-900 focus:outline-none transition-colors"
>
Text
</button>
</div>
</div>
</div>
<div
id="prompt-modal"
class="absolute inset-0 bg-white/10 dark:bg-black/10 backdrop-blur-[2px] flex items-center justify-center z-50 hidden"
>
<div
class="bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-sm p-1 w-80 shadow-2xl"
>
<input
id="prompt-input"
type="text"
class="w-full bg-transparent text-xs font-mono text-zinc-800 dark:text-zinc-100 px-3 py-2 focus:outline-none"
placeholder="URL..."
/>
</div>
</div>
<div
id="info-overlay"
class="absolute inset-0 bg-white dark:bg-zinc-950 flex items-center justify-center z-40 hidden"
>
<div
class="text-left text-zinc-600 dark:text-zinc-400 max-w-2xl w-full p-8 md:p-12 overflow-y-auto max-h-full"
>
<div class="flex items-center justify-between mb-12">
<h2 class="text-3xl font-black tracking-tighter text-zinc-900 dark:text-zinc-100">
EPHEMERAL
</h2>
<button
id="info-close"
class="p-2 -mr-2 text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition-all duration-200 hover:rotate-90"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M18 6 6 18" />
<path d="m6 6 12 12" />
</svg>
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-16">
<div class="space-y-8">
<div>
<h3
class="text-[10px] font-black uppercase tracking-[0.2em] text-zinc-400 dark:text-zinc-500 mb-4"
>
Philosophy
</h3>
<p class="text-sm leading-relaxed text-zinc-600 dark:text-zinc-300">
Your text exists only while the window lives. Export explicitly or lose it
forever.
</p>
</div>
<div>
<h3
class="text-[10px] font-black uppercase tracking-[0.2em] text-zinc-400 dark:text-zinc-500 mb-4"
>
Application
</h3>
<div class="space-y-4 text-sm">
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Save / Export</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘S</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Info Pane</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘/</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Toggle Markdown Mode</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘M</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Set Export Folder</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘E</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Fullscreen</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘⇧F</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Close/Quit</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘W / ⌘Q</span
>
</div>
</div>
</div>
</div>
<div class="space-y-8">
<div>
<h3
class="text-[10px] font-black uppercase tracking-[0.2em] text-zinc-400 dark:text-zinc-500 mb-4"
>
Markdown Editor
</h3>
<div class="space-y-4 text-sm">
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Bold</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘B</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Link / Image</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘K / ⌘⇧I</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Lists</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘⇧L / ⌘⇧O / ⌘⇧T</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Table</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘⇧X</span
>
</div>
<div
class="flex justify-between items-baseline group border-b border-zinc-100 dark:border-zinc-900 pb-1.5"
>
<span
class="text-zinc-500 group-hover:text-zinc-800 dark:group-hover:text-zinc-300 transition-colors"
>Headings</span
>
<span
class="font-mono text-[11px] bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded text-zinc-900 dark:text-zinc-100"
>⌘1-6</span
>
</div>
</div>
</div>
<div class="pt-8">
<a
href="https://github.com/whaleen/ephemeral"
data-external
class="inline-flex items-center text-[10px] font-black uppercase tracking-[0.2em] text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition-all duration-300 group"
>
<span
class="border-b-2 border-zinc-100 dark:border-zinc-800 group-hover:border-zinc-900 dark:group-hover:border-zinc-100 pb-0.5"
>Source on GitHub</span
>
<svg
class="ml-2 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"
xmlns="http://www.w3.org/2000/svg"
width="14"
height="14"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M7 7h10v10" />
<path d="M7 17 17 7" />
</svg>
</a>
</div>
</div>
</div>
</div>
</div>
<div
id="editor"
class="w-full h-full relative overflow-y-auto overflow-x-hidden flex-grow"
></div>
</div>
<!-- Footer -->
<div
class="footer-shell footer-mono w-full flex items-center justify-between px-4 py-1 bg-gray-50 dark:bg-zinc-950 border-t border-gray-300 dark:border-zinc-800"
>
<!-- Left Section -->
<div class="footer-left flex items-center space-x-3">
<div
id="last-export-container"
class="flex items-center space-x-2 text-zinc-400 dark:text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 cursor-pointer hidden"
>
<span id="last-export-dot" class="h-1.5 w-1.5 rounded-full bg-green-500 hidden"></span>
<span id="last-export" class="uppercase tracking-widest"></span>
</div>
</div>
<!-- Right Section -->
<div class="footer-right flex items-center space-x-4">
<!-- Directory Export -->
<div class="flex items-center space-x-2">
<button
id="export-dir-btn"
class="text-zinc-400 dark:text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors duration-200"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path
d="M3 4h4l2 2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6a2 2 0 1 1 2-2z"
/>
</svg>
</button>
<span
id="export-dir-display"
class="text-zinc-400 dark:text-zinc-500 uppercase tracking-widest"
></span>
</div>
</div>
</div>
</body>
</html>