diff --git a/README.md b/README.md index f0ec85e..8dda58a 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ - 默认主题更改进度条颜色示例 ``` - .ui.green.progress> .bar { + .ui.fine.progress> .bar { background-color: pink !important; } ``` diff --git a/cmd/agent/main.go b/cmd/agent/main.go index f96e4cf..01e72bb 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -25,7 +25,7 @@ var ( server string clientSecret string debug bool - version = "v9.9.9" + version string rootCmd = &cobra.Command{ Use: "nezha-agent", diff --git a/cmd/dashboard/controller/controller.go b/cmd/dashboard/controller/controller.go index b589c89..72628bd 100644 --- a/cmd/dashboard/controller/controller.go +++ b/cmd/dashboard/controller/controller.go @@ -28,6 +28,9 @@ func ServeWeb(port uint) { "css": func(s string) template.CSS { return template.CSS(s) }, + "tag": func(s string) template.HTML { + return template.HTML(`<` + s + `>`) + }, "stf": func(s uint64) string { return time.Unix(int64(s), 0).Format("2006年1月2号 15:04") }, diff --git a/resource/static/theme-hotaru/css/core.css b/resource/static/theme-hotaru/css/core.css index c00ff25..c5f0214 100644 --- a/resource/static/theme-hotaru/css/core.css +++ b/resource/static/theme-hotaru/css/core.css @@ -1589,12 +1589,6 @@ th { max-width: 100%; } -.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { - padding: 12px 10px; - line-height: 1.42857143; - vertical-align: middle; -} - .table > thead > tr > th { padding: 16px 10px; vertical-align: bottom; @@ -1622,67 +1616,6 @@ th { overflow: hidden; } -.progress { - height: 25px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); -} - -.progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #fff; - text-align: center; - background-color: #1e88e5; - -webkit-border-radius: 6px; - border-radius: 6px; - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; -} - -.progress-striped .progress-bar, .progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - background-size: 40px 40px; -} - -.progress.active .progress-bar, .progress-bar.active { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-bar-success { - background-color: #5cb85c; -} - -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} - -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} - -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} - .panel { position: relative; display: block; diff --git a/resource/static/theme-hotaru/css/main.css b/resource/static/theme-hotaru/css/main.css index 9742d7c..a74ae53 100644 --- a/resource/static/theme-hotaru/css/main.css +++ b/resource/static/theme-hotaru/css/main.css @@ -89,32 +89,6 @@ table { font-size: 24px; } -.location-progress .progress { - margin: 0 0 15px 0; -} - -.progress { - background-color: #d5dade; - -webkit-box-shadow: none; - box-shadow: none; -} - -.progress-bar { - background: linear-gradient(to right, #44ce78 0%, #43ce9f 100%) !important; -} - -.progress-bar-danger { - background: #d9534f !important; -} - -.progress-bar-warning { - background: #f0ad4e !important; -} - -.progress-sm { - height: 5px; -} - .table { /* font-size: 0.9rem; */ font-weight: 800; @@ -183,4 +157,21 @@ h1 { background-size: 100%; } } +} + +.location-progress .bar { + height: 0.5em !important; + margin-bottom: 1em !important; +} + +.ui.progress { + margin: unset !important; +} + +.ui.progress .bar { + line-height: unset !important; +} + +table tr { + height: 3em !important; } \ No newline at end of file diff --git a/resource/template/theme-default/home.html b/resource/template/theme-default/home.html index 21e389d..8fb2d4c 100644 --- a/resource/template/theme-default/home.html +++ b/resource/template/theme-default/home.html @@ -1,21 +1,21 @@ {{define "theme-default/home"}} {{template "common/header" .}} {{if ts .CustomCSS}} - +{{tag "/style"}} {{end}} {{template "common/menu" .}}
-
+
@#server.Name#@ + v-if='server.Host.Platform == "freebsd"' class="freebsd icon">@#server.Name + (server.live?'':' [已离线]')#@