Compare commits

..

No commits in common. "f262e92e09dd4e6ef8c25fe54021030b0165a62c" and "9f14cabc4cb6ad2aaa6c86c1a5d065531f488944" have entirely different histories.

5 changed files with 29 additions and 59 deletions

View File

@ -15,20 +15,14 @@ templ allAlbumsTempl(albums []utils.Album) {
Albums Albums
</h1> </h1>
<div class="px-2"> <div class="px-2">
<form
action="/album/"
method="GET"
hx-boost="true"
hx-target="#album-list"
hx-trigger="keyup changed delay:500ms from:input, search"
>
<input <input
class="inline-block w-full py-1 px-2 border border-sky-600 rounded-md text-sky-600" class="inline-block w-full py-1 px-2 border border-sky-600 rounded-md text-sky-600"
type="search"
placeholder="Search albums" placeholder="Search albums"
name="s" name="s"
hx-get="/album/"
hx-trigger="keyup changed delay:500ms"
hx-target="#album-list"
/> />
</form>
</div> </div>
<br/> <br/>
<div id="album-list" class="grid grid-cols-3 gap-2 px-2"> <div id="album-list" class="grid grid-cols-3 gap-2 px-2">

View File

@ -7,7 +7,7 @@ templ LoginTempl() {
<nav class="bg-sky-500 text-white text-xl font-bold p-2"> <nav class="bg-sky-500 text-white text-xl font-bold p-2">
music to go music to go
</nav> </nav>
<div hx-ext="response-targets" class="container"> <div hx-ext="response-targets">
Login to Navidrome: Login to Navidrome:
<br/> <br/>
<form <form
@ -22,7 +22,7 @@ templ LoginTempl() {
</label> </label>
<input <input
id="navidrome-url" id="navidrome-url"
class="w-full py-1 px-2 rounded bg-c-bg text-c-on-bg border border-sky-400" class="w-full py-1 px-2 rounded"
placeholder="https://" placeholder="https://"
name="navidrome-url" name="navidrome-url"
required required
@ -33,7 +33,7 @@ templ LoginTempl() {
</label> </label>
<input <input
id="username" id="username"
class="w-full py-1 px-2 rounded bg-c-bg text-c-on-bg border border-sky-400" class="w-full py-1 px-2 rounded"
placeholder="username" placeholder="username"
name="username" name="username"
required required
@ -44,7 +44,7 @@ templ LoginTempl() {
</label> </label>
<input <input
id="password" id="password"
class="w-full py-1 px-2 rounded bg-c-bg text-c-on-bg border border-sky-400" class="w-full py-1 px-2 rounded"
placeholder="password" placeholder="password"
name="password" name="password"
type="password" type="password"

View File

@ -28,9 +28,9 @@ templ IndexTempl(albums []utils.Album) {
} }
templ AlbumCard(album utils.Album) { templ AlbumCard(album utils.Album) {
<div class="inline-block p-1 rounded bg-zinc-200 dark:bg-zinc-800"> <div class="inline-block p-1 rounded bg-zinc-200 dark:bg-zinc-800 w-full max-w-32">
<div class="h-30 w-28 relative"> <div class="h-30 w-28 relative">
<img class="w-full" src={ fmt.Sprintf("/covers/%s", album.ID) }/> <img src={ fmt.Sprintf("/covers/%s", album.ID) }/>
<a <a
href={ templ.URL(fmt.Sprintf("/album/%s", album.ID)) } href={ templ.URL(fmt.Sprintf("/album/%s", album.ID)) }
class="inline-block w-full overflow-hidden whitespace-nowrap overflow-ellipsis hover:underline" class="inline-block w-full overflow-hidden whitespace-nowrap overflow-ellipsis hover:underline"

16
tailwind.config.cjs Normal file
View File

@ -0,0 +1,16 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./src/**/*.{html,templ,go}",
],
theme: {
extend: {
colors: {
"c-bg": "var(--c-bg)",
"c-on-bg": "var(--c-on-bg)",
}
},
},
plugins: [],
}

View File

@ -1,40 +0,0 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./src/**/*.{html,templ,go}",
],
theme: {
extend: {
colors: {
"c-bg": "var(--c-bg)",
"c-on-bg": "var(--c-on-bg)",
}
},
},
corePlugins: {
container: false
},
plugins: [
function({ addComponents }) {
addComponents({
'.container': {
maxWidth: '95%',
margin: "auto",
'@screen sm': {
maxWidth: '640px',
},
'@screen md': {
maxWidth: '768px',
},
'@screen lg': {
maxWidth: '1024px',
},
'@screen xl': {
maxWidth: '1280px',
},
}
})
}
],
}