#9 Changed the term game to soundtrack everywhere
Build / build (push) Successful in 45s

This commit is contained in:
2026-06-29 18:39:09 +02:00
parent dbef39b828
commit a8df738108
20 changed files with 708 additions and 682 deletions
+7 -7
View File
@@ -4,14 +4,14 @@ templ HelloForm() {
@Base() {
<button id="dark-mode-toggle">🌙</button>
<div id="search-container">
<input id="search_term" name="search_term" type="text" hx-post="/find" hx-trigger="keyup changed delay:0.25s" hx-target="#games-container"/>
<input id="search_term" name="search_term" type="text" hx-post="/find" hx-trigger="keyup changed delay:0.25s" hx-target="#soundtracks-container"/>
<button type="button" id="clear" name="clear">Clear</button>
</div>
<div id="games-container"></div>
<div id="soundtracks-container"></div>
<script>
document.addEventListener('readystatechange', () => {
if (document.readyState == 'complete') {
htmx.ajax('POST', '/find', '#games-container');
htmx.ajax('POST', '/find', '#soundtracks-container');
document.getElementById("search_term").focus();
// Initialize dark mode from localStorage (default to dark)
@@ -38,17 +38,17 @@ templ HelloForm() {
document.getElementById("clear").addEventListener("click", function (event) {
document.getElementById("search_term").value = "";
htmx.ajax('POST', '/find', '#games-container');
htmx.ajax('POST', '/find', '#soundtracks-container');
document.getElementById("search_term").focus();
});
</script>
}
}
templ FoundGames(games []string) {
for _, game := range games {
templ FoundSoundtracks(soundtracks []string) {
for _, soundtrack := range soundtracks {
<div class="bg-green-100 p-4 shadow-md rounded-lg mt-6">
<p class="game-text">{ game }</p>
<p class="soundtrack-text">{ soundtrack }</p>
</div>
}
}