PageSourceSearch

https://aabaf1885.dk/assets/MedlemProfil-C3R4gQbh.js

js aabaf1885.dk collected 2026-10-02 20:35:07 UTC 8,016 bytes, 3 lines download raw bytes

1import{k as F,m as z,d as _,j as s,P as $,N as T,L as o,s as f}from"./index-OsPsciba.js";import{S as A}from"./separator-DksDBrOo.js";import{B as P}from"./button-CDesNA_Z.js";import{h as B}from"./HistorieSection--RFs8Gj1.js";import{S as K,F as E}from"./StoryBlocks-CSOC_95e.js";import{u as H}from"./seo-CKfGGlcP.js";import{C as b}from"./chevron-right-B1aR1qJC.js";import{A as q}from"./arrow-left-BcuZEYn_.js";import{B as O}from"./book-open-BHHtDxSC.js";import"./card-W7vTnNqZ.js";const W=()=>{var N,v,k;const{memberId:c}=F(),[j]=z(),m=j.get("token"),h=j.get("preview")==="1"||!!m,{data:e,isLoading:L}=_({queryKey:["historie-story",c,h,m],queryFn:async()=>{if(m){const{data:x}=await f.rpc("get_historie_story_preview",{_slug:c,_token:m}),i=x;return(i==null?void 0:i[0])??null}let t=f.from("historie_stories").select("*").eq("slug",c);h||(t=t.eq("enabled",!0));const{data:a}=await t.maybeSingle();return a},enabled:!!c,staleTime:h?0:void 0}),n=((e==null?void 0:e.name)??"").split(/ [–-] /)[0].trim(),{data:l}=_({queryKey:["historie-related-portrait",n,e==null?void 0:e.category],queryFn:async()=>{const{data:t}=await f.from("historie_stories").select("slug, name").eq("category","historie").eq("enabled",!0).ilike("name",`${n}%`).limit(1),a=t;return(a==null?void 0:a[0])??null},enabled:!!e&&e.category!=="historie"&&n.length>2});H({title:e?e.name:"Historie & Hæder",description:(N=e==null?void 0:e.summary)==null?void 0:N.slice(0,155),canonicalPath:l?`/klubben/historie/${l.slug}`:e?`/klubben/historie/${e.slug}`:void 0,image:e==null?void 0:e.photo,type:"article",jsonLd:e?{"@context":"https://schema.org","@type":"Article",headline:e.name,description:e.summary,image:e.photo?[e.photo]:void 0,mainEntity:{"@type":"Person",name:n,...e.photo?{image:e.photo}:{}},author:{"@type":"Organization",name:"AaB af 1885",url:"https://aabaf1885.dk"},publisher:{"@type":"Organization",name:"AaB af 1885",url:"https://aabaf1885.dk"},mainEntityOfPage:`https://aabaf1885.dk/klubben/historie/${e.slug}`}:void 0});const u=((v=B.find(t=>t.category===(e==null?void 0:e.category)))==null?void 0:v.href)??"/klubben/historie",y=((k=B.find(t=>t.category===(e==null?void 0:e.category)))==null?void 0:k.label)??"Historier";return L?s.jsx($,{children:s.jsx("div",{className:"min-h-[50vh] flex items-center justify-center text-muted-foreground",children:"Indlæser..."})}):e?e?s.jsxs($,{children:[h&&s.jsx("div",{className:"bg-amber-500/15 border-b border-amber-500/40",children:s.jsxs("div",{className:"container py-2 text-sm font-body text-amber-800 dark:text-amber-300",children:["Forhåndsvisning",!e.enabled&&" - kladde, ikke synlig på hjemmesiden"]})}),s.jsx("div",{className:"bg-section-alt border-b border-border",children:s.jsxs("div",{className:"container py-3 flex items-center gap-2 text-xs font-body text-muted-foreground",children:[s.jsx(o,{to:"/",className:"hover:text-primary transition-colors",children:"Forside"}),s.jsx(b,{className:"w-3 h-3"}),s.jsx(o,{to:"/klubben",className:"hover:text-primary transition-colors",children:"Klubben"}),s.jsx(b,{className:"w-3 h-3"}),s.jsx(o,{to:u,className:"hover:text-primary transition-colors",children:y}),s.jsx(b,{className:"w-3 h-3"}),s.jsx("span",{className:"text-foreground",children:e.name})]})}),s.jsx("section",{className:"bg-primary py-10 md:py-14",children:s.jsxs("div",{className:"container",children:[s.jsxs(o,{to:u,className:"inline-flex items-center gap-1.5 text-primary-foreground/70 hover:text-primary-foreground text-sm mb-4 transition-colors",children:[s.jsx(q,{className:"w-4 h-4"}),"Tilbage til ",y]}),s.jsx("h1",{className:"font-heading text-3xl md:text-5xl font-bold text-primary-foreground tracking-tight",children:e.name}),s.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[e.recognition_type&&s.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-primary-foreground/15 text-primary-foreground text-sm font-semibold px-3 py-1 rounded",children:[s.jsx(O,{className:"w-4 h-4"}),e.recognition_type]}),e.year_awarded&&s.jsx("span",{className:"text-primary-foreground/70 text-sm",children:e.year_awarded})]})]})}),s.jsx("section",{className:"bg-background py-12 md:py-16",children:s.jsx("div",{className:"container",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.photo&&s.jsx("div",{className:"mb-8 rounded-md overflow-hidden border border-border shadow-sm",children:s.jsx("img",{loading:"lazy",decoding:"async",src:e.photo,alt:e.name,className:"w-full aspect-video object-cover",style:{objectPosition:e.image_focus||"50% 50%"}})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-heading text-xl md:text-2xl font-bold text-foreground tracking-tight",children:e.name}),s.jsx(A,{className:"my-4"}),e.blocks&&e.blocks.length>0?s.jsx(K,{blocks:e.blocks,name:e.name}):e.bio?(()=>{const t=e.bio.split(`
2
3`),a=e.gallery||[],x=e.gallery_captions||[],i=a.length>0?Math.max(2,Math.floor(t.length/(a.length+1))):0;let r=0;const g=[];for(t.forEach((d,w)=>{if(g.push(s.jsx("p",{className:"text-muted-foreground leading-relaxed text-base mb-4",children:d},`p-${w}`)),i>0&&(w+1)%i===0&&r<a.length){const p=x[r]||void 0;g.push(s.jsxs("figure",{className:"my-8",children:[s.jsx("div",{className:"rounded-md overflow-hidden border border-border shadow-sm",children:s.jsx("img",{src:a[r],alt:p||`${e.name} - billede ${r+1}`,className:"w-full aspect-video object-cover",loading:"lazy"})}),p&&s.jsx("figcaption",{className:"mt-2 text-sm text-muted-foreground
3/80 italic leading-relaxed",children:p})]},`img-${r}`)),r++}});r<a.length;){const d=x[r]||void 0;g.push(s.jsxs("figure",{className:"my-8",children:[s.jsx("div",{className:"rounded-md overflow-hidden border border-border shadow-sm",children:s.jsx("img",{src:a[r],alt:d||`${e.name} - billede ${r+1}`,className:"w-full aspect-video object-cover",loading:"lazy"})}),d&&s.jsx("figcaption",{className:"mt-2 text-sm text-muted-foreground/80 italic leading-relaxed",children:d})]},`img-${r}`)),r++}return g})():s.jsx("p",{className:"text-muted-foreground leading-relaxed text-base italic",children:"Der er endnu ikke tilføjet en beskrivelse."}),e.contributions&&e.contributions.length>0&&s.jsxs("div",{className:"mt-8",children:[s.jsx("h3",{className:"font-heading text-lg font-bold text-foreground tracking-tight mb-3",children:"Bidrag"}),s.jsx("ul",{className:"space-y-2",children:e.contributions.map((t,a)=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"mt-2 w-2 h-2 rounded-full bg-primary shrink-0"}),s.jsx("span",{className:"text-muted-foreground leading-relaxed",children:t})]},a))})]}),e.slug==="kjeld-thorst"&&!(e.blocks&&e.blocks.length>0)&&s.jsxs("figure",{className:"my-8",children:[s.jsx("div",{className:"rounded-md overflow-hidden border border-border shadow-sm",children:s.jsx("video",{src:"/images/historie/kjeld-thorst-video.mp4",controls:!0,preload:"auto",className:"w-full aspect-video bg-muted"})}),s.jsx("figcaption",{className:"mt-2 text-sm text-muted-foreground/80 italic leading-relaxed",children:"Kjeld Thorst scorer efter blot 20 sekunder mod Rumænien i Bukarest, den 3. november 1963 - et af de hurtigste mål i dansk landsholdshistorie."})]}),e.facts&&e.facts.length>0&&s.jsx(E,{facts:e.facts,title:e.slug==="kjeld-thorst"?"Fodboldens Gentleman: Kjeld Thorst":`Fakta: ${e.name.split(" - ")[0]}`,className:"mt-10"}),l&&s.jsxs("div",{className:"mt-10 rounded-md border border-primary/30 bg-primary/5 p-5",children:[s.jsx("p",{className:"font-heading font-bold text-foreground",children:"Vil du vide mere?"}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Læs hele historien om ",n," i vores store portræt."]}),s.jsx(o,{to:`/klubben/historie/${l.slug}`,children:s.jsxs(P,{variant:"default",size:"sm",className:"mt-3",children:["Læs: ",l.name]})})]}),s.jsx("div",{className:"mt-10",children:s.jsx(o,{to:u,children:s.jsxs(P,{variant:"outline",children:[s.jsx(q,{className:"w-4 h-4 mr-2"}),"Tilbage til oversigten"]})})})]})]})})})]}):null:s.jsx(T,{to:"/klubben/historie",replace:!0})};export{W as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.