mirror of
https://github.com/9001/copyparty.git
synced 2026-06-20 21:22:26 -06:00
radius setting
This commit is contained in:
parent
03694ee07e
commit
8b05cd5f16
|
|
@ -965,7 +965,7 @@ tr.play td:nth-child(1) a {
|
||||||
#ggrid>a img {
|
#ggrid>a img {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border-radius: calc(var(--radius) / 3 * 2);
|
border-radius: var(--radius);
|
||||||
max-width: 10em;
|
max-width: 10em;
|
||||||
max-width: calc(var(--grid-sz) - 4px);
|
max-width: calc(var(--grid-sz) - 4px);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
@ -1259,7 +1259,7 @@ html:not(.e) #ggrid>a.thumbed.dir:before {
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
padding: .05em .5em .1em .3em;
|
padding: .05em .5em .1em .3em;
|
||||||
border-radius: calc(var(--radius) / 2) 0 0 0;
|
border-radius: var(--radius) 0 0 0;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
border-width: 1px 0 0 1px;
|
border-width: 1px 0 0 1px;
|
||||||
}
|
}
|
||||||
|
|
@ -1289,7 +1289,7 @@ html:not(.e) #ggrid>a.thumbed.dir:before {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
margin: 0 .1em .1em .2em;
|
margin: 0 .1em .1em .2em;
|
||||||
box-shadow: 0 0 .5em var(--mp-sh);
|
box-shadow: 0 0 .5em var(--mp-sh);
|
||||||
border-radius: calc(var(--radius) / 2);
|
border-radius: var(--radius);
|
||||||
}
|
}
|
||||||
#up_quick {
|
#up_quick {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -1297,7 +1297,7 @@ html:not(.e) #ggrid>a.thumbed.dir:before {
|
||||||
margin: 0 .2em .2em .1em;
|
margin: 0 .2em .2em .1em;
|
||||||
font-size: .7em;
|
font-size: .7em;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border-radius: calc(var(--radius) * 1.2);
|
border-radius: var(--radius);
|
||||||
background: #cde;
|
background: #cde;
|
||||||
background: var(--bg-u2);
|
background: var(--bg-u2);
|
||||||
}
|
}
|
||||||
|
|
@ -1308,7 +1308,7 @@ html:not(.e) #ggrid>a.thumbed.dir:before {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
box-shadow: 0 0 .5em color-mix(in oklab, var(--a) 20%, transparent);
|
box-shadow: 0 0 .5em color-mix(in oklab, var(--a) 20%, transparent);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border-radius: calc(var(--radius) * 1.2);
|
border-radius: var(--radius);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.open #up_quick_more {
|
.open #up_quick_more {
|
||||||
|
|
@ -1335,7 +1335,7 @@ html:not(.e) #ggrid>a.thumbed.dir:before {
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border-radius: calc(var(--radius) * 1.6);
|
border-radius: var(--radius);
|
||||||
}
|
}
|
||||||
#up_quick .overlay_plus {
|
#up_quick .overlay_plus {
|
||||||
right: .3em;
|
right: .3em;
|
||||||
|
|
@ -1528,7 +1528,7 @@ html:not(.e):not(.d) #up_quick .btn.on {
|
||||||
}
|
}
|
||||||
#barpos,
|
#barpos,
|
||||||
#barbuf {
|
#barbuf {
|
||||||
border-radius: 9em;
|
border-radius: var(--radius);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
@ -2244,7 +2244,7 @@ html.b .btn {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
background: var(--bg-u2);
|
background: var(--bg-u2);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border-radius: calc(var(--radius) * 1.3);
|
border-radius: var(--radius);
|
||||||
padding: 0 .2em;
|
padding: 0 .2em;
|
||||||
line-height: 2.3em;
|
line-height: 2.3em;
|
||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.5em;
|
||||||
|
|
@ -2841,7 +2841,7 @@ html.y #bbox-overlay figcaption a {
|
||||||
grid-template-rows: max-content auto;
|
grid-template-rows: max-content auto;
|
||||||
margin: 5vh 5vw;
|
margin: 5vh 5vw;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border-radius: calc(var(--radius) * 1.6);
|
border-radius: var(--radius);
|
||||||
border: var(--a) solid 1px;
|
border: var(--a) solid 1px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
|
|
@ -3022,7 +3022,7 @@ html.c .modalcontent {
|
||||||
box-shadow: 0 0 0 #999;
|
box-shadow: 0 0 0 #999;
|
||||||
border: .1em solid var(--ud-b1);
|
border: .1em solid var(--ud-b1);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border-radius: calc(var(--radius) * 1.6);
|
border-radius: var(--radius);
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
transition: all 0.12s;
|
transition: all 0.12s;
|
||||||
|
|
@ -3528,7 +3528,7 @@ html.b #u2etas {
|
||||||
background: var(--bg-d1);
|
background: var(--bg-d1);
|
||||||
border: 1px solid var(--bg-u1);
|
border: 1px solid var(--bg-u1);
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
border-radius: calc(var(--radius) * 1.6);
|
border-radius: var(--radius);
|
||||||
}
|
}
|
||||||
html.c #u2foot:empty,
|
html.c #u2foot:empty,
|
||||||
html.b #u2foot:empty {
|
html.b #u2foot:empty {
|
||||||
|
|
@ -3563,13 +3563,10 @@ html.by #tree {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
html.d #barpos,
|
html.b #barpos,
|
||||||
html.d #barbuf,
|
html.b #barbuf,
|
||||||
html.d #pvol,
|
html.b #pvol {
|
||||||
html.a #barpos,
|
border-radius: calc(var(--radius) * 3);
|
||||||
html.a #barbuf,
|
|
||||||
html.a #pvol {
|
|
||||||
border-radius: .2em;
|
|
||||||
}
|
}
|
||||||
html.a #barpos {
|
html.a #barpos {
|
||||||
box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
|
box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
|
||||||
|
|
@ -3925,7 +3922,7 @@ html.e #wrap.thin {
|
||||||
@supports (display: grid) and (gap: 1em) {
|
@supports (display: grid) and (gap: 1em) {
|
||||||
#ggrid {
|
#ggrid {
|
||||||
display: grid;
|
display: grid;
|
||||||
margin: 0 .5em;
|
margin: .5em;
|
||||||
padding: unset;
|
padding: unset;
|
||||||
grid-template-columns: repeat(auto-fit,var(--grid-sz));
|
grid-template-columns: repeat(auto-fit,var(--grid-sz));
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,7 @@ if (1)
|
||||||
"cl_hfsz": "filesize",
|
"cl_hfsz": "filesize",
|
||||||
"cl_themes": "theme",
|
"cl_themes": "theme",
|
||||||
"cl_accent": "accent color (keep empty for default)$Nsupports any css color, like rgba(255, 210, 0, 1)",
|
"cl_accent": "accent color (keep empty for default)$Nsupports any css color, like rgba(255, 210, 0, 1)",
|
||||||
|
"cl_radius": "corner radius in pixels (keep empty for default)",
|
||||||
"cl_fun": "enables or disables the FUN 🎉🚀👽🐹🥳❗ (reload the page after changing this setting)",
|
"cl_fun": "enables or disables the FUN 🎉🚀👽🐹🥳❗ (reload the page after changing this setting)",
|
||||||
"cl_langs": "language",
|
"cl_langs": "language",
|
||||||
"cl_ziptype": "folder download",
|
"cl_ziptype": "folder download",
|
||||||
|
|
@ -1250,6 +1251,7 @@ ebi('op_cfg').innerHTML = (
|
||||||
' <input type="text" id="accent" placeholder="#color"></input>' +
|
' <input type="text" id="accent" placeholder="#color"></input>' +
|
||||||
' <input type="color" id="accent_picker"></input>' +
|
' <input type="color" id="accent_picker"></input>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
|
' <input tt="' + L.cl_radius +'" type="text" id="radius" placeholder="[0-inf]"></input>' +
|
||||||
' <a id="fun_tgl" class="tgl btn" tt="' + L.cl_fun + '">🥳</a>\n' +
|
' <a id="fun_tgl" class="tgl btn" tt="' + L.cl_fun + '">🥳</a>\n' +
|
||||||
' </div>\n' +
|
' </div>\n' +
|
||||||
'</div>\n' +
|
'</div>\n' +
|
||||||
|
|
@ -1444,6 +1446,29 @@ if(accent && accent.length > 3){
|
||||||
ebi('accent').value = ebi('accent_picker').value = accent;
|
ebi('accent').value = ebi('accent_picker').value = accent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// corner radius
|
||||||
|
ebi('radius').oninput = function () {
|
||||||
|
var r = parseFloat(this.value);
|
||||||
|
|
||||||
|
clmod(ebi('radius'), 'invalid', this.value.length != 0 && r.length == 0);
|
||||||
|
if(r == radius)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(isNaN(r))
|
||||||
|
r = ''
|
||||||
|
swrite('radius', r);
|
||||||
|
var setV = r == '' ? '' : (r + 'px');
|
||||||
|
document.documentElement.style.setProperty('--radius', setV);
|
||||||
|
console.log(setV);
|
||||||
|
}
|
||||||
|
var radius = sread('radius');
|
||||||
|
if(radius){
|
||||||
|
console.log('read radius from settings: ' + radius);
|
||||||
|
document.documentElement.style.setProperty('--radius', parseFloat(radius) + 'px');
|
||||||
|
ebi('radius').value = radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// no fun allowed
|
// no fun allowed
|
||||||
bcfg_bind(this, 'fun_tgl', 'fun_tgl');
|
bcfg_bind(this, 'fun_tgl', 'fun_tgl');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
--bg-max: #080808;
|
--bg-max: #080808;
|
||||||
--a: #fc5;
|
--a: #fc5;
|
||||||
accent-color: var(--a);
|
accent-color: var(--a);
|
||||||
--radius: .3em;
|
--radius: 7px;
|
||||||
|
|
||||||
--fg-max: #fefefe;
|
--fg-max: #fefefe;
|
||||||
--bg-max: #010101;
|
--bg-max: #010101;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue