From 63baa35b92321f1597b7347220557bffac170e40 Mon Sep 17 00:00:00 2001 From: Linus Olofsson Date: Fri, 6 Nov 2026 06:22:52 +0100 Subject: [PATCH] Start page, portfolio, privacy and 404: Linus's list of 2026-11-06, and Swedish/English on every page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Start page: the text block ("Fotograf Linus Olofsson ..." and "Posters och samarbeten ...") is gone; the buttons Posters, Samarbeten, Mer om mig, Portfolio and Kontakt sit at the bottom as long, straight buttons (no round pills, no text links). The second scroll box is Linus's own from May again (Redo att samarbeta? -> Kontakta mig) instead of "Vill du ha en bild på väggen?". - Portfolio: "Vill du ha en bild på väggen? Se posters." and every "Köp som poster" button are gone. Photos are protected like on Posters: no link to the large file (nothing to open in a new tab), a transparent layer over every photo, no context menu, no drag, no long-press save. - SV/EN: SV/EN switch in the menu; every visible text in both languages (menu, footer, cookie box, start page, portfolio with dates and months, privacy page, 404). The choice uses the portal's key (ibo_lang), so all pages on imagesbyolofsson.se follow the same choice; it is set before the page is drawn. - Privacy: the statistics count openings only (there are no downloads any more). Co-Authored-By: Claude Opus 5.5 --- src/components/T.astro | 12 +++++ src/layouts/MainLayout.astro | 80 +++++++++++++++++++++++------ src/pages/404.astro | 17 ++++--- src/pages/index.astro | 62 +++++++++-------------- src/pages/portfolio.astro | 98 +++++++++++++++++++++++++----------- src/pages/privacy.astro | 85 +++++++++++++++++++++++++++++-- 6 files changed, 258 insertions(+), 96 deletions(-) create mode 100644 src/components/T.astro 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}. · ·