Your screenshot had no navigation at all: brand, three language letters, posts.
The cause is one missing button, and the CSS has been waiting for it since the
WordPress port. `main.css` hid `.site-bar__pages` below 768px and showed it
again on a class, and styled a `.site-bar__hamburger` — the panel's styles, the
button's styles and the animated ✕ were all ported, and the button itself never
was. Nothing in the theme has ever set that class. So for three phases every
phone saw the site with no menu, with every rule involved correct and every
selector pointing at an element that did not exist.
The toggle is a visually hidden checkbox immediately before the menu, with the ☰
as a `<label>` for it in the bar, and one rule doing the work. No JavaScript.
Not `<details>`, which is this project's usual answer and does not work here: on
desktop the menu has to be open and horizontal, and current Chrome hides a
closed `<details>`'s content with `content-visibility` on `::details-content`,
which a `display` rule on the child no longer overrides. A checkbox behaves the
same in every engine, keeps its place in the tab order and keeps its label.
`test_templates.py` now fails if the stylesheet hides the menu behind a state
the header does not carry — the shape of bug this suite keeps meeting, and the
first time it is guarded rather than found by looking.
**Comunidad is a button in the bar** at every width, brand-coloured through the
tokens Marca writes, instead of a word in a menu that on a phone would not open.
Its three translations moved from the `menus.main` blocks into `t.html`: the URL
is the same in every language, so the menu entry was only carrying a label. The
language switcher is rendered twice, in the bar and at the foot of the panel —
a brand, a button, a ☰ and three language letters do not fit across 360px and
CSS cannot move an element between the two.
**Categories and tags are gone**, both taxonomies. Nothing downstream had to
change: the agenda, the event page, the .ics and the private calendar already
keyed on `event_date` rather than on the category, which I checked before
removing anything. The category was only a gate in the editor, so the gate goes
too — **a post carrying a date is an event**, with nothing to tick first and no
way left to say "this is an event" and then not say when. Migration 6 drops the
two columns that held the terms.
`taxonomies: {}` rather than no `taxonomies` key: leaving the key out restores
Hugo's own defaults, which are tags and categories, so deleting the block built
the very pages it was meant to remove.
Also here, found while looking at the output rather than assumed: the breadcrumb
schema emitted a subpage's parent and the page itself both at position 2, and
the members area's six-section nav had no wrap and no scroll, so `/comunidad/`
on a phone scrolled sideways. It wraps now — two lines showing all six, where a
swipe strip would have left Calendario and Gestión off the edge with nothing to
say they were there.
Verified by rendering: headless Chromium at 320px, 390px and 1280px, before and
after opening the menu, and the members area at 390px. No horizontal overflow at
any of them. 548 tests pass; the build is clean with the pipeline's own flags.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
222 lines
9.9 KiB
HTML
222 lines
9.9 KiB
HTML
{{/* GEO/SEO surfaces — ported from theme/inc/seo.php:
|
|
hreflang alternates, Open Graph + og:locale(:alternate), Twitter Card,
|
|
JSON-LD BlogPosting (articles) / Blog (home), all with inLanguage. */}}
|
|
{{ $localeMap := .Site.Params.localeMap }}
|
|
{{ $locale := index $localeMap .Language.Lang | default "es_ES" }}
|
|
{{ $desc := "" }}
|
|
{{ if .IsPage }}{{ $desc = .Description | default (.Summary | plainify | truncate 200) }}{{ else }}{{ $desc = .Site.Params.description }}{{ end }}
|
|
{{/* One line, always. A summary pulled out of the body arrives with the line
|
|
breaks the prose had, and a newline inside og:description is a card that
|
|
renders raggedly in some readers and truncated in others. */}}
|
|
{{ $desc = trim ($desc | plainify | replaceRE "\\s+" " ") " " }}
|
|
|
|
{{/* The picture a share card shows. A page's own image when it has one, and
|
|
otherwise the fallback: the logo uploaded in Gestión → Marca, or
|
|
`params.defaultImage` when there is no logo. The logo comes first because
|
|
it is the one somebody can change without the repository — and because
|
|
`defaultImage` only ever existed as the line to fill in once a logo
|
|
arrived. With neither, a card shows title and description and no picture,
|
|
which is what happened before either existed.
|
|
|
|
Absolute, because WhatsApp, Signal, Mastodon and Bluesky all fetch it from
|
|
outside and a relative path means nothing to them. */}}
|
|
{{ $brandLogo := "" }}
|
|
{{ with site.Data.brand }}{{ $brandLogo = .logo }}{{ end }}
|
|
{{ $fallback := or $brandLogo .Site.Params.defaultImage }}
|
|
{{ $image := "" }}
|
|
{{ with .Params.image }}{{ $image = . | absURL }}
|
|
{{ else }}{{ with $fallback }}{{ $image = . | absURL }}{{ end }}{{ end }}
|
|
|
|
<meta name="description" content="{{ $desc }}">
|
|
|
|
{{/* hreflang — one alternate per language sibling + x-default to Spanish */}}
|
|
{{ if .IsTranslated }}
|
|
{{ range .AllTranslations }}
|
|
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}">
|
|
{{ end }}
|
|
{{ range .AllTranslations }}{{ if eq .Language.Lang "es" }}
|
|
<link rel="alternate" hreflang="x-default" href="{{ .Permalink }}">
|
|
{{ end }}{{ end }}
|
|
{{ end }}
|
|
|
|
{{ if and .IsPage (eq .Section "post") }}
|
|
{{/* ---- Article ---- */}}
|
|
<meta property="og:type" content="article">
|
|
<meta property="og:site_name" content="{{ .Site.Title }}">
|
|
<meta property="og:title" content="{{ .Title }}">
|
|
<meta property="og:description" content="{{ $desc }}">
|
|
<meta property="og:url" content="{{ .Permalink }}">
|
|
<meta property="og:locale" content="{{ $locale }}">
|
|
{{ range .Translations }}
|
|
{{ with index $localeMap .Language.Lang }}<meta property="og:locale:alternate" content="{{ . }}">{{ end }}
|
|
{{ end }}
|
|
{{ with $image }}
|
|
<meta property="og:image" content="{{ . }}">
|
|
<meta property="og:image:alt" content="{{ $.Params.image_alt | default $.Title }}">
|
|
{{ end }}
|
|
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" }}">
|
|
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }}">
|
|
{{ with .Params.author }}<meta property="article:author" content="{{ . }}">{{ end }}
|
|
|
|
<meta name="twitter:card" content="{{ if $image }}summary_large_image{{ else }}summary{{ end }}">
|
|
<meta name="twitter:title" content="{{ .Title }}">
|
|
<meta name="twitter:description" content="{{ $desc }}">
|
|
{{ with $image }}<meta name="twitter:image" content="{{ . }}">{{ end }}
|
|
|
|
{{ $schema := dict
|
|
"@context" "https://schema.org"
|
|
"@type" "BlogPosting"
|
|
"inLanguage" .Site.Language.LanguageCode
|
|
"headline" .Title
|
|
"description" $desc
|
|
"url" .Permalink
|
|
"datePublished" (.Date.Format "2006-01-02T15:04:05-07:00")
|
|
"dateModified" (.Lastmod.Format "2006-01-02T15:04:05-07:00")
|
|
"author" (dict "@type" "Person" "name" (.Params.author | default .Site.Title))
|
|
"publisher" (dict "@type" "Organization" "name" .Site.Title "url" .Site.Home.Permalink)
|
|
"mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink)
|
|
}}
|
|
{{/* The author's own page, when they have published one. An answer engine
|
|
citing this article can then say who wrote it and point somewhere real —
|
|
which is the whole reason the byline carries a URL. */}}
|
|
{{ with .Params.author_url }}
|
|
{{ $schema = merge $schema (dict "author" (dict
|
|
"@type" "Person"
|
|
"name" ($.Params.author | default $.Site.Title)
|
|
"url" (. | absURL))) }}
|
|
{{ end }}
|
|
{{ with $image }}{{ $schema = merge $schema (dict "image" .) }}{{ end }}
|
|
<script type="application/ld+json">{{ $schema | jsonify (dict "indent" " ") | safeJS }}</script>
|
|
|
|
{{ partial "breadcrumbs-schema.html" . }}
|
|
{{ partial "faq-schema.html" . }}
|
|
|
|
{{/* An event is also an Event. This is what puts a date next to the result in a
|
|
search listing, and what an answer engine reads when somebody asks what is
|
|
on in Vienna this weekend — the article alone says none of it in a form a
|
|
machine can use. */}}
|
|
{{ with .Params.event_date }}
|
|
{{ $when := . | time.AsTime }}
|
|
{{ $start := $when.Format "2006-01-02" }}
|
|
{{ with $.Params.event_time }}{{ $start = printf "%sT%s:00" $start . }}{{ end }}
|
|
{{ $event := dict
|
|
"@context" "https://schema.org"
|
|
"@type" "Event"
|
|
"name" $.Title
|
|
"startDate" $start
|
|
"url" $.Permalink
|
|
"inLanguage" $.Site.Language.LanguageCode
|
|
"eventAttendanceMode" "https://schema.org/OfflineEventAttendanceMode"
|
|
"eventStatus" "https://schema.org/EventScheduled"
|
|
"organizer" (dict "@type" "Organization" "name" $.Site.Title "url" $.Site.Home.Permalink)
|
|
}}
|
|
{{ with $desc }}{{ $event = merge $event (dict "description" .) }}{{ end }}
|
|
{{ with $image }}{{ $event = merge $event (dict "image" .) }}{{ end }}
|
|
{{ with $.Params.event_location }}
|
|
{{ $event = merge $event (dict "location" (dict
|
|
"@type" "Place"
|
|
"name" .
|
|
"address" (dict "@type" "PostalAddress" "addressLocality" "Wien" "addressCountry" "AT"))) }}
|
|
{{ end }}
|
|
<script type="application/ld+json">{{ $event | jsonify (dict "indent" " ") | safeJS }}</script>
|
|
{{ end }}
|
|
|
|
{{ else if .IsHome }}
|
|
{{/* ---- Home ---- */}}
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:site_name" content="{{ .Site.Title }}">
|
|
<meta property="og:title" content="{{ .Site.Title }}">
|
|
<meta property="og:description" content="{{ $desc }}">
|
|
<meta property="og:url" content="{{ .Permalink }}">
|
|
<meta property="og:locale" content="{{ $locale }}">
|
|
{{/* The home page shared without a picture until there was one to use. Now
|
|
that an admin can upload a logo, the front page of the site is the last
|
|
place that should share as a bare link. */}}
|
|
{{ with $image }}
|
|
<meta property="og:image" content="{{ . }}">
|
|
<meta property="og:image:alt" content="{{ $.Site.Title }}">
|
|
<meta name="twitter:image" content="{{ . }}">
|
|
{{ end }}
|
|
|
|
{{ $org := dict
|
|
"@context" "https://schema.org"
|
|
"@type" "Organization"
|
|
"name" .Site.Title
|
|
"url" .Site.Home.Permalink
|
|
"description" .Site.Params.description
|
|
"areaServed" (dict "@type" "City" "name" "Wien" "addressCountry" "AT")
|
|
}}
|
|
{{/* The same fallback as the share card: the admin's logo, then the configured
|
|
default. This is the field a search engine uses to put a mark beside the
|
|
organisation's name, so it should be the logo somebody actually uploaded. */}}
|
|
{{ with $fallback }}{{ $org = merge $org (dict "logo" (. | absURL)) }}{{ end }}
|
|
{{ with .Site.Params.sameAs }}{{ $org = merge $org (dict "sameAs" .) }}{{ end }}
|
|
<script type="application/ld+json">{{ $org | jsonify (dict "indent" " ") | safeJS }}</script>
|
|
|
|
{{ $posts := first 10 (where .Site.RegularPages "Section" "post") }}
|
|
{{ $blogPost := slice }}
|
|
{{ range $posts }}
|
|
{{ $entry := dict
|
|
"@type" "BlogPosting"
|
|
"headline" .Title
|
|
"url" .Permalink
|
|
"datePublished" (.Date.Format "2006-01-02T15:04:05-07:00")
|
|
"author" (dict "@type" "Person" "name" (.Params.author | default .Site.Title))
|
|
}}
|
|
{{ with .Description }}{{ $entry = merge $entry (dict "description" .) }}{{ end }}
|
|
{{ $blogPost = $blogPost | append $entry }}
|
|
{{ end }}
|
|
{{ $schema := dict
|
|
"@context" "https://schema.org"
|
|
"@type" "Blog"
|
|
"name" .Site.Title
|
|
"description" $desc
|
|
"url" .Permalink
|
|
"inLanguage" .Site.Language.LanguageCode
|
|
}}
|
|
{{ if $blogPost }}{{ $schema = merge $schema (dict "blogPost" $blogPost) }}{{ end }}
|
|
<script type="application/ld+json">{{ $schema | jsonify (dict "indent" " ") | safeJS }}</script>
|
|
|
|
{{ else if .IsPage }}
|
|
{{/* ---- A static page: Acerca de, Contacto, their subpages ----
|
|
This branch did not exist, so a page shared as a bare link — no title card,
|
|
no picture, nothing for an answer engine to read beyond the prose. It is a
|
|
document about the organisation rather than an article, hence WebPage
|
|
rather than BlogPosting, and no author: a page is the site speaking. */}}
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:site_name" content="{{ .Site.Title }}">
|
|
<meta property="og:title" content="{{ .Title }}">
|
|
<meta property="og:description" content="{{ $desc }}">
|
|
<meta property="og:url" content="{{ .Permalink }}">
|
|
<meta property="og:locale" content="{{ $locale }}">
|
|
{{ range .Translations }}
|
|
{{ with index $localeMap .Language.Lang }}<meta property="og:locale:alternate" content="{{ . }}">{{ end }}
|
|
{{ end }}
|
|
{{ with $image }}
|
|
<meta property="og:image" content="{{ . }}">
|
|
<meta property="og:image:alt" content="{{ $.Params.image_alt | default $.Title }}">
|
|
{{ end }}
|
|
|
|
<meta name="twitter:card" content="{{ if $image }}summary_large_image{{ else }}summary{{ end }}">
|
|
<meta name="twitter:title" content="{{ .Title }}">
|
|
<meta name="twitter:description" content="{{ $desc }}">
|
|
{{ with $image }}<meta name="twitter:image" content="{{ . }}">{{ end }}
|
|
|
|
{{ $schema := dict
|
|
"@context" "https://schema.org"
|
|
"@type" "WebPage"
|
|
"inLanguage" .Site.Language.LanguageCode
|
|
"name" .Title
|
|
"description" $desc
|
|
"url" .Permalink
|
|
"dateModified" (.Lastmod.Format "2006-01-02T15:04:05-07:00")
|
|
"isPartOf" (dict "@type" "WebSite" "name" .Site.Title "url" .Site.Home.Permalink)
|
|
"publisher" (dict "@type" "Organization" "name" .Site.Title "url" .Site.Home.Permalink)
|
|
}}
|
|
{{ with $image }}{{ $schema = merge $schema (dict "image" .) }}{{ end }}
|
|
<script type="application/ld+json">{{ $schema | jsonify (dict "indent" " ") | safeJS }}</script>
|
|
|
|
{{ partial "breadcrumbs-schema.html" . }}
|
|
{{ partial "faq-schema.html" . }}
|
|
{{ end }}
|