amuse.git

commit 9c3332d8afc01ca561c11fdf92467ce20ca00529

Author: Adam <git@apiote.tk>

show empty screens in lists

 i18n/en-GB.toml | 10 ++++++++++
 templates/experiences.html | 17 +++++++++++++++++
 templates/tvqueue.html | 17 +++++++++++++++++
 templates/watchlist.html | 16 ++++++++++++++++


diff --git a/i18n/en-GB.toml b/i18n/en-GB.toml
index eb0309044f33f609afb6958759598b2b49214590..a1ba82dbe1ed8ac2b8151f6355bbe842d3b4537f 100644
--- a/i18n/en-GB.toml
+++ b/i18n/en-GB.toml
@@ -64,6 +64,16 @@ search = "search…"
 
 unknown = "unknown"
 
+empty_quote = "‘Nothing to see here! Please disperse!’"
+empty_character = "Lt. Frank Drebin"
+empty_title = "The Naked Gun: From the Files of Police Squad!"
+
+too_far_quote = "‘Grunkle Stan, you’ve gone too far this time!’"
+too_far_character = "Mabel Pines"
+too_far_title = "Gravity Falls"
+too_far_code = "S01E13"
+too_far_episode = "Boss Mabel"
+
 [index]
 # `{}` is replaced with search field
 let_amuse_you = "Let {} amuse You"




diff --git a/templates/experiences.html b/templates/experiences.html
index cb8b0d4d37c69a51ae0ac204f8f4808df16b752c..ac8d54f934d21203422855a241bdb492edf626c7 100644
--- a/templates/experiences.html
+++ b/templates/experiences.html
@@ -42,6 +42,7 @@ 				
<input type="search" name="filter" class="border-none bg-none sans text" placeholder="filter experiences" value="{{.Data.Query}}" /> </form> </div>--> + {{if .Data.List}} <div class="flex flex-row flex-wrap flex-justify-space flex-align-start margin-top-1"> <div> {{if gt .Data.Page 1}} @@ -88,6 +89,22 @@ {{end}} </div> </div> + {{else if eq .Data.Pages 0}} + <div class="font-2 w12 flex flex-centre margin-top-10"> + <div> + <p>{{.Strings.Global.empty_quote}}</p> + <p class="indent-2 sans">—{{.Strings.Global.empty_character}} (<span class="italic sans">{{.Strings.Global.empty_title}}</span>)</p> + </div> + </div> + <div> + {{else if gt .Data.Page .Data.Pages}} + <div class="font-2 w12 flex flex-centre margin-top-10"> + <div> + <p>{{.Strings.Global.too_far_quote}}</p> + <p class="indent-2 sans">—{{.Strings.Global.too_far_character}} (<span class="italic sans">{{.Strings.Global.too_far_title}}</span>, {{.Strings.Global.too_far_code}} {{.Strings.Global.too_far_episode}})</p> + </div> + </div> + {{end}} </main> </body> </html> diff --git a/templates/tvqueue.html b/templates/tvqueue.html index 551fb047c3177f0d5431879c5edcf50c193636fd..974a6f5b705cb7fa586740ebb16dcb33e03eca9d 100644 --- a/templates/tvqueue.html +++ b/templates/tvqueue.html @@ -42,6 +42,7 @@ <input type="search" name="filter" class="border-none bg-none sans text" placeholder="filter TV queue" value="{{.Data.Query}}" /> </form> </div>--> + {{if .Data.List}} <div class="flex flex-row flex-wrap flex-justify-space flex-align-start margin-top-1"> <div> {{if gt .Data.Page 1}} @@ -97,6 +98,22 @@ {{end}} </div> </div> + {{else if eq .Data.Pages 0}} + <div class="font-2 w12 flex flex-centre margin-top-10"> + <div> + <p>{{.Strings.Global.empty_quote}}</p> + <p class="indent-2 sans">—{{.Strings.Global.empty_character}} (<span class="italic sans">{{.Strings.Global.empty_title}}</span>)</p> + </div> + </div> + <div> + {{else if gt .Data.Page .Data.Pages}} + <div class="font-2 w12 flex flex-centre margin-top-10"> + <div> + <p>{{.Strings.Global.too_far_quote}}</p> + <p class="indent-2 sans">—{{.Strings.Global.too_far_character}} (<span class="italic sans">{{.Strings.Global.too_far_title}}</span>, {{.Strings.Global.too_far_code}} {{.Strings.Global.too_far_episode}})</p> + </div> + </div> + {{end}} </main> </body> </html> diff --git a/templates/watchlist.html b/templates/watchlist.html index 943d01daa092f0949abafb938b3068c65ab71023..9cf66726b81a195365cf8a44921303cc00affef2 100644 --- a/templates/watchlist.html +++ b/templates/watchlist.html @@ -42,6 +42,7 @@ <input type="search" name="filter" class="border-none bg-none sans text" placeholder="filter watchlist" value="{{.Data.Query}}" /> </form> </div> + {{if .Data.List}} <div class="flex flex-row flex-wrap flex-justify-space flex-align-start margin-top-1"> <div> {{if gt .Data.Page 1}} @@ -94,6 +95,21 @@ {{end}} </div> </div> + {{else if and (gt .Data.Page .Data.Pages) (gt .Data.Pages 0)}} + <div class="font-2 w12 flex flex-centre margin-top-10"> + <div> + <p>{{.Strings.Global.too_far_quote}}</p> + <p class="indent-2 sans">—{{.Strings.Global.too_far_character}} (<span class="italic sans">{{.Strings.Global.too_far_title}}</span>, {{.Strings.Global.too_far_code}} {{.Strings.Global.too_far_episode}})</p> + </div> + </div> + {{else}} + <div class="font-2 w12 flex flex-centre margin-top-10"> + <div> + <p>{{.Strings.Global.empty_quote}}</p> + <p class="indent-2 sans">—{{.Strings.Global.empty_character}} (<span class="italic sans">{{.Strings.Global.empty_title}}</span>)</p> + </div> + </div> + {{end}} </main> </body> </html>