From 4c4b9d8d02d8c6ebc751c39bc522007f80213427 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Fri, 2 Feb 2024 22:03:40 +0100 Subject: [PATCH] Make submenus collapsible on mobile too Had to change the link to the current language version of the page by a button, to prevent following a link when trying to expand the submenu. At first i did this with an `onclick="return false"` bullshit, but the link was the wrong thing to do here, and it was there only to satisfy Google et al. They will have to with the links in head. Also made the link and buttons larger to make it easier to hit them with finger. --- po/ca.po | 3 +-- po/es.po | 3 +-- po/fr.po | 3 +-- web/static/public.css | 16 +++++++++++++++- web/templates/public/layout.gohtml | 2 +- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/po/ca.po b/po/ca.po index 70922be..982f8d9 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2024-01-31 22:40+0100\n" +"POT-Creation-Date: 2024-02-02 21:57+0100\n" "PO-Revision-Date: 2023-07-22 23:45+0200\n" "Last-Translator: jordi fita mas \n" "Language-Team: Catalan \n" @@ -576,7 +576,6 @@ msgid "I have read and I accept %[1]sthe reservation conditions%[2]s" msgstr "He llegit i accepto %[1]sles condicions de reserves%[2]s" #: web/templates/public/layout.gohtml:12 web/templates/public/layout.gohtml:48 -#: web/templates/public/layout.gohtml:131 msgid "Campsite Montagut" msgstr "Càmping Montagut" diff --git a/po/es.po b/po/es.po index 19506b5..282a0e0 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2024-01-31 22:40+0100\n" +"POT-Creation-Date: 2024-02-02 21:57+0100\n" "PO-Revision-Date: 2023-07-22 23:46+0200\n" "Last-Translator: jordi fita mas \n" "Language-Team: Spanish \n" @@ -576,7 +576,6 @@ msgid "I have read and I accept %[1]sthe reservation conditions%[2]s" msgstr "He leído y acepto %[1]slas condiciones de reserva%[2]s" #: web/templates/public/layout.gohtml:12 web/templates/public/layout.gohtml:48 -#: web/templates/public/layout.gohtml:131 msgid "Campsite Montagut" msgstr "Camping Montagut" diff --git a/po/fr.po b/po/fr.po index 773bff4..f264133 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2024-01-31 22:40+0100\n" +"POT-Creation-Date: 2024-02-02 21:57+0100\n" "PO-Revision-Date: 2023-12-20 10:13+0100\n" "Last-Translator: Oriol Carbonell \n" "Language-Team: French \n" @@ -577,7 +577,6 @@ msgid "I have read and I accept %[1]sthe reservation conditions%[2]s" msgstr "J’ai lu et j’accepte %[1]sles conditions de réservation%[2]s" #: web/templates/public/layout.gohtml:12 web/templates/public/layout.gohtml:48 -#: web/templates/public/layout.gohtml:131 msgid "Campsite Montagut" msgstr "Camping Montagut" diff --git a/web/static/public.css b/web/static/public.css index b4b409c..82e6224 100644 --- a/web/static/public.css +++ b/web/static/public.css @@ -401,9 +401,23 @@ nav:last-of-type > ul > li:last-child { flex-direction: column; align-items: start; } + + nav:last-of-type li { + width: 100%; + } + + nav:last-of-type a, nav:last-of-type button { + width: 100%; + height: 100%; + display: block; + text-align: left; + } + + .boto-reserva { + height: unset; + } nav:last-of-type .has-submenu ul { - display: flex; position: static; padding-left: 2rem; margin-top: -1rem; diff --git a/web/templates/public/layout.gohtml b/web/templates/public/layout.gohtml index ce68934..44ffea7 100644 --- a/web/templates/public/layout.gohtml +++ b/web/templates/public/layout.gohtml @@ -70,7 +70,7 @@
  • {{( pgettext "Booking" "title" )}}
  • {{ if .LocalizedAlternates -}}
  • {{ range .LocalizedAlternates -}} - {{ if eq .Lang currentLocale }}{{ template "alternateAnchor" . }}{{ end }} + {{ if eq .Lang currentLocale }}{{ end }} {{- end }}
      {{ range .LocalizedAlternates }}{{ if ne .Lang currentLocale -}}