Skip to content

Commit b9fc50c

Browse files
committed
restyle ui to match odio.love and pwa
1 parent 343a47b commit b9fc50c

5 files changed

Lines changed: 65 additions & 31 deletions

File tree

tailwind.config.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,26 @@ module.exports = {
44
"./ui/templates/**/*.gohtml",
55
],
66
theme: {
7-
extend: {},
7+
extend: {
8+
colors: {
9+
// Remap zinc → forest palette (dark green-tinted)
10+
zinc: {
11+
100: '#e4f0e5',
12+
200: '#c4dcc8',
13+
300: '#9ab8a2',
14+
400: '#6a9472',
15+
500: '#3a5440',
16+
600: '#243629',
17+
700: '#1a2a1e',
18+
800: '#131d16',
19+
900: '#0d1410',
20+
950: '#060c08',
21+
},
22+
leaf: '#4a7c59',
23+
moss: '#2a4e35',
24+
gold: '#c8963a',
25+
},
26+
},
827
},
928
plugins: [],
1029
}

ui/static/logo.png

40.1 KB
Loading

ui/styles/input.css

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ details > summary::-webkit-details-marker {
1616
height: 8px;
1717
}
1818
::-webkit-scrollbar-track {
19-
background: #18181b;
19+
background: #0d1410;
2020
}
2121
::-webkit-scrollbar-thumb {
22-
background: #3f3f46;
22+
background: #243629;
2323
border-radius: 4px;
2424
}
2525
::-webkit-scrollbar-thumb:hover {
26-
background: #52525b;
26+
background: #3a5440;
2727
}
2828

