-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
112 lines (100 loc) · 4.05 KB
/
index.html
File metadata and controls
112 lines (100 loc) · 4.05 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Markdown Editor</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/themes/light.css" />
<script type="module">
import { setBasePath } from 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/utilities/base-path.js';
setBasePath('https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/');
</script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/input/input.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/icon/icon.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/button/button.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/button-group/button-group.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/tooltip/tooltip.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/split-panel/split-panel.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/dialog/dialog.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/divider/divider.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/badge/badge.js"></script>
<link data-trunk rel="inline" href="public/js/config.js" />
<script>console.log("config.js loaded");</script>
<link data-trunk rel="inline" href="public/js/editor.js" />
<script>console.log("editor.js loaded");</script>
<style>
body {
margin: 0;
padding: 0;
}
#editor-container {
height: 100vh;
margin: 0;
padding: 20px;
box-sizing: border-box;
}
.markdown-input {
width: 100%;
height: calc(100% - 50px);
border: none;
padding: 1rem;
resize: none;
font-family: monospace;
outline: none;
}
.markdown-preview {
height: 100%;
padding: 1rem;
overflow-y: auto;
}
.command-palette::part(base) {
--sl-focus-ring: none;
background: var(--sl-color-neutral-0);
border: 1px solid var(--sl-color-neutral-200);
border-radius: var(--sl-border-radius-medium);
box-shadow: var(--sl-shadow-large);
}
.command-palette::part(panel) {
width: 300px;
outline: none;
background: var(--sl-color-neutral-0);
padding: 0.5rem;
}
.command-search {
margin-bottom: 1rem;
width: 100%;
background: var(--sl-color-neutral-0);
}
.command-list {
max-height: 300px;
overflow-y: auto;
padding: 0.5rem;
scroll-behavior: smooth;
user-select: none;
outline: none;
background: var(--sl-color-neutral-0);
}
.command-item {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
cursor: pointer;
border-radius: var(--sl-border-radius-medium);
background: transparent;
transition: background-color 0.2s ease;
}
.command-item:hover {
background: var(--sl-color-neutral-100);
}
.command-item.selected {
background: var(--sl-color-primary-100);
}
.command-list:focus {
box-shadow: none;
}
</style>
</head>
<body>
<div id="editor-container" class="editor-container"></div>
</body>
</html>