Skip to content

Commit

Permalink
improve server-status theme (#310)
Browse files Browse the repository at this point in the history
* Add files via upload

* Add files via upload

* Add files via upload

* improve theme-server-status

1.前台分组展示agent
2.一些小优化

---------

Co-authored-by: SuperHsiao <superhsiao@4indesign.com>
  • Loading branch information
nap0o and SuperHsiao authored Dec 7, 2023
1 parent 30652c3 commit 99111a3
Show file tree
Hide file tree
Showing 8 changed files with 208 additions and 175 deletions.
37 changes: 31 additions & 6 deletions resource/static/theme-server-status/css/dark.css

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions resource/static/theme-server-status/css/light.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 49 additions & 83 deletions resource/static/theme-server-status/css/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
padding-top: 70px !important;
padding-top:70px !important;
padding-bottom: 30px !important;
}

Expand All @@ -8,14 +8,27 @@ body {
min-height: 40px !important;
}

.navbar-inner{
margin:0 auto;
}

.pl-md-unset {
max-width: 95vw;
}

.navbar-collapse:not([aria-expanded]) .navbar-nav .dropdown-toggle {
margin-top: 18px;
padding: 0 !important;
}

.navbar-toggle {
margin-right:0
}

.navbar-brand {
font-size: 20px;
text-align: center;
padding:12px 0 0 0;
}

.node-cell-expand {
Expand All @@ -32,18 +45,17 @@ body {
padding-top: 10px;
}

.dropdown {
margin-right: 10px;
}

.navbar-inverse, .nav.navbar-nav {
background-image: linear-gradient(rgb(60, 60, 60) 0px, rgb(34, 34, 34) 100%) !important;
}

.navbar-inverse .navbar-nav>li>a {
color:#f1f1f1;
}

.navbar-inverse .navbar-brand {
font-size: 20px;
}

/* 导航部分 结束 */

/* 正文部分 开始 */
Expand All @@ -63,6 +75,15 @@ body {
text-align: left;
}

.table>thead>tr>th{
border:none;
}

.table .node-group-tag {
font-size: 18px;
padding-bottom:15px;
}

.progress {
margin-bottom: 0;
}
Expand All @@ -78,6 +99,10 @@ body {
border-top: 0 !important;
}

.accordian-body{
margin: 10px 0px 10px 18px;
}

.node-cell.center {
text-align: center !important;
}
Expand Down Expand Up @@ -147,104 +172,45 @@ body {
}

/* 服务页 正文结束 */

@media only screen and (max-width: 1200px) {
.node-cell.os,
.node-cell.location,
.node-cell.uptime {
display: none;
visibility: hidden;
.accordian-body{
margin: 5px 0px 5px 10px;
}
.table .node-group-tag {
font-size:16px;
padding-bottom:6px;
}
}

@media only screen and (max-width: 720px) {
body {
font-size: 10px !important;
padding-top:60px !important;
}

.content {
padding: 0;
margin-bottom: 10px;
}

.node-cell.os,
.node-cell.location,
.node-cell.uptime {
display: none;
visibility: hidden;
}

.service-day-status-icon {
width: 8px;
height: 8px;
margin-right: 2px;
border-radius: 3px;
}
}

@media only screen and (max-width: 620px) {
body {
font-size: 10px !important;
}

.content {
padding: 0;
}

.node-cell.type,
.node-cell.location,
.node-cell.uptime,
.node-cell.traffic {
.node-cell.traffic{
display: none;
visibility: hidden;
}

.service-day-status-icon {
.node-cell.location{
display: table-cell;
visibility: visible;
}
}

@media only screen and (max-width: 533px) {
body {
font-size: 10px !important;
}

.content {
padding: 0;
}

.node-cell.os,
.node-cell.location,
.node-cell.uptime,
.node-cell.traffic {
.node-cell-os-text,.node-cell-location-text{
display: none;
visibility: hidden;
}

.service-day-status-icon {
.accordian-body{
margin: 5px 0px 5px 10px;
}
}

@media only screen and (max-width: 450px) {
body {
font-size: 10px !important;
}

.content {
padding: 0;
}

.node-cell.type,
.node-cell.location,
.node-cell.uptime,
.node-cell.traffic {
display: none;
visibility: hidden;
}

.node-cell.cpu,
.node-cell.ram,
.node-cell.hdd {
min-width: 25px;
max-width: 50px;
.table .node-group-tag {
font-size:12px;
padding-bottom:6px;
}
}

Expand Down
3 changes: 1 addition & 2 deletions resource/template/theme-server-status/content-footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{define "theme-server-status/content-footer"}}
<footer class="container" style="padding-bottom: 2rem;">
<p style="text-align: center; font-size: 10px;">
{{ .Conf.Site.Brand }} | Theme <a href="https://github.com/cppla/ServerStatus">ServerStatus</a> | Powered by <a
href="https://github.com/naiba/nezha">{{tr "NezhaMonitoring"}}</a> {{.Version}}
{{ .Conf.Site.Brand }} | Theme <a target="_blank" href="https://github.com/cppla/ServerStatus">ServerStatus</a> | Powered by <a target="_blank" href="https://github.com/naiba/nezha">{{tr "NezhaMonitoring"}}</a> {{.Version}}
</p>
</footer>
{{end}}
2 changes: 1 addition & 1 deletion resource/template/theme-server-status/content-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
</div>
</div>
</div>
{{end}}
{{end}}
13 changes: 6 additions & 7 deletions resource/template/theme-server-status/header.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{{define "theme-server-status/header"}}
<!DOCTYPE html>
<html lang="{{.Conf.Language}}">

<head>
<title>{{ .Title }}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/static/theme-server-status/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/theme-server-status/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="/static/theme-server-status/css/main.css?v20231109">
<link rel="stylesheet" href="/static/theme-server-status/css/main.css?v20231207">
<link rel="stylesheet" href="/static/theme-server-status/css/dark.css">
<link rel="stylesheet" href="/static/theme-server-status/css/light.css">
<link href="https://cdn.staticfile.org/font-logos/0.17/font-logos.min.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="https://cdn.staticfile.org/semantic-ui/2.4.1/semantic.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/font-logos/0.17/font-logos.min.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/semantic-ui/2.4.1/semantic.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.0.0/css/flag-icons.min.css">
<link rel="shortcut icon" type="image/png" href="/static/logo.svg?v20210804" />
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
Expand All @@ -23,12 +24,10 @@
{{if ts .CustomCode}}
{{.CustomCode|safe}}
{{end}}

<script src="/static/theme-server-status/js/jquery.min.js"></script>
<script src="/static/theme-server-status/js/bootstrap.min.js"></script>
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<script src="/static/theme-server-status/js/mixin.js"></script>
</head>

<body>
{{end}}
{{end}}
Loading

0 comments on commit 99111a3

Please sign in to comment.