PageSourceSearch

https://baselgovernance.org/_nuxt/BbNBUDz5.js

js baselgovernance.org collected 2026-09-24 15:25:30 UTC 4,630 bytes, 1 lines download raw bytes

1import{_ as A}from"./DBHgzIrx.js";import{u as k,z as C,i as h,f as w,C as $,o as a,a as B,d as n,t as d,b as e,c as r,F as q,r as T,E as D,g as p,e as E,D as I,n as U,s as V}from"./BfeiwgDz.js";import{_ as P}from"./CKdK42-5.js";import{_ as z}from"./ByRxuu40.js";import{u as F}from"./OmQWZAce.js";const H={class:"mb-12 sm:mb-24"},j={class:"text-sm text-secondary-700"},L={key:0,class:"grid gap-6 md:grid-cols-2 lg:grid-cols-3"},S={class:"flex items-start justify-between mb-4"},W={class:"text-xl font-semibold text-secondary-900 group-hover:text-primary-600 transition-colors"},G={class:"text-sm font-medium text-secondary-700 bg-secondary-100 px-2 py-1 rounded-full"},J={class:"flex gap-4 text-xs text-secondary-700"},K={key:0},M={key:1},O={key:2},Q={class:"mt-4 flex items-center text-primary-600 text-sm font-medium group-hover:translate-x-1 transition-transform"},R={key:1,class:"text-center py-16"},X={key:2,class:"mt-16"},Y={class:"flex flex-wrap gap-2"},Z={key:0,class:"ml-1 text-xs"},it={__name:"index",async setup(tt){let l,_;const{getItems:x}=F();k({title:"Tags",meta:[{name:"description",content:"Browse all content tags and discover related publications, news, and events."}]}),k({meta:[{property:"og:title",content:"Tags"},{property:"og:description",content:"Browse all content tags and discover related publications, news, and events."},{name:"twitter:card",content:"summary_large_image"},{property:"og:url",content:"https://baselgovernance.org/tags"},{property:"og:site_name",content:"baselgovernance.org"}]});const{data:m}=([l,_]=C(async()=>$("all-tags",async()=>await x({collection:"tags",params:{fields:["id","name"],sort:["name"]}})||[])),l=await l,_(),l),{data:s}=([l,_]=C(async()=>$("tag-counts",async()=>{const c={};if(!m.value?.length)return c;const o=await Promise.all(m.value.map(async i=>{try{const[u,y,b]=await Promise.all([x({collection:"news",params:{filter:{tags:{tags_id:{_eq:i.id}},status:{_eq:"published"}},fields:["id"],limit:-1}}),x({collection:"publications",params:{filter:{tags:{tags_id:{_eq:i.id}},status:{_eq:"published"},external:{_eq:!1}},fields:["id"],limit:-1}}),x({collection:"events",params:{filter:{tags:{tags_id:{_eq:i.id}},status:{_eq:"published"}},fields:["id"],limit:-1}})]),g=u?.length||0,t=y?.length||0,v=b?.length||0;return[i.id,{news:g,publications:t,events:v,total:g+t+v}]}catch(u){return console.error(`Error fetching counts for tag ${i.id}:`,u),[i.id,{news:0,publications:0,events:0,total:0}]}}));for(const[i,u]of o)c[i]=u;return c})),l=await l,_(),l),f=V(()=>!m.value||!s.value?[]:m.value.filter(c=>s.value[c.id]?.total>0)),N=[{label:"Home",to:"/"},{label:"Tags",to:"/tags"}];return(c,o)=>{const i=A,u=I,y=D,b=P,g=z;return a(),h(g,null,{default:w(()=>[B(i,{items:N,class:"hidden sm:block"}),n("div",H,[o[0]||(o[0]=n("h1",{class:"text-5xl font-thin mt-12 mb-4 sm:mt-30"},"Browse by Tags",-1)),o[1]||(o[1]=n("p",{class:"text-lg text-secondary-700 mb-4 max-w-2xl"}," Explore our content by topic. Click on any tag to discover related publications, news articles, and events. ",-1)),n("div",j,d(e(f).length)+" topics available ",1)]),e(f).length>0?(a(),r("div",L,[(a(!0),r(q,null,T(e(f),t=>(a(),h(y,{key:t.id,to:`/tags/${t.id}`,class:"group block p-6 border border-secondary-200 rounded-2xl hover:border-primary-300 hover:shadow-lg transition-all duration-200"},{default:w(()=>[n("div",S,[n("h3",W,d(t.name),1),n("div",G,d(e(s)[t.id]?.total||0),1)]),n("div",J,[e(s)[t.id]?.news>0?(a(),r("span",K,d(e(s)[t.id].news)+" News ",1)):p("",!0),e(s)[t.id]?.publications>0?(a(),r("span",M,d(e(s)[t.id].publications)+" Publications ",1)):p("",!0),e(s)[t.id]?.events>0?(a(),r("span",O,d(e(s)[t.id].events)+" Events ",1)):p("",!0)]),n("div",Q,[o[2]||(o[2]=E(" Explore content ",-1)),B(u,{name:"i-lucide-arrow-right",class:"ml-2 h-4 w-4"})])]),_:2},1032,["to"]))),128))])):(a(),r("div",R,[...o[3]||(o[3]=[n("h3",{class:"text-xl font-medium text-secondary-900 mb-2"},"No tags found",-1),n("p",{class:"text-secondary-700"}," There are no tags with content available at the moment. ",-1)])])),e(m)&&e(m).length>e(f).length?(a(),r("div",X,[o[4]||(o[4]=n("h2",{class:"text-2xl font-light mb-8 text-secondary-600"}," All Available Tags ",-1)),n("div",Y,[(a(!0),r(q,null,T(e(m),t=>(a(),h(b,{key:`all-${t.id}`,variant:e(s)[t.id]?.total>0?"solid":"outline",class:U(e(s)[t.id]?.total>0?"cursor-pointer":"opacity-50"),onClick:v=>e(s)[t.id]?.total>0?c.$router.push(`/tags/${t.id}`):null},{default:w(()=>[E(d(t.name)+" ",1),e(s)[t.id]?.total>0?(a(),r("span",Z," ("+d(e(s)[t.id].total)+") ",1)):p("",!0)]),_:2},1032,["variant","class","onClick"]))),128))])])):p("",!0)]),_:1})}}};export{it 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.