From c29e828d2398530e9b227ec18a8d3cb340fd209f Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Tue, 6 May 2025 14:45:01 +0100 Subject: [PATCH] Added loading message Signed-off-by: Marcus Noble --- templates/index.html | 84 ++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/templates/index.html b/templates/index.html index b59e74e..de9deb8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -55,43 +55,11 @@

Next Book

Suggestions for the next book to read from your Storygraph to-read pile

-
- {{ $cat := "Fiction" }} - {{ $book := index . $cat }} -
-

{{ $cat }}

- - {{ $book.Name }} cover - - {{ $book.Name }} -
⭐ {{ $book.Rating }}
-
- {{ $cat := "Non-Fiction" }} - {{ $book := index . $cat }} -
-

{{ $cat }}

- - {{ $book.Name }} cover - - {{ $book.Name }} -
⭐ {{ $book.Rating }}
-
- {{ $cat := "Comics" }} - {{ $book := index . $cat }} -
-

{{ $cat }}

- - {{ $book.Name }} cover - - {{ $book.Name }} -
⭐ {{ $book.Rating }}
-
- - {{ range $cat, $book := .}} - {{ if or (eq $cat "Fiction") (eq $cat "Non-Fiction") (eq $cat "Comics") }} - {{ continue }} - {{ end }} -
+ {{ if index . "Fiction" }} +
+ {{ $cat := "Fiction" }} + {{ $book := index . $cat }} +

{{ $cat }}

{{ $book.Name }} cover @@ -99,7 +67,45 @@ {{ $book.Name }}
⭐ {{ $book.Rating }}
- {{ end }} -
+ {{ $cat := "Non-Fiction" }} + {{ $book := index . $cat }} +
+

{{ $cat }}

+ + {{ $book.Name }} cover + + {{ $book.Name }} +
⭐ {{ $book.Rating }}
+
+ {{ $cat := "Comics" }} + {{ $book := index . $cat }} +
+

{{ $cat }}

+ + {{ $book.Name }} cover + + {{ $book.Name }} +
⭐ {{ $book.Rating }}
+
+ + {{ range $cat, $book := .}} + {{ if or (eq $cat "Fiction") (eq $cat "Non-Fiction") (eq $cat "Comics") }} + {{ continue }} + {{ end }} +
+

{{ $cat }}

+ + {{ $book.Name }} cover + + {{ $book.Name }} +
⭐ {{ $book.Rating }}
+
+ {{ end }} +
+ {{ else }} +
+

Still loading book recommendations...

+
+ {{ end }}