Skip to content

Commit 8d32375

Browse files
fix: tweak dark-mode colours
1 parent 5919fd2 commit 8d32375

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

internal/http/status.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ func operational(res []collector.Result) string {
7979
func bannerClasses(outage string) string {
8080
switch outage {
8181
case OutageNone:
82-
return "bg-lime-600 text-white"
82+
return "bg-lime-600 dark:bg-lime-800 text-white"
8383
case OutageFull:
84-
return "bg-red-500 text-white"
84+
return "bg-red-500 dark:bg-red-800 text-white"
8585
case OutagePartial:
8686
fallthrough
8787
default:
88-
return "bg-orange-400"
88+
return "bg-orange-400 dark:bg-orange-800 dark:text-white"
8989
}
9090
}
9191

internal/resources/views/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="icon" type="image/png" href="/static/icon.png" />
88
<title>{{ .Config.UI.PageTitle }}</title>
99
</head>
10-
<body class="mx-auto min-h-dvh w-full md:w-3/4 p-6 md:p-8 lg:p-6 lg:w-1/2 flex flex-col justify-between bg-neutral-50 dark:bg-slate-900">
10+
<body class="mx-auto min-h-dvh w-full md:w-3/4 p-6 md:p-8 lg:p-6 lg:w-1/2 flex flex-col justify-between bg-neutral-50 dark:bg-zinc-900">
1111
<div>
1212
{{ template "content" . }}
1313
</div>

internal/resources/views/service.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ <h1 class="text-xl font-bold md:inline-block md:mr-2 text-avocado-800 dark:text-
66
<span class="text-gray-500 dark:text-gray-300 text-sm">{{ $.Sprintf "%.2f" .Result.Uptime }}% over the last {{ $.PrettyDuration .Result.Service.Query.Range }}</span>
77
</div>
88

9-
<div class="h-64 md:h-96 w-full border dark:border-slate-600 rounded-md shadow-md mb-6">{{ .Graph }}</div>
9+
<div class="h-64 md:h-96 w-full border dark:border-none dark:bg-zinc-800 rounded-md shadow-md mb-6">{{ .Graph }}</div>
1010

1111
{{- if .Extras }}
1212
{{- range $name, $graph := .Extras }}
13-
<div class="w-full border dark:border-slate-600 rounded-md shadow-md pt-4 mb-6">
13+
<div class="w-full border dark:border-none dark:bg-zinc-800 rounded-md shadow-md pt-4 mb-6">
1414
<h2 class="text-center text-avocado-800 dark:text-avocado-100">{{ $name }}</h2>
1515
<div class="h-64 md:h-96 w-full">{{ $graph }}</div>
1616
</div>

internal/resources/views/status.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
{{- if not (eq .Name "default") }}
1515
<h2 class="text-xl mb-2 pl-1 text-avocado-800 dark:text-avocado-100">{{ .Name }}</h2>
1616
{{- end }}
17-
<div class="flex flex-col items-center justify-center rounded-md shadow-md dark:shadow-slate-600">
17+
<div class="flex flex-col items-center justify-center rounded-md shadow-md dark:shadow-none dark:bg-zinc-800">
1818
{{- range .Results }}
1919
<a href="/{{ .Service.Name }}" class="block w-full">
20-
<div class="flex justify-between items-center w-full py-6 px-6 md:px-8 lg:px-12 border-b dark:border-slate-600">
20+
<div class="flex justify-between items-center w-full py-6 px-6 md:px-8 lg:px-12 border-b dark:border-none">
2121
<div>
2222
<h3 class="text-lg font-bold md:inline-block md:mr-2 text-avocado-800 dark:text-avocado-100" >{{ .Service.Name }}</h3>
2323
<span class="text-gray-500 dark:text-gray-300 text-sm">{{ $.Sprintf "%.2f" .Uptime }}% over the last {{ $.PrettyDuration .Service.Query.Range }}</span>

tailwind.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ module.exports = {
33
content: ["internal/resources/views/*.html"],
44
safelist: [
55
'bg-lime-600',
6+
'dark:bg-lime-800',
67
'bg-red-500',
8+
'dark:bg-red-800',
79
'bg-orange-400',
10+
'dark:bg-orange-800',
811
'text-white',
12+
'dark:text-white',
913
'h-full',
1014
],
1115
theme: {

0 commit comments

Comments
 (0)