PageSourceSearch

https://frimurer.no/assets/Frimurerbladet-CrDMQN12.js

js frimurer.no collected 2026-10-02 12:15:04 UTC 5,377 bytes, 1 lines download raw bytes

1import{r as i,j as e,L as p}from"./vendor-react-GnwsTJfO.js";import{f as _,bm as k,H as S,N as F,aj as n,r as $,F as M,W as q}from"./index-Bk3sb3g_.js";import{g as f}from"./storageImage-Bi8JK7M8.js";import"./vendor-cjs-BcELrC9x.js";import"./vendor-supabase-BWPZKnGU.js";import"./vendor-ui-C1xCQL2z.js";import"./vendor-utils-B2rm_Apj.js";import"./vendor-query-Dp4tHR6-.js";function H({lodgeId:d=null,magazineName:b,issueLinkBase:o="/frimurerbladet",introText:j}={}){const m=b||"Frimurerbladet på nett",c=j||"Kuraterte digitale utgaver av Frimurerbladet. Hvert nummer samler utvalgte artikler fra det trykte bladet — temaartikler, intervjuer, kronikker og stoff av varig verdi.",[a,N]=i.useState([]),[v,y]=i.useState(!0),[l,x]=i.useState("all");i.useEffect(()=>{(async()=>{const r=new Date().toISOString();let s=_.from("magazine_issues").select(k).eq("status","published").or(`published_at.is.null,published_at.lte.${r}`);d?s=s.eq("lodge_id",d):s=s.is("lodge_id",null);const{data:w}=await s.order("year",{ascending:!1}).order("issue_number",{ascending:!1});N(w||[]),y(!1)})()},[d]);const u=Array.from(new Set(a.map(r=>r.year))).sort((r,s)=>s-r),g=l==="all"?a:a.filter(r=>r.year===l),t=g[0],h=g.slice(1);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsxs(S,{children:[e.jsxs("title",{children:[m," | Den Norske Frimurerorden"]}),e.jsx("meta",{name:"description",content:c})]}),e.jsx(F,{}),e.jsxs("main",{className:"flex-1",children:[e.jsx("section",{className:"border-b bg-muted/30",children:e.jsxs("div",{className:"container mx-auto px-4 py-10 max-w-6xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(n,{className:"w-7 h-7 text-primary"}),e.jsx("h1",{className:"text-3xl md:text-4xl font-serif",children:m})]}),e.jsx("p",{className:"text-muted-foreground max-w-2xl",children:c})]})}),e.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:v?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):a.length===0?e.jsxs("div",{className:"rounded-lg border bg-card py-16 text-center",children:[e.jsx(n,{className:"w-12 h-12 text-muted-foreground mx-auto mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"Ingen digitale utgaver er publisert ennå. Kom snart tilbake."})]}):e.jsxs(e.Fragment,{children:[u.length>1&&e.jsxs("div",{className:"flex flex-wrap gap-2 mb-8",children:[e.jsx("button",{className:`px-3 py-1 rounded-full text-sm border ${l==="all"?"bg-primary text-primary-foreground border-primary":"bg-background hover:bg-muted"}`,onClick:()=>x("all"),children:"Alle årganger"}),u.map(r=>e.jsx("button",{className:`px-3 py-1 rounded-full text-sm border ${l===r?"bg-primary text-primary-foreground border-primary":"bg-background hover:bg-muted"}`,onClick:()=>x(r),children:r},r))]}),t&&e.jsx(p,{to:`${o}/${t.slug}`,className:"block group mb-12 rounded-xl overflow-hidden border bg-[#f5efe4] hover:shadow-lg transition-shadow",children:e.jsxs("div",{className:"grid xl:grid-cols-2 gap-0",children:[t.cover_image_url?e.jsx("img",{loading:"lazy",decoding:"async",src:f(t.cover_image_url,{width:1200,quality:80}),alt:"",className:"w-full h-64 md:h-96 xl:h-full object-cover"}):e.jsx("div",{className:"w-full h-64 md:h-96 xl:h-full bg-muted flex items-center justify-center",children:e.jsx(n,{className:"w-16 h-16 text-muted-foreground"})}),e.jsxs("div",{className:"p-6 md:p-10 flex flex-col justify-center",children:[e.jsxs("div",{className:"text-xs uppercase tracking-wider text-primary font-semibold mb-2",children:["Siste utgave · Nr. ",t.issue_number," / ",t.year]}),e.jsx("h2",{className:"text-2xl md:text-3xl font-serif mb-3 group-hover:underline",children:t.title}),t.theme&&e.jsxs("p",{className:"text-lg text-muted-foreground mb-3",children:["Tema: ",e.jsx("span",{className:"text-foreground",children:t.theme})]}),t.intro&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-4",children:t.intro}),t.published_at&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-4",children:["Publisert ",$(new Date(t.published_at),"d. MMMM yyyy",{locale:q})]})]})]})}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-lg font-semibold mb-4 text-muted-foreground uppercase tracking-wider",children:"Tidligere utgaver"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6",children:h.map(r=>e.jsxs(p,{to:`${o}/${r.slug}`,className:"group block",children:[r.print_cover_image_url||r.cover_image_url?e.jsx("img",{loading:"lazy",decoding:"async",src:f(r.print_cover_image_url||r.cover_image_url,{width:400,quality:75,resize:"contain"}),alt:"",className:"w-full aspect-[3/4] object-contain bg-muted group-hover:shadow-lg transition-shadow"}):e.jsx("div",{className:"w-full aspect-[3/4] rounded bg-muted flex items-center justify-center border",children:e.jsx(n,{className:"w-10 h-10 text-muted-foreground"})}),e.jsxs("div",{className:"mt-2",children:[e.jsxs("div",{className:"text-xs uppercase tracking-wide text-primary font-semibold",children:["Nr. ",r.issue_number," / ",r.year]}),e.jsx("div",{className:"text-sm font-medium group-hover:underline line-clamp-2",children:r.title}),r.theme&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Tema: ",r.theme]})]})]},r.id))})]})]})})]}),e.jsx(M,{})]})}
1export{H 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.