PageSourceSearch

https://www.yazmedia.com/assets/News-2WahURBj.js

js yazmedia.com collected 2026-10-07 20:43:30 UTC 5,920 bytes, 1 lines download raw bytes

1import{a as k,j as e}from"./react-vendor-CpPiCM6v.js";import{a as w,u as z,L as j}from"./router-CQPqJRx3.js";import{S as P,N as A,b as F,F as S}from"./Footer-BTQbYzJ9.js";import{S as L}from"./StoryReveal-Ts6ysnWf.js";import{S as $,P as C,g as D}from"./GroupSections-BfWHdGGq.js";import{e as E}from"./useApi-DhUeX-Ai.js";import{l as U,w as _}from"./app-RFLavVEH.js";import{i as R}from"./hiddenNews-BZZW1YUo.js";import{u as I}from"./i18n-Dg6WrvVI.js";import"./react-dom-BqNOIe_e.js";import"./motion-CDBKCNJA.js";import"./motion-dom-CZGVR76o.js";import"./motion-utils-CdXsUQ_q.js";import"./query-DhnXtMDs.js";const y=9,T=l=>!!l.coverImageUrl&&!l.coverImageUrl.includes("placeholder"),N=({article:l,title:o,width:c,className:a=""})=>T(l)?e.jsx("img",{src:D(l.coverImageUrl,c,{quality:80}),alt:"",loading:"lazy",decoding:"async",className:`h-full w-full object-cover transition-transform duration-[1200ms] ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:scale-[1.04] ${a}`}):e.jsx("span",{className:"flex h-full w-full items-end bg-yaz-ink p-6 text-white transition-colors duration-500 group-hover:bg-yaz-lime group-hover:text-yaz-ink",children:e.jsx("span",{className:"line-clamp-4 text-2xl font-bold leading-tight tracking-[-0.03em]",style:{fontFamily:"var(--font-headline)"},"aria-hidden":!0,children:o})}),ee=()=>{const l=w(),{data:o,isLoading:c}=E(1,50,l??void 0),{t:a}=I(),x=U(z().pathname),r=x==="ar",[d,v]=k.useState(y),i=t=>r&&t.titleAr?.trim()?t.titleAr:t.title,g=t=>r&&t.excerptAr?.trim()?t.excerptAr:t.excerpt,p=t=>t.date?new Date(t.date).toLocaleDateString(r?"ar-AE":"en-GB",{day:"numeric",month:"long",year:"numeric"}):"",h=t=>_(`/news/${t.slug||t.id}`,x),u=r?"leading-[1.25] tracking-normal":"leading-[0.95] tracking-[-0.055em]",n=(o?.data??[]).filter(t=>!R(t.slug)),s=n.find(t=>t.pinned)??n[0],m=n.filter(t=>t!==s),f=m.slice(0,d);return e.jsxs("main",{className:"min-h-screen bg-yaz-paper text-yaz-ink",children:[e.jsx(P,{}),e.jsx(A,{}),e.jsx("section",{className:"pb-12 pt-28 md:pb-16 md:pt-32",dir:r?"rtl":"ltr",children:e.jsxs("div",{className:"container mx-auto px-6 lg:px-12",children:[e.jsx($,{label:a("newsPage.kicker"),aside:n.length?a("newsPage.count",{count:n.length}):void 0}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1.3fr_0.7fr] lg:items-end lg:gap-20",children:[e.jsxs("h1",{className:`text-6xl font-bold md:text-8xl ${u}`,style:{fontFamily:"var(--font-headline)"},children:[a("newsPage.title1"),e.jsx("br",{}),e.jsx("span",{className:"font-normal",style:{fontFamily:"var(--font-subheadline)"},children:a("newsPage.title2")})]}),e.jsx("p",{className:"max-w-md text-lg leading-relaxed text-yaz-ink/70",children:a("newsPage.body")})]})]})}),e.jsx("section",{className:"pb-20 md:pb-28",dir:r?"rtl":"ltr",children:e.jsx("div",{className:"container mx-auto px-6 lg:px-12",children:c&&!n.length?e.jsx("div",{className:"grid gap-4 md:grid-cols-3","aria-hidden":!0,children:Array.from({length:6},(t,b)=>e.jsx("div",{className:`animate-pulse bg-yaz-ink/5 ${b===0?"aspect-[16/9] md:col-span-3":"aspect-[4/3]"}`},b))}):s?e.jsxs(e.Fragment,{children:[e.jsxs(j,{to:h(s),className:"group grid border-t border-yaz-ink pt-8 md:grid-cols-[1.25fr_1fr] md:gap-10 md:pt-10",children:[e.jsx("div",{className:"relative aspect-[16/10] overflow-hidden bg-yaz-ink",children:e.jsx(N,{article:s,title:i(s),width:1400})}),e.jsxs("div",{className:"flex flex-col pt-6 md:pt-0",children:[e.jsxs("p",{className:"flex items-center gap-3 text-[11px] font-bold uppercase tracking-[0.12em] text-yaz-ink/55",children:[e.jsx("span",{className:"bg-yaz-lime px-2 py-1 text-yaz-ink",children:a("newsPage.featured")}),e.jsx("time",{dateTime:s.date,children:p(s)})]}),e.jsx("h2",{className:`mt-6 text-3xl font-bold md:text-5xl ${u}`,style:{fontFamily:"var(--font-headline)"},children:i(s)}),e.jsx("p",{className:"mt-5 line-clamp-4 text-lg leading-relaxed text-yaz-ink/70",children:g(s)}),e.jsxs("span",{className:"mt-8 inline-flex w-fit items-center gap-3 border border-yaz-ink px-5 py-3 text-sm font-bold transition-colors group-hover:bg-yaz-ink group-hover:text-white md:mt-auto",children:[a("newsPage.read"),e.jsx(F,{className:`size-4 ${r?"-scale-x-100":""}`,"aria-hidden":!0})]})]})]}),f.length?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-10 mt-20 flex items-center gap-6 whitespace-nowrap text-[11px] font-bold uppercase tracking-[0.12em] md:mt-24 md:text-xs",children:[e.jsx("span",{children:a("newsPage.latest")}
1),e.jsx("span",{"aria-hidden":!0,className:"h-px flex-1 bg-yaz-ink/25"})]}),e.jsx("ul",{className:"grid gap-x-6 gap-y-14 sm:grid-cols-2 lg:grid-cols-3",role:"list",children:f.map(t=>e.jsx("li",{children:e.jsxs(j,{to:h(t),className:"group block",children:[e.jsx("div",{className:"relative aspect-[4/3] overflow-hidden bg-yaz-ink",children:e.jsx(N,{article:t,title:i(t),width:800})}),e.jsx("time",{dateTime:t.date,className:"mt-5 block text-[11px] font-bold uppercase tracking-[0.12em] text-yaz-ink/55",children:p(t)}),e.jsx("h3",{className:`mt-3 text-2xl font-bold ${r?"leading-[1.35]":"leading-[1.1] tracking-[-0.03em]"}`,style:{fontFamily:"var(--font-headline)"},children:e.jsx("span",{className:"bg-[linear-gradient(currentColor,currentColor)] bg-[length:0%_2px] bg-bottom bg-no-repeat transition-[background-size] duration-500 group-hover:bg-[length:100%_2px] rtl:bg-right-bottom",children:i(t)})}),e.jsx("p",{className:"mt-3 line-clamp-2 leading-relaxed text-yaz-ink/65",children:g(t)})]})},t.id))}),m.length>d?e.jsxs("button",{type:"button",onClick:()=>v(t=>t+y),className:"mt-16 inline-flex items-center gap-3 border border-yaz-ink px-6 py-3.5 text-sm font-bold transition-colors hover:bg-yaz-ink hover:text-white",children:[a("newsPage.more",{count:m.length-d}),e.jsx(C,{className:"size-4","aria-hidden":!0})]}):null]}):null]}):e.jsx("p",{className:"border-t border-yaz-ink py-16 text-lg text-yaz-ink/60",children:a("news.noArticles")})})}),e.jsx(L,{}),e.jsx(S,{})]})};export{ee 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.