From b88c952be19b396e54b322095245d1a628484f74 Mon Sep 17 00:00:00 2001 From: pluja Date: Tue, 7 May 2024 23:12:35 +0200 Subject: [PATCH] optimize html code, reduce number of divs, improve some styling --- src/frontend/templates/index.html | 28 ++--- .../templates/partials/service_card.html | 59 ++++------ .../templates/partials/service_icons.html | 109 +++++++++--------- src/frontend/templates/service.html | 2 +- 4 files changed, 90 insertions(+), 108 deletions(-) diff --git a/src/frontend/templates/index.html b/src/frontend/templates/index.html index 4582d54..420aab7 100644 --- a/src/frontend/templates/index.html +++ b/src/frontend/templates/index.html @@ -1,14 +1,17 @@ {{if .Announcement}} -
- + + {{if .Announcement.Warning}} - - - + + + {{else}} - @@ -16,13 +19,10 @@ {{end}} - -
- {{.Announcement.Title}} - {{.Announcement.Body}} -
-
-
+ {{.Announcement.Title}} + + {{.Announcement.Body}} + {{end}} diff --git a/src/frontend/templates/partials/service_card.html b/src/frontend/templates/partials/service_card.html index 78715f2..25fcfea 100644 --- a/src/frontend/templates/partials/service_card.html +++ b/src/frontend/templates/partials/service_card.html @@ -1,31 +1,22 @@ {{/* service_card.html */}}
-
{{.Name}} logo -
-
-
- - {{if .Verified}} - - - - - {{end}} {{.Name}} - - - {{if isNew .Created}} - NEW - {{end}} +
+ + + + + + {{.Name}} - {{.Score}} - -
+ text-white/70">{{.Score}} + + {{shortText .Description | safe}} -
-
-
-
- {{if eq .Type "exchange"}} - {{.Type}} - {{else}} - {{.Category}} - {{end}} {{partial "partials/service_icons" .}} -
+
+ {{if eq .Type "exchange"}} + {{.Type}} + {{else}} + {{.Category}} + {{end}} {{partial "partials/service_icons" .}}
diff --git a/src/frontend/templates/partials/service_icons.html b/src/frontend/templates/partials/service_icons.html index e5c017d..16ca81b 100644 --- a/src/frontend/templates/partials/service_icons.html +++ b/src/frontend/templates/partials/service_icons.html @@ -1,59 +1,56 @@ -
+ + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/frontend/templates/service.html b/src/frontend/templates/service.html index 337fa67..dce4ea7 100644 --- a/src/frontend/templates/service.html +++ b/src/frontend/templates/service.html @@ -183,7 +183,7 @@
--> - {{partial "partials/service_icons" .Service}} + {{partial "partials/service_icons" .Service}}

{{if ne .Service.Description ""}} {{.Service.Description | safe}} {{else}} This {{.Service.Type}} does not have a description. {{end}}