PageSourceSearch

https://sternenbruecke.de/_astro/index.astro_astro_type_script_index_0_lang.XUX50Lsg.js

js sternenbruecke.de collected 2026-09-25 20:17:29 UTC 2,938 bytes, 1 lines download raw bytes

1import{t as y,h as L}from"./dom.DbFNsQXq.js";import{i as S}from"./initOnLoad.DS0gC6HB.js";const b=async()=>{const l=document.getElementById("filter-article-list"),u=document.getElementById("filter-pagination"),m=document.querySelector(".f3-news-filter");if(!l)return;async function g(t=new URLSearchParams,n="default"){const r=t instanceof URLSearchParams?t:new URLSearchParams(t);try{const e=await fetch(`/api/article-list?${r.toString()}`,{headers:{"x-locale":n}});if(!e.ok){console.error(`API-Error: ${e.status} ${e.statusText}`);return}const i=await e.json();l.innerHTML=i.articles,u&&(u.innerHTML=i.pagination||"")}catch(e){console.error(`Error fetching article list: ${e}`)}}function w(){const t=new URLSearchParams(window.location.search),n=t.get("category")||"alle",r=t.get("topic")||"alle";document.querySelectorAll(".filter-list-item").forEach(i=>{const c=i.getAttribute("data-key"),o=i.getAttribute("data-value")||"alle",a=i.querySelector("a");if(!a||!c)return;let s=!1;c==="category"?s=o===n:c==="topic"&&(s=o===r),a.setAttribute("data-hover-line",s?"false":"true")})}function h(t,n,r=!1){const e=new URL(window.location.href);e.search=t.toString(),history.pushState({},"",e.toString()),w(),r&&m&&m.scrollIntoView({behavior:"instant",block:"start"}),document.startViewTransition&&typeof document.startViewTransition=="function"?(l.style.viewTransitionName="article-list",u&&(u.style.viewTransitionName="pagination"),document.startViewTransition(async()=>{await g(t,n)})):g(t,n)}y(".filter-button"),L(".filter-button",".filter-list"),w();const f=document.querySelector(".f3-news-filter");f&&(f.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const n=t.target.closest(".filter-list-item a");if(!n)return;const r=n.closest(".filter-list-item");if(!r)return;const e=r.getAttribute("data-key")??"",i=r.getAttribute("data-value")??"";if(!e)return;const c=document.documentElement.lang||"default",o=new URLSearchParams(window.location.search),a=new URLSearchParams(o.toString());i==="all"||i===""||i==="alle"?a.delete(e):a.set(e,i),a.delete("page");const s=r.closest(".filter-list"),p=s?.getAttribute("aria-labelledby"),d=p?document.getElementById(p):null;d&&s&&(s.classList.remove("is-open"),s.setAttribute("aria-hidden","true"),d.setAttribute("aria-expanded","false"),d.setAttribute("data-hover-line","true")),h(a,c)}),f.addEventListener("click",t=>{if(!(t.target instanceof Element)||!u)return;const n=t.target.closest('a[href*="page="]');if(!n)return;t.preventDefault();const r=n.getAttribute("href");if(!r)return;const e=document.documentElement.lang||"default",i=new URL(r,window.location.origin),c=new URLSearchParams(window.location.search),o=new URLSearchParams(c.toString()),a=i.searchParams.get("page");a?o.set("page",a):o.delete("page"),h(o,e,!0)}))},A=()=>{const l=document.querySelector(".f3-news-filter");!l||l.hasAttribute("data-initialized")||(l.setAttribute("data-initialized",""),b())};S(A);

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.