margins 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +225 -0
- package/bin/margins.js +107 -0
- package/lib/browser.js +44 -0
- package/lib/cli.js +86 -0
- package/lib/files.js +194 -0
- package/lib/links.js +314 -0
- package/lib/paths.js +159 -0
- package/lib/search.js +117 -0
- package/lib/security.js +89 -0
- package/lib/tree.js +126 -0
- package/package.json +51 -0
- package/public/app.js +1222 -0
- package/public/favicon.svg +1 -0
- package/public/index.html +119 -0
- package/public/style.css +781 -0
- package/server.js +325 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#1f6feb"/><path d="M9 7h10l5 5v13H9z" fill="#fff"/><path d="M12 14h9M12 18h9M12 22h6" stroke="#1f6feb" stroke-width="2" stroke-linecap="round"/><path d="M6 7v18" stroke="#fff" stroke-width="2" stroke-linecap="round" opacity=".7"/></svg>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>margins</title>
|
|
7
|
+
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
|
8
|
+
<link rel="stylesheet" href="style.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<header class="topbar">
|
|
12
|
+
<div class="brand">
|
|
13
|
+
<button id="sidebarToggle" class="icon-button" type="button" aria-label="Show or hide the files" aria-expanded="true" title="Files">
|
|
14
|
+
<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M1.75 2.5h12.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Zm0 5h12.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Zm0 5h12.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Z"/></svg>
|
|
15
|
+
</button>
|
|
16
|
+
<span class="wordmark">margins</span>
|
|
17
|
+
<span id="rootName" class="root-name"></span>
|
|
18
|
+
</div>
|
|
19
|
+
<nav class="top-actions" aria-label="Find">
|
|
20
|
+
<button id="quickOpenButton" class="pill" type="button" title="Open a file by name">
|
|
21
|
+
Open file <kbd class="shortcut" data-mod>P</kbd>
|
|
22
|
+
</button>
|
|
23
|
+
<button id="searchButton" class="pill" type="button" title="Search every file">
|
|
24
|
+
Search <kbd class="shortcut" data-mod data-shift>F</kbd>
|
|
25
|
+
</button>
|
|
26
|
+
<button id="helpButton" class="icon-button" type="button" aria-label="Keyboard shortcuts" title="Keyboard shortcuts (?)">?</button>
|
|
27
|
+
</nav>
|
|
28
|
+
</header>
|
|
29
|
+
|
|
30
|
+
<div class="layout">
|
|
31
|
+
<aside id="sidebar" class="sidebar" aria-label="Files">
|
|
32
|
+
<div class="sidebar-head">
|
|
33
|
+
<span>Files</span>
|
|
34
|
+
<button id="newFileButton" class="text-button" type="button" title="Create a new file">+ New</button>
|
|
35
|
+
</div>
|
|
36
|
+
<ul id="tree" class="tree" role="tree" aria-label="Folder contents"></ul>
|
|
37
|
+
<p id="treeNote" class="tree-note hidden"></p>
|
|
38
|
+
</aside>
|
|
39
|
+
|
|
40
|
+
<main id="main" class="main">
|
|
41
|
+
<div id="docBar" class="doc-bar hidden">
|
|
42
|
+
<nav id="breadcrumbs" class="breadcrumbs" aria-label="Where this file is"></nav>
|
|
43
|
+
<div class="doc-actions">
|
|
44
|
+
<span id="saveState" class="save-state" role="status" aria-live="polite"></span>
|
|
45
|
+
<button id="editButton" class="button" type="button" title="Edit this file (e)">Edit</button>
|
|
46
|
+
<button id="saveButton" class="button primary hidden" type="button">Save</button>
|
|
47
|
+
<button id="doneButton" class="button hidden" type="button">Done</button>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="banner" class="banner hidden" role="alert">
|
|
52
|
+
<span id="bannerText"></span>
|
|
53
|
+
<span class="banner-actions">
|
|
54
|
+
<button id="bannerPrimary" class="button" type="button"></button>
|
|
55
|
+
<button id="bannerSecondary" class="button" type="button"></button>
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div id="viewer" class="viewer">
|
|
60
|
+
<article id="document" class="markdown-body"></article>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div id="editor" class="editor hidden">
|
|
64
|
+
<textarea id="source" class="source" spellcheck="false" aria-label="File contents"></textarea>
|
|
65
|
+
<div id="preview" class="preview markdown-body" aria-label="Preview"></div>
|
|
66
|
+
</div>
|
|
67
|
+
</main>
|
|
68
|
+
|
|
69
|
+
<aside id="context" class="context hidden" aria-label="About this file">
|
|
70
|
+
<section id="outlineSection" class="context-section hidden">
|
|
71
|
+
<h2>On this page</h2>
|
|
72
|
+
<ol id="outline" class="outline"></ol>
|
|
73
|
+
</section>
|
|
74
|
+
<section id="backlinksSection" class="context-section hidden">
|
|
75
|
+
<h2>Linked from <span id="backlinkCount" class="count"></span></h2>
|
|
76
|
+
<ul id="backlinks" class="backlinks"></ul>
|
|
77
|
+
</section>
|
|
78
|
+
</aside>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<dialog id="quickOpen" class="palette" aria-label="Open a file">
|
|
82
|
+
<input id="quickOpenInput" class="palette-input" type="text" placeholder="Type a file name…" autocomplete="off" spellcheck="false">
|
|
83
|
+
<ul id="quickOpenResults" class="palette-results" role="listbox"></ul>
|
|
84
|
+
</dialog>
|
|
85
|
+
|
|
86
|
+
<dialog id="search" class="palette palette-wide" aria-label="Search every file">
|
|
87
|
+
<input id="searchInput" class="palette-input" type="text" placeholder="Search every file…" autocomplete="off" spellcheck="false">
|
|
88
|
+
<p id="searchSummary" class="palette-summary"></p>
|
|
89
|
+
<ul id="searchResults" class="palette-results" role="listbox"></ul>
|
|
90
|
+
</dialog>
|
|
91
|
+
|
|
92
|
+
<dialog id="newFile" class="palette" aria-label="Create a file">
|
|
93
|
+
<form id="newFileForm" method="dialog">
|
|
94
|
+
<label class="palette-label" for="newFileInput">New file, relative to the folder</label>
|
|
95
|
+
<input id="newFileInput" class="palette-input" type="text" placeholder="notes/idea.md" autocomplete="off" spellcheck="false">
|
|
96
|
+
<p id="newFileError" class="palette-error hidden"></p>
|
|
97
|
+
</form>
|
|
98
|
+
</dialog>
|
|
99
|
+
|
|
100
|
+
<dialog id="help" class="palette" aria-labelledby="helpTitle">
|
|
101
|
+
<h2 id="helpTitle" class="help-title">Keyboard</h2>
|
|
102
|
+
<dl class="help-keys">
|
|
103
|
+
<dt><kbd class="shortcut" data-mod>P</kbd></dt><dd>Open a file by name</dd>
|
|
104
|
+
<dt><kbd class="shortcut" data-mod data-shift>F</kbd></dt><dd>Search every file</dd>
|
|
105
|
+
<dt><kbd>e</kbd></dt><dd>Edit this file</dd>
|
|
106
|
+
<dt><kbd class="shortcut" data-mod>S</kbd></dt><dd>Save</dd>
|
|
107
|
+
<dt><kbd>Esc</kbd></dt><dd>Close a panel, or stop editing</dd>
|
|
108
|
+
<dt><kbd>[</kbd> <kbd>]</kbd></dt><dd>Back and forward</dd>
|
|
109
|
+
<dt><kbd>?</kbd></dt><dd>This list</dd>
|
|
110
|
+
</dl>
|
|
111
|
+
<p class="help-note">Links between files work the way GitHub reads them — <code>[text](other.md)</code> — and the way Obsidian does — <code>[[Other]]</code>. Nothing is written into this folder except the files you save.</p>
|
|
112
|
+
</dialog>
|
|
113
|
+
|
|
114
|
+
<script src="vendor/marked.js"></script>
|
|
115
|
+
<script src="vendor/purify.js"></script>
|
|
116
|
+
<script src="links.js"></script>
|
|
117
|
+
<script src="app.js"></script>
|
|
118
|
+
</body>
|
|
119
|
+
</html>
|