mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
add browserchrome color hint
This commit is contained in:
parent
d3fe19c5aa
commit
e357aa546c
|
@ -6,6 +6,7 @@
|
|||
<title>{{ title }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimum-scale=0.6">
|
||||
<meta name="theme-color" content="#333">
|
||||
{{ html_head }}
|
||||
<link rel="stylesheet" media="screen" href="/.cpr/ui.css?_={{ ts }}">
|
||||
<link rel="stylesheet" media="screen" href="/.cpr/browser.css?_={{ ts }}">
|
||||
|
|
|
@ -4881,7 +4881,7 @@ function aligngriditems() {
|
|||
var em2px = parseFloat(getComputedStyle(ebi('ggrid')).fontSize);
|
||||
var gridsz = 10;
|
||||
try {
|
||||
gridsz = getComputedStyle(document.documentElement).getPropertyValue('--grid-sz').slice(0, -2);
|
||||
gridsz = cprop('--grid-sz').slice(0, -2);
|
||||
}
|
||||
catch (ex) { }
|
||||
var gridwidth = ebi('ggrid').clientWidth;
|
||||
|
@ -6136,6 +6136,7 @@ var settheme = (function () {
|
|||
pbar.drawpos();
|
||||
vbar.draw();
|
||||
showfile.setstyle();
|
||||
bchrome();
|
||||
|
||||
var html = [], itheme = ax.indexOf(theme[0]) * 2 + (light ? 1 : 0),
|
||||
names = ['classic dark', 'classic light', 'pm-monokai', 'flat light', 'vice', 'hotdog stand', 'hacker', 'hi-con'];
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<title>📝 {{ title }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.7">
|
||||
<meta name="theme-color" content="#333">
|
||||
{{ html_head }}
|
||||
<link rel="stylesheet" href="/.cpr/ui.css?_={{ ts }}">
|
||||
<link rel="stylesheet" href="/.cpr/md.css?_={{ ts }}">
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<title>📝 {{ title }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.7">
|
||||
<meta name="theme-color" content="#333">
|
||||
{{ html_head }}
|
||||
<link rel="stylesheet" href="/.cpr/ui.css?_={{ ts }}">
|
||||
<link rel="stylesheet" href="/.cpr/mde.css?_={{ ts }}">
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<title>{{ svcname }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
||||
{{ html_head }}
|
||||
<meta name="theme-color" content="#333">
|
||||
{{ html_head }}
|
||||
<link rel="stylesheet" media="screen" href="/.cpr/msg.css?_={{ ts }}">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ table {
|
|||
.num td:first-child {
|
||||
text-align: right;
|
||||
}
|
||||
.c {
|
||||
.cn {
|
||||
text-align: center;
|
||||
}
|
||||
.btns {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<title>{{ svcname }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
||||
<meta name="theme-color" content="#333">
|
||||
{{ html_head }}
|
||||
<link rel="stylesheet" media="screen" href="/.cpr/splash.css?_={{ ts }}">
|
||||
<link rel="stylesheet" media="screen" href="/.cpr/ui.css?_={{ ts }}">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<title>{{ args.doctitle }} @ {{ args.name }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
||||
<meta name="theme-color" content="#333">
|
||||
{{ html_head }}
|
||||
<link rel="stylesheet" media="screen" href="/.cpr/splash.css?_={{ ts }}">
|
||||
<link rel="stylesheet" media="screen" href="/.cpr/ui.css?_={{ ts }}">
|
||||
|
@ -13,7 +14,7 @@
|
|||
|
||||
<body>
|
||||
<div id="wrap" class="w">
|
||||
<div class="c">
|
||||
<div class="cn">
|
||||
<p class="btns"><a href="/">browse files</a> // <a href="/?h">control panel</a></p>
|
||||
<p>or choose your OS for cooler alternatives:</p>
|
||||
<div class="ossel">
|
||||
|
|
|
@ -1634,6 +1634,25 @@ var favico = (function () {
|
|||
})();
|
||||
|
||||
|
||||
function cprop(name) {
|
||||
return getComputedStyle(document.documentElement).getPropertyValue(name);
|
||||
}
|
||||
|
||||
|
||||
function bchrome() {
|
||||
console.log(document.documentElement.className);
|
||||
var v, o = QS('meta[name=theme-color]');
|
||||
if (!o)
|
||||
return;
|
||||
|
||||
try {
|
||||
v = cprop('--bg-u3');
|
||||
}
|
||||
catch (ex) { }
|
||||
o.setAttribute('content', v ? v : document.documentElement.className.indexOf('y') + 1 ? '#eee' : '#333');
|
||||
}
|
||||
bchrome();
|
||||
|
||||
var cf_cha_t = 0;
|
||||
function xhrchk(xhr, prefix, e404, lvl, tag) {
|
||||
if (xhr.status < 400 && xhr.status >= 200)
|
||||
|
|
Loading…
Reference in a new issue