2929
/* HTMX request indicator */
@@ -45,9 +45,10 @@ button.htmx-request {
4545
/* Volume & seek sliders */
4646
.volume-slider,
4747
.seek-slider {
48+
accent-color: #c8963a;
4849
height: 4px;
4950
border-radius: 2px;
50-
background: #3f3f46;
51+
background: #243629;
5152
outline: none;
5253
opacity: 0.9;
5354
transition: opacity 0.2s;
@@ -73,7 +74,7 @@ button.htmx-request {
7374
width: 14px;
7475
height: 14px;
7576
border-radius: 50%;
76-
background: #3b82f6;
77+
background: #c8963a;
7778
cursor: pointer;
7879
}
7980

@@ -82,18 +83,24 @@ button.htmx-request {
8283
width: 14px;
8384
height: 14px;
8485
border-radius: 50%;
85-
background: #3b82f6;
86+
background: #c8963a;
8687
cursor: pointer;
8788
border: none;
8889
}
8990

9091
.volume-slider::-moz-range-progress,
9192
.seek-slider::-moz-range-progress {
92-
background: #3b82f6;
93+
background: #c8963a;
9394
height: 4px;
9495
border-radius: 2px;
9596
}
9697

98+
/* Forest theme: highlight playing state with leaf green */
99+
.status-badge-playing {
100+
background-color: rgba(74, 124, 89, 0.2);
101+
color: #4a7c59;
102+
}
103+
97104
/* Component utility classes */
98105
@layer components {
99106
.section-card {
@@ -129,23 +136,23 @@ button.htmx-request {
129136
}
130137

131138
.badge-green {
132-
@apply bg-green-500/10 text-green-400;
139+
@apply bg-leaf/10 text-leaf;
133140
}
134141

135142
.badge-blue {
136-
@apply bg-blue-500/10 text-blue-400;
143+
@apply bg-zinc-700/50 text-zinc-400;
137144
}
138145

139146
.badge-purple {
140-
@apply bg-purple-500/10 text-purple-400;
147+
@apply bg-moss/30 text-zinc-300;
141148
}
142149

143150
.badge-red {
144151
@apply bg-red-500/20 text-red-400;
145152
}
146153

147154
.player-card {
148-
@apply flex flex-col gap-3 rounded-lg bg-zinc-700/50 p-3 transition-colors hover:bg-zinc-700;
155+
@apply flex flex-col gap-3 rounded-lg bg-zinc-900/50 p-3 transition-colors hover:bg-zinc-900;
149156
container-type: inline-size;
150157
}
151158

@@ -155,7 +162,7 @@ button.htmx-request {
155162
}
156163

157164
.btn {
158-
@apply rounded-lg bg-zinc-600/50 px-3 py-2 text-sm transition-colors hover:bg-zinc-600 active:scale-95;
165+
@apply rounded-lg bg-zinc-700/50 px-3 py-2 text-sm transition-colors hover:bg-zinc-700 active:scale-95;
159166
}
160167

161168
.text-muted {
@@ -205,15 +212,18 @@ button.htmx-request {
205212

206213
/* Typography utilities */
207214
.player-name {
208-
@apply truncate font-medium text-zinc-200;
215+
@apply truncate font-medium;
216+
color: #e4e4e7;
209217
}
210218

211219
.player-meta {
212-
@apply truncate text-sm text-muted;
220+
@apply truncate text-sm;
221+
color: #a1a1aa;
213222
}
214223

215224
.player-meta-small {
216-
@apply truncate text-xs text-subtle;
225+
@apply truncate text-xs;
226+
color: #71717a;
217227
}
218228

219229
.empty-state-icon {

ui/templates/base.gohtml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
<title>{{ .Title }}</title>
99

10+
<link rel="icon" type="image/png" href="/ui/static/logo.png">
11+
1012
<!-- Compiled Tailwind CSS -->
1113
<link rel="stylesheet" href="/ui/static/output.css">
1214

@@ -21,33 +23,36 @@
2123
<header class="sticky top-0 z-10 border-b border-zinc-800 bg-zinc-900/95 backdrop-blur">
2224
<div class="mx-auto max-w-7xl px-4 py-3 sm:px-6 lg:px-8">
2325
<div class="flex items-center justify-between">
24-
<div>
25-
<h1 class="text-lg font-semibold sm:text-xl">
26-
{{ .Title }}
27-
</h1>
28-
{{ if .ServerInfo }}
29-
<p class="text-xs text-zinc-500 sm:text-sm">
30-
{{ .ServerInfo.Hostname }}
31-
</p>
32-
{{ end }}
26+
<div class="flex items-center gap-3">
27+
<img src="/ui/static/logo.png" alt="odio logo" class="h-10 w-10 object-contain">
28+
<div>
29+
<h1 class="text-lg font-semibold sm:text-xl lowercase">
30+
{{ .Title }}
31+
</h1>
32+
{{ if .ServerInfo }}
33+
<p class="text-xs text-zinc-500 sm:text-sm">
34+
{{ .ServerInfo.Hostname }}
35+
</p>
36+
{{ end }}
37+
</div>
3338
</div>
3439

3540
{{ if .ServerInfo }}
3641
<div class="flex items-center gap-3">
3742
<!-- Backend status badges (hidden on mobile) -->
3843
<div class="hidden gap-2 sm:flex">
3944
{{ if .ServerInfo.Backends.PulseAudio }}
40-
<span class="rounded-full bg-blue-500/10 px-2 py-1 text-xs text-blue-400">
45+
<span class="rounded-full bg-zinc-700/50 px-2 py-1 text-xs text-zinc-400">
4146
Audio
4247
</span>
4348
{{ end }}
4449
{{ if .ServerInfo.Backends.MPRIS }}
45-
<span class="rounded-full bg-green-500/10 px-2 py-1 text-xs text-green-400">
50+
<span class="rounded-full bg-leaf/10 px-2 py-1 text-xs text-leaf">
4651
MPRIS
4752
</span>
4853
{{ end }}
4954
{{ if .ServerInfo.Backends.Systemd }}
50-
<span class="rounded-full bg-purple-500/10 px-2 py-1 text-xs text-purple-400">
55+
<span class="rounded-full bg-moss/20 px-2 py-1 text-xs text-zinc-300">
5156
Systemd
5257
</span>
5358
{{ end }}

ui/templates/sections/pulseaudio.gohtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
<div class="info-card mb-4">
2323
<div class="mb-2 text-xs text-subtle">Default Sink</div>
2424
<div class="sink-dropdown relative mb-3">
25-
<button onclick="this.nextElementSibling.classList.toggle('hidden')" class="truncate text-sm font-medium w-full text-left cursor-pointer hover:text-blue-400 transition-colors" title="{{ .DefaultSink.Description }}">
25+
<button onclick="this.nextElementSibling.classList.toggle('hidden')" class="truncate text-sm font-medium w-full text-left cursor-pointer hover:text-leaf transition-colors" title="{{ .DefaultSink.Description }}">
2626
{{ .DefaultSink.Description }} <span class="text-xs text-subtle">▾</span>
2727
</button>
28-
<ul class="hidden absolute left-0 right-0 mt-1 bg-gray-800 border border-gray-600 rounded shadow-lg z-10 max-h-48 overflow-y-auto">
28+
<ul class="hidden absolute left-0 right-0 mt-1 bg-zinc-800 border border-zinc-700 rounded shadow-lg z-10 max-h-48 overflow-y-auto">
2929
{{ range .Outputs }}
3030
<li>
3131
<button onclick="setDefaultOutput('{{ .Name }}'); closeSinkDropdown()"
32-
class="w-full text-left px-3 py-2 text-sm hover:bg-gray-700 cursor-pointer truncate {{ if .Default }}text-blue-400 font-medium{{ else }}text-gray-300{{ end }}">
32+
class="w-full text-left px-3 py-2 text-sm hover:bg-zinc-700 cursor-pointer truncate {{ if .Default }}text-leaf font-medium{{ else }}text-zinc-300{{ end }}">
3333
{{ .Description }}
3434
</button>
3535
</li>

0 commit comments

Comments
 (0)