Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
134 lines (123 loc) · 5.03 KB
/
Copy pathindex.html
File metadata and controls
134 lines (123 loc) · 5.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Markdown Editor</title>
<link data-trunk rel="copy-dir" href="public/vendor" />
<link data-trunk rel="inline" href="public/js/runtime-assets.js" />
<script>
// The controller awaits this before initializing toolbar/dialog controls.
window.TerraphimRuntimeAssets.ready = window.TerraphimRuntimeAssets.load();
window.TerraphimRuntimeAssets.ready.catch(error => console.error('Local runtime assets failed:', error));
</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/chrome.js" />
<!-- Decoration registry and inline indicators (issue #8): after the
chrome, before editor.js, which instantiates them. -->
<link data-trunk rel="inline" href="public/js/indicators.js" />
<!-- Ghost layer and selection context menu (issue #11). -->
<link data-trunk rel="inline" href="public/js/selection-menu.js" />
<!-- Trim levels (issue #15), then the Lab popover that hosts them (issue #14): after indicators.js, before editor.js. -->
<link data-trunk rel="inline" href="public/js/trim.js" />
<link data-trunk rel="inline" href="public/js/lab.js" />
<link data-trunk rel="inline" href="public/js/blocks.js" />
<!-- The alternatives side panel (issue #10): after the selection menu
it registers with, before editor.js, which instantiates it. -->
<link data-trunk rel="inline" href="public/js/alternatives-panel.js" />
<!-- Overflow panel (issue #12): after the chrome and selection menu, before editor.js. -->
<link data-trunk rel="inline" href="public/js/overflow.js" />
<!-- Save, open, drafts and the Markdown export view (issues #76, #73): before editor.js, which instantiates it. -->
<link data-trunk rel="inline" href="public/js/persistence.js" />
<!-- Optional graph service: lazy Worker startup, separate from editor WASM. -->
<link data-trunk rel="inline" href="public/js/rolegraph-storage.js" />
<link data-trunk rel="inline" href="public/js/rolegraph-client.js" />
<link data-trunk rel="inline" href="public/js/editor.js" />
<script>console.log("editor.js loaded");</script>
<link data-trunk rel="css" href="public/css/tokens.css" />
<link data-trunk rel="css" href="public/css/write-on.css" />
<link data-trunk rel="css" href="public/css/selection-menu.css" />
<link data-trunk rel="css" href="public/css/lab.css" />
<link data-trunk rel="css" href="public/css/trim.css" />
<link data-trunk rel="css" href="public/css/blocks.css" />
<link data-trunk rel="css" href="public/css/alternatives-panel.css" />
<link data-trunk rel="css" href="public/css/overflow.css" />
<link data-trunk rel="css" href="public/css/persistence.css" />
<!-- <script data-trunk src="public/js/alert.js"></script> -->
<style>
body {
margin: 0;
padding: 0;
}
#app {
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>
<main id="app" aria-label="Markdown editor"></main>
</body>
</html>