diff --git a/src/components/T.astro b/src/components/T.astro new file mode 100644 index 0000000..9dc66f7 --- /dev/null +++ b/src/components/T.astro @@ -0,0 +1,12 @@ +--- +// src/components/T.astro – en text på svenska och engelska (Linus 2026-11-06: en svensk och en engelsk version, +// SV/EN-knappen i menyn växlar). Båda finns i sidan; CSS i MainLayout visar den som hör till . +// enkel text +// …… text med länkar eller taggar +export interface Props { + sv?: string; + en?: string; +} +const { sv, en } = Astro.props; +--- +{sv}{en} diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro index 6c99bfa..6224ae2 100644 --- a/src/layouts/MainLayout.astro +++ b/src/layouts/MainLayout.astro @@ -4,6 +4,7 @@ import type { ImageMetadata } from 'astro'; import { getImage } from 'astro:assets'; import SEO from '../components/SEO.astro'; import SchemaOrg from '../components/SchemaOrg.astro'; +import T from '../components/T.astro'; import type { FaqItem } from '../data/faq'; import { business } from '../data/business'; import defaultOgImage from '../assets/images/3d-scroll/img5.jpg'; @@ -43,12 +44,14 @@ const ogImageUrl = new URL(og.src, site).toString(); const ogWidth = Number(og.attributes.width) || undefined; const ogHeight = Number(og.attributes.height) || undefined; +// Samma meny på alla sidor (Linus 2026-11-06): Portfolio, Posters, Om mig, Kontakt. const nav = [ - { href: '/portfolio', label: 'Portfolio' }, - { href: '/posters', label: 'Posters' }, - { href: '/about', label: 'Om mig' }, - { href: '/contact', label: 'Kontakt' }, + { href: '/portfolio', sv: 'Portfolio', en: 'Portfolio' }, + { href: '/posters', sv: 'Posters', en: 'Posters' }, + { href: '/about', sv: 'Om mig', en: 'About me' }, + { href: '/contact', sv: 'Kontakt', en: 'Contact' }, ]; +const langBtn = 'rounded-full px-2.5 py-1 text-xs font-semibold transition-colors text-gray-400 hover:text-white aria-pressed:bg-white aria-pressed:text-neutral-900'; --- @@ -61,6 +64,24 @@ const nav = [ + + + - +
+
    + {nav.map((item) => ( +
  • + ))} +
+
+ + +
+
@@ -106,26 +133,49 @@ const nav = [

- {business.brand} – {business.person.jobTitle.toLowerCase()} {business.person.name}, {business.country.name} + {business.brand} – · {business.email} · Instagram

-

© {new Date().getFullYear()} {business.brand}. Alla rättigheter förbehållna. · Integritetspolicy ·

+

© {new Date().getFullYear()} {business.brand}. · ·