Files
vue-seo-layer/app/assets/css/seo-base.css
Jakub Zych aee6957bd6 feat: HTML sitemap pages and footer link
- the module registers seo-sitemap-<locale> at seo.htmlSitemap.paths
  (defaults pl /mapa-strony, en /sitemap) and seo-sitemap-group-<locale>
  at <path>/:group (plus <path>/:group/<segment>/:page in the path form);
  a path an app page already has stays the app's
- SeoHtmlSitemapPage (global, overridable): H1, an H2 per non-empty
  group, categories nested, a large group's link to its group page,
  sitemap.empty; group pages with a built trail, page suffix and
  <SeoPagination>; 404 for an unknown group or a page past the last,
  301 for ?page=1, 503 when the sitemap API fails
- GET /api/__seo__/sitemap proxies the sitemap plugin's HTML API (only
  while the CMS has the HTML sitemap on for the locale)
- <SeoSitemapLink>: the footer link while the HTML sitemap is on
- L3 default styles
2026-11-04 12:00:00 +01:00

129 lines
3.4 KiB
CSS

/* SEO layer base styles. Only .seo-* classes, never a bare element or
another layer's classes; values come from seo-tokens.css, and the app's
own CSS (loaded after the layers') wins. Long names and titles wrap and
are never truncated: the full text stays in the HTML. */
/* Visually hidden, still read by screen readers (the new-tab hint inside
external links, labels of icon-only controls). */
.seo-visually-hidden {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
clip-path: inset(50%) !important;
white-space: nowrap !important;
border: 0 !important;
}
/* The focus ring of every layer link: 2px in the accent colour. */
.seo-breadcrumbs a:focus-visible,
.seo-pagination a:focus-visible,
.seo-sitemap a:focus-visible,
.seo-sitemap-link:focus-visible {
outline: 2px solid var(--seo-color-accent);
outline-offset: 2px;
}
/* L1 breadcrumbs: a wrapping row, separators generated here (never read by
screen readers), the current page muted and bold. */
.seo-breadcrumbs {
font-size: var(--seo-font-size-small);
}
.seo-breadcrumbs__list {
display: flex;
flex-wrap: wrap;
align-items: center;
list-style: none;
margin: 0 0 var(--seo-space-4);
padding: 0;
}
.seo-breadcrumbs__item {
overflow-wrap: anywhere;
}
.seo-breadcrumbs__item + .seo-breadcrumbs__item::before {
content: var(--seo-breadcrumbs-separator) / '';
color: var(--seo-color-muted);
padding-inline: var(--seo-space-2);
}
.seo-breadcrumbs__link {
display: inline-block;
padding-block: var(--seo-space-1);
}
.seo-breadcrumbs__current {
color: var(--seo-color-muted);
font-weight: 600;
}
/* L2 pagination: previous, the page list and next in a wrapping row;
44px targets; the current page on the accent colour. */
.seo-pagination {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--seo-space-3);
margin-top: var(--seo-space-5);
}
.seo-pagination__pages {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--seo-space-1);
list-style: none;
margin: 0;
padding: 0;
}
.seo-pagination__prev,
.seo-pagination__next,
.seo-pagination__pages a,
.seo-pagination__current,
.seo-pagination__gap {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: var(--seo-target-size);
min-height: var(--seo-target-size);
padding-inline: var(--seo-space-2);
box-sizing: border-box;
}
.seo-pagination__current {
background: var(--seo-color-accent);
color: var(--seo-color-on-accent);
font-weight: 600;
}
.seo-pagination__gap {
color: var(--seo-color-muted);
}
/* L3 HTML sitemap: lists in columns, room between groups; headings keep
the site's styles (margin only). */
.seo-sitemap__title {
margin-block: 0 var(--seo-space-4);
}
.seo-sitemap__group + .seo-sitemap__group {
margin-top: var(--seo-space-4);
}
.seo-sitemap__group-title {
margin-block: 0 var(--seo-space-3);
}
.seo-sitemap__list {
columns: var(--seo-sitemap-column-width);
column-gap: var(--seo-space-3);
margin: 0;
padding-inline-start: var(--seo-space-4);
}
.seo-sitemap__list .seo-sitemap__list {
columns: auto;
}
.seo-sitemap__item {
break-inside: avoid;
margin-bottom: var(--seo-space-1);
overflow-wrap: anywhere;
}
.seo-sitemap__more,
.seo-sitemap__empty {
margin-block: var(--seo-space-3) 0;
}