PageSourceSearch

https://www.stajerska.si/_nuxt/BCMiG7p9.js

js stajerska.si collected 2026-10-08 05:31:51 UTC 2,930 bytes, 1 lines download raw bytes

1import{_ as $}from"./DJ4JRqk6.js";import{p as T,az as V,a3 as i,k as c,h as e,ag as n,am as t,aT as C,aR as x,aK as z,Q as g,o as d,j as f,aJ as B,G as M,n as v,aQ as w,_ as j,c as E,a8 as h,a7 as I}from"./7R9ux-2y.js";import{v as L}from"./DpJUOQCJ.js";const O={class:"bg-gray py-16 lg:py-36"},P={class:"container flex flex-col items-center text-neutral-900"},D={class:"mb-3 text-4xl lg:text-6xl"},J={class:"mb-10 text-base lg:mb-16"},Q={class:"mb-6 inline-flex items-center"},R=["placeholder"],U=["title","disabled"],A={key:0,class:"-mt-4 mb-6 text-xs text-red"},G={class:"flex items-center gap-3"},K={class:"text-xs",for:"newsletter-terms"},q={key:0},F={class:"mx-auto mb-2 flex h-10 w-10 items-center justify-center rounded-full bg-green-light"},H={class:"text-base font-medium text-neutral-900"},W=T({__name:"SectionNewsletter.global",props:{data:{type:Object,default:()=>{}}},setup(u){const{localePathByType:y}=V(),m=h(!1),r=h(!1),b=h(!1),s=I({value:"",error:!1});function p(){s.error=!L(s.value)}async function k(){try{(await fetch("/.netlify/functions/subscribe",{method:"POST",body:JSON.stringify({email:s.value})})).ok&&(m.value=!0)}catch(a){console.error(a)}}async function N(){p(),r.value?s.error||await k():b.value=!0}return(a,o)=>{const _=$,S=j;return i(),c("div",O,[e("div",P,[e("h2",D,n(u.data.title),1),e("p",J,n(u.data.subtitle),1),t(m)?f("",!0):(i(),c("form",{key:0,onSubmit:C(N,["prevent"])},[e("div",Q,[x(e("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>t(s).value=l),class:g(["max-h-20 w-full border border-neutral-400 bg-white px-8 py-7 text-base outline-none transition-colors placeholder:text-neutral-600 hover:border-black lg:min-w-[336px]",{"border-red text-red hover:border-red":t(s).error}]),placeholder:a.$t("newsletter.placeholder"),onInput:p},null,42,R),[[z,t(s).value]]),e("button",{title:a.$t("newsletter.submit"),class:"h-20 min-w-[80px] bg-black transition-colors duration-300 hover:bg-opacity-70 disabled:bg-neutral-400",icon:{name:"arrow-right",color:"white",size:"lg"},disabled:t(s).error},[d(_,{name:"arrow-right",color:"white",size:"lg"})],8,U)]),t(s).error?(i(),c("p",A,n(a.$t("formContact.validEmail")),1)):f("",!0),e("div",G,[x(e("input",{id:"newsletter-terms","onUpdate:modelValue":o[1]||(o[1]=l=>M(r)?r.value=l:null),type:"checkbox",name:"newsletter-terms",class:g(["h-4 w-4 cursor-pointer border-neutral-400 accent-black ring-inset",t(b)?"ring-1 ring-red":"ring-0"]),onInput:o[2]||(o[2]=l=>b.value=!1)},null,34),[[B,t(r)]]),e("label",K,[v(n(a.$t("newsletter.checkboxLabel"))+" ",1),d(S,{to:t(y)("page",u.data.routeLink?.slug),class:"font-bold hover:underline"},{default:w(()=>[v(n(a.$t("newsletter.terms")),1)]),_:1},8,["to"])])])],32)),d(E,{name:"fade"},{default:w(()=>[t(m)?(i(),c("div",q,[e("div",F,[d(_,{name:"check",size:"xs"})]),e("p",H,n(a.$t("newsletter.submittedMessage")),1)])):f("",!0)]),_:1})])])}}}),ee=Object.assign(W,{__name:"SectionNewsletter"});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.