mirror of
https://github.com/9001/copyparty.git
synced 2026-04-12 15:22:32 -06:00
Merge bce1d8502b into 822fa71800
This commit is contained in:
commit
0077f5dc7a
18
scripts/docs/assemble-docs.sh
Normal file
18
scripts/docs/assemble-docs.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
rm ./out -r
|
||||||
|
|
||||||
|
pandoc ../../README.md \
|
||||||
|
--output=out/ \
|
||||||
|
--from=gfm \
|
||||||
|
--to=chunkedhtml \
|
||||||
|
--standalone \
|
||||||
|
--table-of-contents \
|
||||||
|
--toc-depth=3 \
|
||||||
|
--css=./docs.css \
|
||||||
|
--chunk-template="%i.html" \
|
||||||
|
--template ./template.html \
|
||||||
|
--metadata title="readme" \
|
||||||
|
--title-prefix="copyparty"
|
||||||
|
|
||||||
|
cp ./docs.css out/
|
||||||
160
scripts/docs/docs.css
Normal file
160
scripts/docs/docs.css
Normal file
|
|
@ -0,0 +1,160 @@
|
||||||
|
html {
|
||||||
|
color: #ccc;
|
||||||
|
background: #222;
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
* {
|
||||||
|
line-height: 1.3em;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
nav.sidebar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100vh;
|
||||||
|
width: 20rem;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: clip;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #2b2b2b;
|
||||||
|
}
|
||||||
|
div.toc {
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
ul a {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
margin: 0.5em 0;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
white-space: normal;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
div.toc > ul {
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
padding-top: 1rem;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
div.toc-header {
|
||||||
|
align-self: center;
|
||||||
|
padding-top: 1rem;
|
||||||
|
img {
|
||||||
|
width: 10rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
background: #2b2b2b;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
nav.sitenav {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 1rem;
|
||||||
|
span.next {
|
||||||
|
text-align: end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
display: flex;
|
||||||
|
padding: 1rem;
|
||||||
|
justify-content: center;
|
||||||
|
img {
|
||||||
|
/* Allow images to overflow past the sides of the text but center them */
|
||||||
|
margin-left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
max-width: calc(100vw - 20rem - 1rem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
article, nav.sitenav {
|
||||||
|
max-width: 50rem;
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
margin-left: 20rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
table-layout: fixed;
|
||||||
|
width: 100%;
|
||||||
|
margin: 1rem auto;
|
||||||
|
border-top: 3px solid #444;
|
||||||
|
border-bottom: 3px solid #444;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
tbody td {
|
||||||
|
border: 1px solid #444;
|
||||||
|
}
|
||||||
|
tbody tr:nth-child(odd) {
|
||||||
|
background: #2b2b2b;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 1.7em;
|
||||||
|
line-height: 1em;
|
||||||
|
padding: .6em 1em .15em 1em;
|
||||||
|
margin: 1em -1em .4em -1em;
|
||||||
|
color: #ddd;
|
||||||
|
background: #2b2b2b;
|
||||||
|
border: 1px solid #393939;
|
||||||
|
box-shadow: 0 0 .3em #111;
|
||||||
|
border-radius: .3em;
|
||||||
|
font-variant: small-caps;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #fc5;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
padding: 0 0 0 1.3em;
|
||||||
|
}
|
||||||
|
a:hover,
|
||||||
|
a:active,
|
||||||
|
a:focus {
|
||||||
|
color: #fea;
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
html {
|
||||||
|
color: #333;
|
||||||
|
background: #f7f7f7;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background: #e4e4e4;
|
||||||
|
border-color: #ccc;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
nav.sidebar, footer {
|
||||||
|
background: #e4e4e4
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-top: 3px solid #ddd;
|
||||||
|
border-bottom: 3px solid #ddd;
|
||||||
|
}
|
||||||
|
tbody tr:nth-child(odd) {
|
||||||
|
background: #e4e4e4;
|
||||||
|
}
|
||||||
|
tbody td {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #079;
|
||||||
|
}
|
||||||
|
a:hover,
|
||||||
|
a:active,
|
||||||
|
a:focus {
|
||||||
|
color: #00c;
|
||||||
|
}
|
||||||
|
}
|
||||||
69
scripts/docs/template.html
Normal file
69
scripts/docs/template.html
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
$for(author-meta)$
|
||||||
|
<meta name="author" content="$author-meta$" />
|
||||||
|
$endfor$
|
||||||
|
$if(date-meta)$
|
||||||
|
<meta name="dcterms.date" content="$date-meta$" />
|
||||||
|
$endif$
|
||||||
|
$if(keywords)$
|
||||||
|
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
||||||
|
$endif$
|
||||||
|
$if(description-meta)$
|
||||||
|
<meta name="description" content="$description-meta$" />
|
||||||
|
$endif$
|
||||||
|
$for(css)$
|
||||||
|
<link rel="stylesheet" href="$css$">
|
||||||
|
$endfor$
|
||||||
|
$for(header-includes)$
|
||||||
|
$header-includes$
|
||||||
|
$endfor$
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
$for(include-before)$
|
||||||
|
$include-before$
|
||||||
|
$endfor$
|
||||||
|
<nav class="sidebar" id="$idprefix$sidebar" role="doc-toc" >
|
||||||
|
<div class="toc-header">
|
||||||
|
<img src="https://github.com/9001/copyparty/raw/hovudstraum/docs/logo.svg" alt="copyparty logo">
|
||||||
|
</div>
|
||||||
|
<div class="toc">
|
||||||
|
$table-of-contents$
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div class="content">
|
||||||
|
<main>
|
||||||
|
<article>
|
||||||
|
$if(top)$ $-- only true on the root page
|
||||||
|
$else$
|
||||||
|
$if(title)$
|
||||||
|
<h1>$title$</h1>
|
||||||
|
$endif$
|
||||||
|
$endif$
|
||||||
|
$body$
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<nav class="sitenav">
|
||||||
|
$if(previous.url)$
|
||||||
|
<span class="left">
|
||||||
|
<a href="$previous.url$" class="href" rel="prev"><code><-</code> $previous.title$</a>
|
||||||
|
</span>
|
||||||
|
$endif$
|
||||||
|
$if(next.url)$
|
||||||
|
<span class="next">
|
||||||
|
<a href="$next.url$" class="href" rel="next">$next.title$ <code>-></code></a>
|
||||||
|
</span>
|
||||||
|
$endif$
|
||||||
|
</nav>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
$for(include-after)$
|
||||||
|
$include-after$
|
||||||
|
$endfor$
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in a new issue