This commit is contained in:
ed 2022-04-29 23:13:37 +02:00
parent 125d0efbd8
commit d4b51c040e
4 changed files with 34 additions and 16 deletions

View file

@ -63,6 +63,7 @@ turn your phone or raspi into a portable file server with resumable uploads/down
* [file parser plugins](#file-parser-plugins) - provide custom parsers to index additional tags, also see [./bin/mtag/README.md](./bin/mtag/README.md)
* [upload events](#upload-events) - trigger a script/program on each upload
* [hiding from google](#hiding-from-google) - tell search engines you dont wanna be indexed
* [themes](#themes)
* [complete examples](#complete-examples)
* [browser support](#browser-support) - TLDR: yes
* [client examples](#client-examples) - interact with copyparty using non-browser clients
@ -247,6 +248,8 @@ some improvement ideas
## not my bugs
* [Chrome issue 1317069](https://bugs.chromium.org/p/chromium/issues/detail?id=1317069) -- if you try to upload a folder which contains symlinks by dragging it into the browser, the symlinked files will not get uploaded
* iPhones: the volume control doesn't work because [apple doesn't want it to](https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW11)
* *future workaround:* enable the equalizer, make it all-zero, and set a negative boost to reduce the volume
* "future" because `AudioContext` is broken in the current iOS version (15.1), maybe one day...
@ -808,22 +811,23 @@ also, `--force-js` disables the plain HTML folder listing, making things harder
## themes
you can add your own themes by modifying `browser.css` or providing your own css to `--css-browser`
you can add your own themes by modifying `browser.css` or providing your own css to `--css-browser`, then telling copyparty they exist by increasing `--themes`
<table><tr><td><a href="https://user-images.githubusercontent.com/241032/165864907-17e2ac7d-319d-4f25-8718-2f376f614b51.png"><img src="https://user-images.githubusercontent.com/241032/165865708-00395793-98d9-4cf2-a5c7-a4c6c37e737c.png"></a></td><td><a href="https://user-images.githubusercontent.com/241032/165864904-c5b67ddd-f383-4b9e-9f5a-a3bde183d256.png"><img src="https://user-images.githubusercontent.com/241032/165865713-8a65d8e4-1483-4848-a726-4100b769fd79.png"></a></td><td><a href="https://user-images.githubusercontent.com/241032/165864901-db13a429-a5da-496d-8bc6-ce838547f69d.png"><img src="https://user-images.githubusercontent.com/241032/165865715-54fdbbe6-03a5-4a15-aa66-6f7906a0d345.png"></a></td></tr><tr><td><a href="https://user-images.githubusercontent.com/241032/165864905-692682eb-6fb4-4d40-b6fe-27d2c7d3e2a7.png"><img src="https://user-images.githubusercontent.com/241032/165865711-9f71d949-74c2-4194-8b40-2fb338f204a3.png"></a></td><td><a href="https://user-images.githubusercontent.com/241032/165864903-7fba1cb9-036b-4f11-90d5-28b7c0724353.png"><img src="https://user-images.githubusercontent.com/241032/165865714-c8d88212-b009-4087-973c-0bb2ebad084d.png"></a></td><td><a href="https://user-images.githubusercontent.com/241032/165864898-10ce7052-a117-4fcf-845b-b56c91687908.png"><img src="https://user-images.githubusercontent.com/241032/165865720-3f29ff23-faba-427b-b9e6-bd1cdd8e27be.png"></a></td></tr></table>
currently there is four themes,
* classic dark/light
* flat dark/light
* vice
* [hotdog stand](https://blog.codinghorror.com/a-tribute-to-the-windows-31-hot-dog-stand-color-scheme/)
<table><tr><td width="33%" align="center"><a href="https://user-images.githubusercontent.com/241032/165864907-17e2ac7d-319d-4f25-8718-2f376f614b51.png"><img src="https://user-images.githubusercontent.com/241032/165867551-fceb35dd-38f0-42bb-bef3-25ba651ca69b.png"></a>
0. classic dark</td><td width="33%" align="center"><a href="https://user-images.githubusercontent.com/241032/165864904-c5b67ddd-f383-4b9e-9f5a-a3bde183d256.png"><img src="https://user-images.githubusercontent.com/241032/165867556-077b6068-2488-4fae-bf88-1fce40e719bc.png"></a>
2. flat dark</td><td width="33%" align="center"><a href="https://user-images.githubusercontent.com/241032/165864901-db13a429-a5da-496d-8bc6-ce838547f69d.png"><img src="https://user-images.githubusercontent.com/241032/165867560-aa834aef-58dc-4abe-baef-7e562b647945.png"></a>
4. vice</td></tr><tr><td align="center"><a href="https://user-images.githubusercontent.com/241032/165864905-692682eb-6fb4-4d40-b6fe-27d2c7d3e2a7.png"><img src="https://user-images.githubusercontent.com/241032/165867555-080b73b6-6d85-41bb-a7c6-ad277c608365.png"></a>
1. classic light</td><td align="center"><a href="https://user-images.githubusercontent.com/241032/165864903-7fba1cb9-036b-4f11-90d5-28b7c0724353.png"><img src="https://user-images.githubusercontent.com/241032/165867557-b5cc0010-d880-48b1-8156-9c84f7bbc521.png"></a>
3. flat light
</td><td align="center"><a href="https://user-images.githubusercontent.com/241032/165864898-10ce7052-a117-4fcf-845b-b56c91687908.png"><img src="https://user-images.githubusercontent.com/241032/165867562-f3003d45-dd2a-4564-8aae-fed44c1ae064.png"></a>
5. <a href="https://blog.codinghorror.com/a-tribute-to-the-windows-31-hot-dog-stand-color-scheme/">hotdog stand</a></td></tr></table>
the classname of the HTML tag is set according to the selected theme, which is used to set colors as css variables ++
* each theme *generally* has a dark theme (even numbers) and a light theme (odd numbers), showing in pairs
* the first theme (theme 0 and 1) is `html.a`, second theme (2 and 3) is `html.b`
* if a light theme is selected, `html.y` is set, otherwise `html.z` is
* additionally, if the dark edition of the 2nd theme is selected, `html.bz` is set
* so if the dark edition of the 2nd theme is selected, you use any of `html.b`, `html.z`, `html.bz` to specify rules
see the top of [./copyparty/web/browser.css](./copyparty/web/browser.css) where the color variables are set, and there's layout-specific stuff near the bottom

View file

@ -485,7 +485,7 @@ def run_argparse(argv, formatter):
ap2.add_argument("--no-logues", action="store_true", help="disable rendering .prologue/.epilogue.html into directory listings")
ap2.add_argument("--no-readme", action="store_true", help="disable rendering readme.md into directory listings")
ap2.add_argument("--vague-403", action="store_true", help="send 404 instead of 403 (security through ambiguity, very enterprise)")
ap2.add_argument("--force-js", action="store_true", help="don't send HTML folder listings, force clients to use the embedded json instead -- slight protection against misbehaving search engines which ignore --no-robots")
ap2.add_argument("--force-js", action="store_true", help="don't send folder listings as HTML, force clients to use the embedded json instead -- slight protection against misbehaving search engines which ignore --no-robots")
ap2.add_argument("--no-robots", action="store_true", help="adds http and html headers asking search engines to not index anything")
ap2 = ap.add_argument_group('yolo options')

View file

@ -927,8 +927,8 @@ html.y #widget.open {
}
html.b #barpos,
html.b #barbuf {
width: calc(100% - 19.5em);
left: 8.5em;
width: calc(100% - 19em);
left: 8em;
}
#widget {
bottom: -3.2em;
@ -937,6 +937,12 @@ html.y #widget.open {
#pvol {
max-width: 9em;
}
html.b #ops {
padding-left: 1.7em;
}
html.b #path {
padding-left: 1.3em;
}
}
@media (max-width: 35em) {
#ops>a[data-dest="new_md"],
@ -2237,6 +2243,9 @@ html.a #pctl a {
margin-right: .5em;
box-shadow: -.02em -.02em .3em rgba(0,0,0,0.2) inset;
}
html.b #pctl {
left: .5em;
}
html.c #ops,
html.a #ops {
margin: 1.7em 1.5em 0 1.5em;
@ -2372,7 +2381,8 @@ html.ay #tree {
html.b #path {
margin: 1.3em 0;
margin: 1.3em 0 1.4em 0;
line-height: 1.7em;
}
html.b.op_open #path {
margin-top: .2em;
@ -2406,9 +2416,10 @@ html.by #barpos {
box-shadow: 0 0 0 1px rgba(0,0,0,0.2) inset;
}
html.b #ops {
max-width: 1em;
margin-bottom: 2em;
position: relative;
z-index: 2;
max-width: calc(100% - 10em);
}
html.b #ops a {
background: var(--bg);
@ -2422,8 +2433,11 @@ html.b #srch_q {
html.b #srch_q:empty {
margin-bottom: -1em;
}
html.b #op_up2k {
margin-top: 3em;
}
html.b #wrap {
margin-top: .3em;
margin-top: 2em;
}
html.b #tree {
box-shadow: 0 -1px 0 rgba(128,128,128,0.4);

View file

@ -5104,7 +5104,7 @@ var unpost = (function () {
html.push("<table><thead><tr><td></td><td>time</td><td>size</td><td>file</td></tr></thead><tbody>");
}
else
html.push("<p>sike! no uploads " + (filt.value ? 'matching that filter' : '') + " are sufficiently recent</p>");
html.push("sike! no uploads " + (filt.value ? 'matching that filter' : '') + " are sufficiently recent");
var mods = [1000, 100, 10];
for (var a = 0; a < res.length; a++) {