From b250e7ad946a42b5d1d89c92dd6e5c51fd55a85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Setni=C4=8Dka?= Date: Sun, 1 Aug 2021 23:04:06 +0200 Subject: [PATCH] UI tweaks --- static/css/shrecker.css | 6 +++++- templates/org/org_index_map.tmpl | 2 +- templates/org/org_messages.tmpl | 2 +- templates/org/org_team.tmpl | 2 +- templates/org/org_team_cipher.tmpl | 16 +++++++++------- templates/org/parts/org_dashboard.tmpl | 2 +- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/static/css/shrecker.css b/static/css/shrecker.css index 37864da..90d91a9 100644 --- a/static/css/shrecker.css +++ b/static/css/shrecker.css @@ -15,7 +15,7 @@ header { top: 0; background-color: #222; border: 1px #222 solid; - z-index: 10; + z-index: 1010; display: flex; } header h1 { @@ -68,6 +68,10 @@ nav#main-menu a.active { color: black; } +input.btn:disabled { + opacity: 0.25; +} + /******************************************************************************/ #mapa { diff --git a/templates/org/org_index_map.tmpl b/templates/org/org_index_map.tmpl index 3568308..3d4673b 100644 --- a/templates/org/org_index_map.tmpl +++ b/templates/org/org_index_map.tmpl @@ -56,7 +56,7 @@ var team_paths = []; team_markers[{{ .Config.ID }}] = L.marker({{ .Status.Point | latlon }}, { title: "{{ .Config.Name }}", icon: teamIcon, - }).bindPopup("Tým {{ .Config.Name }}").addTo(map).on('click', function() { + }).bindPopup("Tým {{ .Config.Name }}
(detail týmu)").addTo(map).on('click', function() { displayedPath = team_paths["{{ .Config.ID }}"]; displayedPath.addTo(map); }); diff --git a/templates/org/org_messages.tmpl b/templates/org/org_messages.tmpl index 082b654..56cc07e 100644 --- a/templates/org/org_messages.tmpl +++ b/templates/org/org_messages.tmpl @@ -28,7 +28,7 @@ {{ if $c }}{{ $c.Name }}{{ else }}???{{ end }} {{ end }} {{ .Text }} - {{ .Response }} + {{ .Response | safeHTML }} {{ end }} diff --git a/templates/org/org_team.tmpl b/templates/org/org_team.tmpl index 7797413..c9c2f7c 100644 --- a/templates/org/org_team.tmpl +++ b/templates/org/org_team.tmpl @@ -119,7 +119,7 @@ {{ if $c }}{{ $c.Name }}{{ else }}???{{ end }} {{ end }} {{ .Text }} - {{ .Response }} + {{ .Response | safeHTML }} {{ end }} diff --git a/templates/org/org_team_cipher.tmpl b/templates/org/org_team_cipher.tmpl index a10449c..b7ebaf4 100644 --- a/templates/org/org_team_cipher.tmpl +++ b/templates/org/org_team_cipher.tmpl @@ -29,7 +29,7 @@ {{- $cipher := index $.CiphersMap $cid -}} {{- $cipherStatus := index $.CiphersStatus $cid -}} {{- if $first }}{{ $first = false }}{{ else }}, {{ end -}} - {{ if and $cipherStatus $cipherStatus.Solved }}✅{{ else }}❌{{ end }} + {{ if and $cipherStatus $cipherStatus.Solved }}✅{{ else if and $cipherStatus $cipherStatus.Skip }}⏩{{ else }}❌{{ end }} {{ $cipher.Name }} {{- end }}
@@ -64,21 +64,22 @@ Vyřešená{{ if .CipherStatus.Solved }}✅ {{ .CipherStatus.Solved | timestamp }}{{ else }} ❌ {{ if not .CipherStatus.Skip }}
{{ .CSRF }} - +
{{ end }} {{ end }} - Nápověda{{ if .CipherStatus.Hint }}vydaná {{ .CipherStatus.Hint | timestamp }}{{ else }} + Nápověda{{ if .CipherStatus.Hint }}💡 vydaná {{ .CipherStatus.Hint | timestamp }}{{ else }} nevydaná {{ if not (or .CipherStatus.Skip .CipherStatus.Solved) }}
{{ .CSRF }} - +
{{ end }} {{ end }} - Přeskočení{{ if .CipherStatus.Skip }}přeskočeno {{ .CipherStatus.Skip | timestamp }}{{ else }} + Přeskočení{{ if .CipherStatus.Skip }}⏩ přeskočeno {{ .CipherStatus.Skip | timestamp }}{{ else }} nepřeskočeno {{ if not .CipherStatus.Solved }}
{{ .CSRF }} - +
{{ end }} {{ end }} + {{ if not .CipherStatus.Skip }} Extra body
{{ .CSRF }} @@ -86,6 +87,7 @@
+ {{ end }} Získané body{{ .CipherStatus.Points }} {{ end }} @@ -105,7 +107,7 @@ {{ .Time | timestamp_hint }} {{ if .SMSID }}{{ .PhoneNumber }}{{ else }}{{ .PhoneNumber }}{{ end }} {{ .Text }} - {{ .Response }} + {{ .Response | safeHTML }} {{ end }} diff --git a/templates/org/parts/org_dashboard.tmpl b/templates/org/parts/org_dashboard.tmpl index 984faa8..2090390 100644 --- a/templates/org/parts/org_dashboard.tmpl +++ b/templates/org/parts/org_dashboard.tmpl @@ -29,7 +29,7 @@ {{ .Config.Name }} - {{ if $game.HasMap }}
🗺{{ end }} + {{ if $game.HasMap }}
zobrazit na mapě{{ end }} {{- if eq $game.OrderMode "points" }}
Bodů: {{ .Points }}{{ end -}} {{- $team := . -}}