diff --git a/resource/static/darkmode.css b/resource/static/darkmode.css index 7afaf2872a..c3a784c962 100644 --- a/resource/static/darkmode.css +++ b/resource/static/darkmode.css @@ -1,148 +1,141 @@ -.ui.container { - width: 95vw !important; - max-width: 1680px !important; -} - -html[nz-theme='dark'] { - body { - background-color: #121212 !important; - color: #fff !important; - } - - .ui.menu { - background-color: #282828 !important; - } - - .ui.menu * { - color: #fff !important; - } - - .accordion { - background-color: #282828 !important; - } - - .accordion .title { - color: #fff !important; - } - - .ui.card { - background-color: #3f3f3f !important; - border: none !important; - box-shadow: none !important; - } - - .header { - color: #fff !important; - } - - .description { - color: #fff !important; - } - - .icon { - color: #fff !important; - } - - .ui.popup { - background-color: #575757 !important; - color: #fff !important; - } - - .ui.table { - background-color: #282828 !important; - color: #fff !important; - } - - .ui thead th { - background-color: #3f3f3f !important; - color: #fff !important; - } - - .ui.buttons .button { - background-color: #3f3f3f !important; - color: #fff !important; - } - - .ui.modal { - background-color: #282828 !important; - } - - .ui.modal * { - color: #fff !important; - } - - textarea, - input, - select, - .dropdown { - background-color: #3f3f3f !important; - color: #fff !important; - } - - .ui.message { - background-color: unset !important; - } - - .ui.dropdown .menu { - background-color: #575757 !important; - color: #fff !important; - } - - .ui.modal>.header { - background-color: #3f3f3f !important; - } - - .ui.modal>.content { - background-color: #282828 !important; - } - - .ui.modal>.actions { - background-color: #3f3f3f !important; - } - - #alert { - background-color: #3f3f3f !important; - color: #fff !important; - } - - .ui.form .field>label { - color: unset !important; - } - - .ui.segment { - background-color: #3f3f3f !important; - } - - .ui.segment textarea, - input, - select, - .dropdown { - background-color: #575757 !important; - color: #fff !important; - } - - form label { - color: #fff !important; - } - - .ui.inverted.segment { - background-color: #121212 !important; - } - - .ui.inverted.segment * { - color: #8b8b8b !important; - } - - .menu .dropdown { - background-color: #282828 !important; - color: #fff !important; - } - - .ui.menu .ui.dropdown .menu>.item { - color: #fff !important; - } - - .login .ui.message{ - color: #8b8b8b !important; - } -} \ No newline at end of file +html[nz-theme='dark'] body { + background-color: #121212 !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.menu { + background-color: #282828 !important; +} + +html[nz-theme='dark'] .ui.menu * { + color: #fff !important; +} + +html[nz-theme='dark'] .accordion { + background-color: #282828 !important; +} + +html[nz-theme='dark'] .accordion .title { + color: #fff !important; +} + +html[nz-theme='dark'] .ui.card { + background-color: #3f3f3f !important; + border: none !important; + box-shadow: none !important; +} + +html[nz-theme='dark'] .header { + color: #fff !important; +} + +html[nz-theme='dark'] .description { + color: #fff !important; +} + +html[nz-theme='dark'] .icon { + color: #fff !important; +} + +html[nz-theme='dark'] .ui.popup { + background-color: #575757 !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.table { + background-color: #282828 !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui thead th { + background-color: #3f3f3f !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.buttons .button { + background-color: #3f3f3f !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.modal { + background-color: #282828 !important; +} + +html[nz-theme='dark'] .ui.modal * { + color: #fff !important; +} + +html[nz-theme='dark'] textarea, +html[nz-theme='dark'] input, +html[nz-theme='dark'] select, +html[nz-theme='dark'] .dropdown { + background-color: #3f3f3f !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.message { + background-color: unset !important; +} + +html[nz-theme='dark'] .ui.dropdown .menu { + background-color: #575757 !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.modal>.header { + background-color: #3f3f3f !important; +} + +html[nz-theme='dark'] .ui.modal>.content { + background-color: #282828 !important; +} + +html[nz-theme='dark'] .ui.modal>.actions { + background-color: #3f3f3f !important; +} + +html[nz-theme='dark'] #alert { + background-color: #3f3f3f !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.form .field>label { + color: unset !important; +} + +html[nz-theme='dark'] .ui.segment { + background-color: #3f3f3f !important; +} + +html[nz-theme='dark'] .ui.segment textarea, +html[nz-theme='dark'] input, +html[nz-theme='dark'] select, +html[nz-theme='dark'] .dropdown { + background-color: #575757 !important; + color: #fff !important; +} + +html[nz-theme='dark'] form label { + color: #fff !important; +} + +html[nz-theme='dark'] .ui.inverted.segment { + background-color: #121212 !important; +} + +html[nz-theme='dark'] .ui.inverted.segment * { + color: #8b8b8b !important; +} + +html[nz-theme='dark'] .menu .dropdown { + background-color: #282828 !important; + color: #fff !important; +} + +html[nz-theme='dark'] .ui.menu .ui.dropdown .menu>.item { + color: #fff !important; +} + +html[nz-theme='dark'] .login .ui.message{ + color: #8b8b8b !important; +} diff --git a/resource/static/main.css b/resource/static/main.css index a8fb509600..6ba88a32c1 100644 --- a/resource/static/main.css +++ b/resource/static/main.css @@ -9,6 +9,11 @@ td { word-break: break-all; } +.ui.container{ + width: 95vw !important; + max-width: 1680px !important; +} + .nb-container { padding-top: 75px; min-height: 100vh; diff --git a/resource/static/theme-default/css/main.css b/resource/static/theme-default/css/main.css index a4e83f1cee..96fa8096a7 100644 --- a/resource/static/theme-default/css/main.css +++ b/resource/static/theme-default/css/main.css @@ -1,14 +1,5 @@ /* 屏幕适配 */ -@media only screen and (min-width:1200px) { - .ui.container { - width: 95% !important; - font-size: 90% !important; - max-width: 1300px !important; - } -} - @media only screen and (max-width:767px) { - .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) { margin-top: 0.4em !important; @@ -41,16 +32,6 @@ i.fi { margin: 0px 6px 0px 2px; } -body { - content: " " !important; - background: fixed !important; - z-index: -1 !important; - top: 0 !important; - right: 0 !important; - bottom: 0 !important; - left: 0 !important; -} - td { word-wrap: break-word; word-break: break-all; @@ -63,6 +44,11 @@ td { margin-bottom: -47px; } +.ui.container { + width: 95%; + max-width: 1680px !important; +} + #app .ui.fluid.accordion { margin-bottom: 1rem; } diff --git a/resource/static/theme-server-status/css/main.css b/resource/static/theme-server-status/css/main.css index 5d53a2e5e8..c8de5b69bf 100755 --- a/resource/static/theme-server-status/css/main.css +++ b/resource/static/theme-server-status/css/main.css @@ -9,6 +9,10 @@ body { margin: 0 auto; } +.container-fluid::-webkit-scrollbar { + display: none; +} + .nezha { min-height: calc(100vh - 100px); } @@ -470,14 +474,13 @@ footer p{ background-image: url(/static/theme-server-status/img/rb.png); } - @media only screen and (max-width: 767px) { body { font-size: 10px !important; padding-top:60px !important; } .nezha { - min-height: calc(100vh - 80px); + min-height: calc(74.5vh); } .content { padding: 0; diff --git a/resource/template/theme-default/footer.html b/resource/template/theme-default/footer.html index 070645390e..6ebe08ccf9 100644 --- a/resource/template/theme-default/footer.html +++ b/resource/template/theme-default/footer.html @@ -16,8 +16,6 @@ showSwitchTemplate({{ .Themes }}, {{ .Conf.Site.Theme }}) {{ end }} - {{end}} diff --git a/resource/template/theme-default/header.html b/resource/template/theme-default/header.html index 09efa25ac0..257baafdbe 100644 --- a/resource/template/theme-default/header.html +++ b/resource/template/theme-default/header.html @@ -14,8 +14,8 @@ - - + + @@ -23,7 +23,7 @@ diff --git a/resource/template/theme-default/home.html b/resource/template/theme-default/home.html index 9289c402cc..21972a67a8 100644 --- a/resource/template/theme-default/home.html +++ b/resource/template/theme-default/home.html @@ -240,12 +240,12 @@ const itemHeight = isMobile ? 10 : 10; const gridLeft = 25; const gridRight = 12; - const fontColor = "rgba(0, 0, 0, 0.68)"; const backgroundColor = ''; const borderColor = "#ffffff"; const chartData = this.chartDataList[id - 1]; const chartContainer = this.$refs[`chart${id}`][0]; - const chart = echarts.init(chartContainer, null, { + const chartTheme = $('html').attr('nz-theme') == "dark" ? "dark" : ""; + const chart = echarts.init(chartContainer, chartTheme, { renderer: 'canvas', useDirtyRect: false, width: 'auto', @@ -283,7 +283,6 @@ trigger: 'axis', textStyle: { fontSize: fontSize, - color: fontColor } }, legend: { @@ -292,7 +291,6 @@ show: true, textStyle: { fontSize: fontSize, - color: fontColor }, lineStyle: { cap: 'butt' @@ -332,7 +330,6 @@ series: seriesData, textStyle: { fontSize: fontSize, - color: fontColor }, grid: { top: '30', diff --git a/resource/template/theme-default/network.html b/resource/template/theme-default/network.html index c57abc320f..c5a97e2300 100644 --- a/resource/template/theme-default/network.html +++ b/resource/template/theme-default/network.html @@ -18,7 +18,7 @@
-
+
@@ -65,10 +65,10 @@ } }, grid: { - left: '8%', - right: '8%', + left: this.isMobile ? '8%' : '3.8%', + right: this.isMobile ? '8%' : '3.8%', }, - backgroundColor: 'rgba(255, 255, 255, 0.8)', + backgroundColor: '', toolbox: { feature: { dataZoom: { @@ -243,7 +243,8 @@ return str.includes('Windows') }, renderChart() { - this.myChart = echarts.init(this.$refs.chartDom); + const chartTheme = $('html').attr('nz-theme') == "dark" ? "dark" : ""; + this.myChart = echarts.init(this.$refs.chartDom,chartTheme); this.myChart.setOption(this.option); }, resizeHandle () { diff --git a/resource/template/theme-server-status/footer.html b/resource/template/theme-server-status/footer.html index 2c2070c2a3..a11658d808 100644 --- a/resource/template/theme-server-status/footer.html +++ b/resource/template/theme-server-status/footer.html @@ -1,36 +1,36 @@ {{define "theme-server-status/footer"}} - - - - + + + + {{if ts .CustomCode}}{{.CustomCode|safe}}{{end}} diff --git a/resource/template/theme-server-status/header.html b/resource/template/theme-server-status/header.html index 19b04c58e8..956c2408f1 100644 --- a/resource/template/theme-server-status/header.html +++ b/resource/template/theme-server-status/header.html @@ -16,7 +16,7 @@ - + diff --git a/resource/template/theme-server-status/home.html b/resource/template/theme-server-status/home.html index abb522625f..a6bf0b81b1 100644 --- a/resource/template/theme-server-status/home.html +++ b/resource/template/theme-server-status/home.html @@ -551,6 +551,10 @@