repoview 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/CONTRIBUTING.md +32 -0
- package/DEVELOPMENT.md +69 -0
- package/LICENSE +22 -0
- package/README.md +75 -0
- package/package.json +53 -0
- package/public/app.css +443 -0
- package/public/app.js +120 -0
- package/src/cli.js +72 -0
- package/src/gitignore.js +34 -0
- package/src/linkcheck.js +312 -0
- package/src/markdown.js +344 -0
- package/src/server.js +487 -0
- package/src/views.js +373 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve `repoview`.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Run
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm start -- --repo /path/to/repo --port 3000
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Lint
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run lint
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## What to work on
|
|
24
|
+
|
|
25
|
+
High-impact contributions:
|
|
26
|
+
- GitHub-parity improvements for Markdown rendering
|
|
27
|
+
- Performance on large repos (pagination, caching, faster scanning)
|
|
28
|
+
- UI polish (especially mobile)
|
|
29
|
+
- Security hardening (path handling, sanitization rules)
|
|
30
|
+
|
|
31
|
+
Implementation notes: `DEVELOPMENT.md`.
|
|
32
|
+
|
package/DEVELOPMENT.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
This doc collects the “how it works” details so `README.md` can stay product-focused.
|
|
4
|
+
|
|
5
|
+
## Project layout
|
|
6
|
+
|
|
7
|
+
- `src/server.js`: Express server + routes (`/tree`, `/blob`, `/raw`, `/events`)
|
|
8
|
+
- `src/markdown.js`: Markdown rendering + link/image rewriting + sanitization
|
|
9
|
+
- `src/linkcheck.js`: broken-link scanner (Markdown → rendered HTML → internal link validation)
|
|
10
|
+
- `src/gitignore.js`: `.gitignore` matcher (used for hiding + scanner noise reduction)
|
|
11
|
+
- `src/views.js`: HTML templates (mobile-first top bar + GitHub-style Markdown shell)
|
|
12
|
+
- `public/`: CSS + client JS (live reload, KaTeX render, Mermaid render, query preservation)
|
|
13
|
+
|
|
14
|
+
## Running locally
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install
|
|
18
|
+
npm start -- --repo /path/to/repo --port 3000
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Useful flags:
|
|
22
|
+
- `--watch` / `--no-watch` (watch is on by default)
|
|
23
|
+
- `--host 0.0.0.0` to access from other devices on the network
|
|
24
|
+
|
|
25
|
+
## Routes
|
|
26
|
+
|
|
27
|
+
- `GET /tree/<path>`: directory listing (applies `.gitignore` by default; `?ignored=1` shows ignored)
|
|
28
|
+
- `GET /blob/<path>`: file view (Markdown rendered; non-Markdown shown as highlighted text)
|
|
29
|
+
- `GET /raw/<path>`: raw bytes (used for images and downloads)
|
|
30
|
+
- `GET /events`: Server-Sent Events stream for live reload
|
|
31
|
+
- `GET /broken-links`: HTML report for broken internal links (Markdown docs)
|
|
32
|
+
- `GET /broken-links.json`: report state + raw results
|
|
33
|
+
|
|
34
|
+
## Link rewriting rules
|
|
35
|
+
|
|
36
|
+
`src/markdown.js` rewrites relative Markdown links so they stay inside the repo UI:
|
|
37
|
+
|
|
38
|
+
- Links → `/blob/<path>` (or `/tree/<path>` when the link ends with `/`)
|
|
39
|
+
- Images → `/raw/<path>`
|
|
40
|
+
- Same rewriting is applied to HTML inside Markdown (`<a href>`, `<img src>`) after sanitization.
|
|
41
|
+
- Paths that would escape the repo root (leading `../`) are clamped to the repo root (GitHub-like).
|
|
42
|
+
- Already-internal links (`/blob/…`, `/tree/…`, `/raw/…`, `/static/…`) are not rewritten again.
|
|
43
|
+
|
|
44
|
+
## Markdown “GitHub-like” features
|
|
45
|
+
|
|
46
|
+
The renderer is not `cmark-gfm`, but aims to be “close enough” for typical README/docs:
|
|
47
|
+
|
|
48
|
+
- Tables, strikethrough, autolinks
|
|
49
|
+
- Task lists (`- [x]`)
|
|
50
|
+
- Footnotes
|
|
51
|
+
- Emoji shortcodes (`:smile:`)
|
|
52
|
+
- Callouts (`> [!NOTE]`, `> [!TIP]`, …)
|
|
53
|
+
- Math (KaTeX auto-render on the client)
|
|
54
|
+
- Mermaid fenced blocks
|
|
55
|
+
|
|
56
|
+
## Broken link scanning
|
|
57
|
+
|
|
58
|
+
The scanner renders Markdown, extracts internal `href/src` links, and validates that the referenced repo paths exist.
|
|
59
|
+
|
|
60
|
+
Notes:
|
|
61
|
+
- `.gitignore`d files are hidden by default and are also skipped by the scanner (to reduce noise).
|
|
62
|
+
- The scanner runs at startup and re-runs on filesystem changes when watch is enabled.
|
|
63
|
+
|
|
64
|
+
## Lint
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm run lint
|
|
68
|
+
```
|
|
69
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 repoview contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# repoview
|
|
2
|
+
|
|
3
|
+
GitHub-like repo browsing — without GitHub.
|
|
4
|
+
|
|
5
|
+
When platforms change pricing/terms (even for “bring-your-own-runner” CI), it’s a reminder that Git hosting can turn into a dependency and a risk. `repoview` keeps the day-to-day “GitHub UI” experience local: browse, read docs, and share a repo without pushing it anywhere.
|
|
6
|
+
|
|
7
|
+
Not affiliated with GitHub.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- GitHub-like browsing for local repos (tree / file / raw views)
|
|
12
|
+
- GitHub-style Markdown rendering (README-friendly; close-to-GitHub)
|
|
13
|
+
- Live reload when files change (SSE with polling fallback)
|
|
14
|
+
- Broken internal link discovery for docs (`/broken-links`)
|
|
15
|
+
- Respects `.gitignore` by default (toggleable)
|
|
16
|
+
|
|
17
|
+
## Quick start (from source)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install
|
|
21
|
+
npm start -- --repo /path/to/your/repo --port 3000
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then open `http://localhost:3000`.
|
|
25
|
+
|
|
26
|
+
## Quick start (npx)
|
|
27
|
+
|
|
28
|
+
After publishing to npm:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx repoview --repo /path/to/your/repo --port 3000
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Why
|
|
35
|
+
|
|
36
|
+
- Keep GitHub as a remote, not your developer portal.
|
|
37
|
+
- Share private repos/docs on a LAN without pushing or mirroring.
|
|
38
|
+
- Work offline / in restricted networks with the same browsing UX.
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm start -- --repo /path/to/repo [--host 127.0.0.1] [--port 3000] [--no-watch]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Common flags:
|
|
47
|
+
- `--repo`: repo root
|
|
48
|
+
- `--host`, `--port`: bind address/port
|
|
49
|
+
- `--no-watch`: disable live reload + auto re-scan
|
|
50
|
+
|
|
51
|
+
## Share on LAN (optional)
|
|
52
|
+
|
|
53
|
+
Bind to all interfaces, then open the host URL from another device:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm start -- --repo /path/to/repo --host 0.0.0.0 --port 8890
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## UI toggles
|
|
60
|
+
|
|
61
|
+
- `?ignored=1` shows files ignored by the repo’s `.gitignore` (default: hidden)
|
|
62
|
+
- `?watch=0` disables browser auto-refresh for that tab
|
|
63
|
+
|
|
64
|
+
## Development
|
|
65
|
+
|
|
66
|
+
- Implementation details: [`DEVELOPMENT.md`](DEVELOPMENT.md)
|
|
67
|
+
- CLI usage: `npm start -- --help`
|
|
68
|
+
|
|
69
|
+
## Contributing
|
|
70
|
+
|
|
71
|
+
- Contributing guide: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT — see [`LICENSE`](LICENSE).
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "repoview",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "GitHub-like repo browsing for local Git repositories (Markdown, live reload, broken link scanner).",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "Hang Yin <hangyin@phala.com>",
|
|
9
|
+
"bin": {
|
|
10
|
+
"repoview": "src/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src/",
|
|
14
|
+
"public/",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"DEVELOPMENT.md",
|
|
18
|
+
"CONTRIBUTING.md"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"git",
|
|
25
|
+
"repository",
|
|
26
|
+
"viewer",
|
|
27
|
+
"markdown",
|
|
28
|
+
"github",
|
|
29
|
+
"docs",
|
|
30
|
+
"live-reload"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"start": "node src/cli.js",
|
|
34
|
+
"dev": "node src/cli.js --watch",
|
|
35
|
+
"lint": "node -c src/cli.js && node -c src/server.js && node -c src/markdown.js && node -c src/views.js"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"chokidar": "^4.0.3",
|
|
39
|
+
"express": "^4.21.2",
|
|
40
|
+
"github-markdown-css": "^5.8.1",
|
|
41
|
+
"github-slugger": "^2.0.0",
|
|
42
|
+
"highlight.js": "^11.11.1",
|
|
43
|
+
"ignore": "^7.0.5",
|
|
44
|
+
"katex": "^0.16.22",
|
|
45
|
+
"markdown-it": "^14.1.0",
|
|
46
|
+
"markdown-it-emoji": "^3.0.0",
|
|
47
|
+
"markdown-it-footnote": "^4.0.0",
|
|
48
|
+
"markdown-it-task-lists": "^2.1.1",
|
|
49
|
+
"mermaid": "^11.12.0",
|
|
50
|
+
"mime-types": "^2.1.35",
|
|
51
|
+
"sanitize-html": "^2.17.0"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/public/app.css
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
--bg: #ffffff;
|
|
4
|
+
--panel: #ffffff;
|
|
5
|
+
--text: #24292f;
|
|
6
|
+
--muted: #57606a;
|
|
7
|
+
--border: #d0d7de;
|
|
8
|
+
--subtleBg: #f6f8fa;
|
|
9
|
+
--btn: #f6f8fa;
|
|
10
|
+
--btnHover: #f3f4f6;
|
|
11
|
+
--accent: #0969da;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html,
|
|
15
|
+
body {
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
margin: 0;
|
|
21
|
+
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
|
|
22
|
+
"Apple Color Emoji", "Segoe UI Emoji";
|
|
23
|
+
background: var(--bg);
|
|
24
|
+
color: var(--text);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
a {
|
|
28
|
+
color: inherit;
|
|
29
|
+
text-decoration: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.container {
|
|
33
|
+
padding: 16px;
|
|
34
|
+
max-width: 980px;
|
|
35
|
+
margin: 0 auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.topbar {
|
|
39
|
+
position: sticky;
|
|
40
|
+
top: 0;
|
|
41
|
+
z-index: 10;
|
|
42
|
+
background: rgba(255, 255, 255, 0.92);
|
|
43
|
+
backdrop-filter: saturate(180%) blur(8px);
|
|
44
|
+
border-bottom: 1px solid var(--border);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.topbar-row {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 10px;
|
|
51
|
+
padding: 12px 12px 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.brand {
|
|
55
|
+
font-weight: 700;
|
|
56
|
+
letter-spacing: 0.2px;
|
|
57
|
+
max-width: 50vw;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.meta {
|
|
64
|
+
margin-left: auto;
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: 8px;
|
|
67
|
+
align-items: center;
|
|
68
|
+
color: var(--muted);
|
|
69
|
+
font-size: 13px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.meta-actions {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
gap: 8px;
|
|
75
|
+
align-items: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.meta-menu {
|
|
79
|
+
display: none;
|
|
80
|
+
position: relative;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.meta-menu summary {
|
|
84
|
+
list-style: none;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.meta-menu summary::-webkit-details-marker {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.menu-panel {
|
|
93
|
+
position: absolute;
|
|
94
|
+
right: 0;
|
|
95
|
+
top: calc(100% + 8px);
|
|
96
|
+
min-width: 210px;
|
|
97
|
+
border: 1px solid var(--border);
|
|
98
|
+
border-radius: 6px;
|
|
99
|
+
background: var(--panel);
|
|
100
|
+
padding: 6px;
|
|
101
|
+
box-shadow: 0 8px 24px rgba(31, 35, 40, 0.12);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.menu-item {
|
|
105
|
+
display: block;
|
|
106
|
+
padding: 8px 10px;
|
|
107
|
+
border-radius: 6px;
|
|
108
|
+
color: var(--text);
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.menu-item:hover {
|
|
113
|
+
background: var(--subtleBg);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.pill {
|
|
117
|
+
padding: 3px 8px;
|
|
118
|
+
border: 1px solid var(--border);
|
|
119
|
+
border-radius: 999px;
|
|
120
|
+
background: #fff;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mono {
|
|
124
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
125
|
+
"Liberation Mono", "Courier New", monospace;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.breadcrumbs {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 6px;
|
|
132
|
+
overflow-x: auto;
|
|
133
|
+
padding: 0 12px 12px;
|
|
134
|
+
scrollbar-width: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.breadcrumbs::-webkit-scrollbar {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.crumb {
|
|
142
|
+
color: var(--muted);
|
|
143
|
+
font-size: 13px;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.crumb:hover {
|
|
148
|
+
color: var(--text);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.crumb-sep {
|
|
152
|
+
color: rgba(31, 35, 40, 0.28);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.panel {
|
|
156
|
+
border: 1px solid var(--border);
|
|
157
|
+
border-radius: 6px;
|
|
158
|
+
background: var(--panel);
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.container > .panel + .panel {
|
|
163
|
+
margin-top: 12px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.panel-title {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
gap: 10px;
|
|
170
|
+
padding: 12px;
|
|
171
|
+
border-bottom: 1px solid var(--border);
|
|
172
|
+
background: var(--subtleBg);
|
|
173
|
+
font-weight: 600;
|
|
174
|
+
font-size: 14px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.filename {
|
|
178
|
+
overflow: hidden;
|
|
179
|
+
text-overflow: ellipsis;
|
|
180
|
+
white-space: nowrap;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.spacer {
|
|
184
|
+
flex: 1;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.btn {
|
|
188
|
+
font-weight: 600;
|
|
189
|
+
font-size: 14px;
|
|
190
|
+
padding: 5px 10px;
|
|
191
|
+
border-radius: 6px;
|
|
192
|
+
border: 1px solid var(--border);
|
|
193
|
+
background: var(--btn);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.btn:hover {
|
|
197
|
+
background: var(--btnHover);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.link {
|
|
201
|
+
color: var(--accent);
|
|
202
|
+
}
|
|
203
|
+
.link:hover {
|
|
204
|
+
text-decoration: underline;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.table-wrap {
|
|
208
|
+
overflow-x: auto;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.file-table {
|
|
212
|
+
width: 100%;
|
|
213
|
+
border-collapse: collapse;
|
|
214
|
+
min-width: 520px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.file-table th,
|
|
218
|
+
.file-table td {
|
|
219
|
+
padding: 10px 12px;
|
|
220
|
+
border-bottom: 1px solid var(--border);
|
|
221
|
+
font-size: 14px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.file-table th {
|
|
225
|
+
text-align: left;
|
|
226
|
+
color: var(--muted);
|
|
227
|
+
font-size: 12px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.file-table.linkcheck th,
|
|
231
|
+
.file-table.linkcheck td {
|
|
232
|
+
font-size: 13px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.file-table td.size,
|
|
236
|
+
.file-table th.size {
|
|
237
|
+
text-align: right;
|
|
238
|
+
width: 90px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.file-table td.mtime {
|
|
242
|
+
width: 160px;
|
|
243
|
+
color: var(--muted);
|
|
244
|
+
font-size: 13px;
|
|
245
|
+
}
|
|
246
|
+
.file-table th.mtime {
|
|
247
|
+
width: 160px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.file-table tr:hover td {
|
|
251
|
+
background: #f6f8fa;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.item {
|
|
255
|
+
display: inline-flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: 8px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.item::before {
|
|
261
|
+
content: "";
|
|
262
|
+
display: inline-block;
|
|
263
|
+
width: 14px;
|
|
264
|
+
height: 14px;
|
|
265
|
+
opacity: 0.85;
|
|
266
|
+
background: currentColor;
|
|
267
|
+
mask-size: contain;
|
|
268
|
+
mask-repeat: no-repeat;
|
|
269
|
+
mask-position: center;
|
|
270
|
+
-webkit-mask-size: contain;
|
|
271
|
+
-webkit-mask-repeat: no-repeat;
|
|
272
|
+
-webkit-mask-position: center;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.item.dir::before {
|
|
276
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.75 3A1.75 1.75 0 0 0 0 4.75v6.5C0 12.216.784 13 1.75 13h12.5c.966 0 1.75-.784 1.75-1.75v-5.5A1.75 1.75 0 0 0 14.25 4H7.5a.75.75 0 0 1-.53-.22L5.72 2.53A1.75 1.75 0 0 0 4.48 2H1.75Z'/%3E%3C/svg%3E");
|
|
277
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.75 3A1.75 1.75 0 0 0 0 4.75v6.5C0 12.216.784 13 1.75 13h12.5c.966 0 1.75-.784 1.75-1.75v-5.5A1.75 1.75 0 0 0 14.25 4H7.5a.75.75 0 0 1-.53-.22L5.72 2.53A1.75 1.75 0 0 0 4.48 2H1.75Z'/%3E%3C/svg%3E");
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.item.file::before {
|
|
281
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M4 1.75C4 .784 4.784 0 5.75 0h3.982c.464 0 .91.184 1.238.513l2.517 2.517c.329.328.513.774.513 1.238V14.25A1.75 1.75 0 0 1 12.25 16h-6.5A1.75 1.75 0 0 1 4 14.25V1.75Zm5.75-.25H5.75a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h6.5a.25.25 0 0 0 .25-.25V4.5H10a.75.75 0 0 1-.75-.75V1.5Z'/%3E%3C/svg%3E");
|
|
282
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M4 1.75C4 .784 4.784 0 5.75 0h3.982c.464 0 .91.184 1.238.513l2.517 2.517c.329.328.513.774.513 1.238V14.25A1.75 1.75 0 0 1 12.25 16h-6.5A1.75 1.75 0 0 1 4 14.25V1.75Zm5.75-.25H5.75a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h6.5a.25.25 0 0 0 .25-.25V4.5H10a.75.75 0 0 1-.75-.75V1.5Z'/%3E%3C/svg%3E");
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.empty {
|
|
286
|
+
padding: 18px 12px;
|
|
287
|
+
color: var(--muted);
|
|
288
|
+
text-align: center;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.markdown-wrap {
|
|
292
|
+
padding: 16px;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.code-wrap {
|
|
296
|
+
padding: 0;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.code-wrap pre.hljs {
|
|
300
|
+
margin: 0;
|
|
301
|
+
padding: 16px;
|
|
302
|
+
overflow: auto;
|
|
303
|
+
background: #f6f8fa;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.note {
|
|
307
|
+
padding: 12px;
|
|
308
|
+
border: 1px solid var(--border);
|
|
309
|
+
border-radius: 6px;
|
|
310
|
+
background: #f6f8fa;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.error {
|
|
314
|
+
padding: 12px;
|
|
315
|
+
color: #cf222e;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.markdown-body .markdown-alert {
|
|
319
|
+
margin: 16px 0;
|
|
320
|
+
padding: 12px 14px;
|
|
321
|
+
border: 1px solid var(--border);
|
|
322
|
+
border-left-width: 4px;
|
|
323
|
+
border-radius: 6px;
|
|
324
|
+
background: #f6f8fa;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.markdown-body .markdown-alert-title {
|
|
328
|
+
margin: 0 0 6px;
|
|
329
|
+
font-weight: 650;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.markdown-body .markdown-alert > :last-child {
|
|
333
|
+
margin-bottom: 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.markdown-body .markdown-alert-note {
|
|
337
|
+
border-left-color: #0969da;
|
|
338
|
+
}
|
|
339
|
+
.markdown-body .markdown-alert-tip {
|
|
340
|
+
border-left-color: #1a7f37;
|
|
341
|
+
}
|
|
342
|
+
.markdown-body .markdown-alert-important {
|
|
343
|
+
border-left-color: #8250df;
|
|
344
|
+
}
|
|
345
|
+
.markdown-body .markdown-alert-warning {
|
|
346
|
+
border-left-color: #9a6700;
|
|
347
|
+
}
|
|
348
|
+
.markdown-body .markdown-alert-caution {
|
|
349
|
+
border-left-color: #cf222e;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.markdown-body pre.mermaid {
|
|
353
|
+
padding: 12px;
|
|
354
|
+
border: 1px solid var(--border);
|
|
355
|
+
border-radius: 12px;
|
|
356
|
+
background: #f6f8fa;
|
|
357
|
+
overflow: auto;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.markdown-body h1,
|
|
361
|
+
.markdown-body h2,
|
|
362
|
+
.markdown-body h3,
|
|
363
|
+
.markdown-body h4,
|
|
364
|
+
.markdown-body h5,
|
|
365
|
+
.markdown-body h6 {
|
|
366
|
+
position: relative;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.markdown-body .anchor {
|
|
370
|
+
position: absolute;
|
|
371
|
+
left: -22px;
|
|
372
|
+
top: 50%;
|
|
373
|
+
transform: translateY(-50%);
|
|
374
|
+
width: 18px;
|
|
375
|
+
height: 18px;
|
|
376
|
+
color: var(--muted);
|
|
377
|
+
visibility: hidden;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.markdown-body .anchor::before {
|
|
381
|
+
content: "";
|
|
382
|
+
display: inline-block;
|
|
383
|
+
width: 18px;
|
|
384
|
+
height: 18px;
|
|
385
|
+
background: currentColor;
|
|
386
|
+
mask-size: contain;
|
|
387
|
+
mask-repeat: no-repeat;
|
|
388
|
+
mask-position: center;
|
|
389
|
+
-webkit-mask-size: contain;
|
|
390
|
+
-webkit-mask-repeat: no-repeat;
|
|
391
|
+
-webkit-mask-position: center;
|
|
392
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M7.775 3.275a.75.75 0 0 1 0 1.06L6.06 6.05a2.5 2.5 0 0 0 3.536 3.536l1.715-1.715a.75.75 0 1 1 1.06 1.06l-1.715 1.716A4 4 0 0 1 5 4.99l1.715-1.716a.75.75 0 0 1 1.06 0Zm.45 9.45a.75.75 0 0 1 0-1.06l1.715-1.715A2.5 2.5 0 0 0 6.404 6.404L4.69 8.12a.75.75 0 1 1-1.06-1.06l1.715-1.716A4 4 0 1 1 11 11.01l-1.715 1.716a.75.75 0 0 1-1.06 0Z'/%3E%3C/svg%3E");
|
|
393
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M7.775 3.275a.75.75 0 0 1 0 1.06L6.06 6.05a2.5 2.5 0 0 0 3.536 3.536l1.715-1.715a.75.75 0 1 1 1.06 1.06l-1.715 1.716A4 4 0 0 1 5 4.99l1.715-1.716a.75.75 0 0 1 1.06 0Zm.45 9.45a.75.75 0 0 1 0-1.06l1.715-1.715A2.5 2.5 0 0 0 6.404 6.404L4.69 8.12a.75.75 0 1 1-1.06-1.06l1.715-1.716A4 4 0 1 1 11 11.01l-1.715 1.716a.75.75 0 0 1-1.06 0Z'/%3E%3C/svg%3E");
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.markdown-body h1:hover > .anchor,
|
|
397
|
+
.markdown-body h2:hover > .anchor,
|
|
398
|
+
.markdown-body h3:hover > .anchor,
|
|
399
|
+
.markdown-body h4:hover > .anchor,
|
|
400
|
+
.markdown-body h5:hover > .anchor,
|
|
401
|
+
.markdown-body h6:hover > .anchor {
|
|
402
|
+
visibility: visible;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
@media (max-width: 560px) {
|
|
406
|
+
.markdown-body .anchor {
|
|
407
|
+
display: none;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
@media (min-width: 720px) {
|
|
412
|
+
.container {
|
|
413
|
+
padding: 24px;
|
|
414
|
+
}
|
|
415
|
+
.topbar-row {
|
|
416
|
+
padding-left: 20px;
|
|
417
|
+
padding-right: 20px;
|
|
418
|
+
}
|
|
419
|
+
.breadcrumbs {
|
|
420
|
+
padding-left: 20px;
|
|
421
|
+
padding-right: 20px;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
@media (max-width: 560px) {
|
|
426
|
+
.file-table {
|
|
427
|
+
min-width: 0;
|
|
428
|
+
}
|
|
429
|
+
.file-table th.mtime,
|
|
430
|
+
.file-table td.mtime,
|
|
431
|
+
.file-table th.size,
|
|
432
|
+
.file-table td.size {
|
|
433
|
+
display: none;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.meta-commit,
|
|
437
|
+
.meta-actions {
|
|
438
|
+
display: none;
|
|
439
|
+
}
|
|
440
|
+
.meta-menu {
|
|
441
|
+
display: inline-block;
|
|
442
|
+
}
|
|
443
|
+
}
|