PageSourceSearch

https://fonds.lv/build/assets/Contents-kB1Bchvq.js

js fonds.lv collected 2026-10-01 12:27:55 UTC 4,231 bytes, 1 lines download raw bytes

1import{T as _}from"./TileWhiteButton-CQnqhm_G.js";import{_ as g}from"./DocumentTextOutline-CSPECrKp.js";import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{r as k,f as n,g as a,F as y,j as p,o,n as f,b as r,t as d,a as v}from"./app-BFBm0Bhp.js";const b={name:"Contents",components:{DocumentTextOutline:g,TileButton:_},props:{contents:{type:Object,default:[]},enableFirstLetterStyle:{type:Boolean,default:!0}},data(){return{imageOrientations:[],contentsWithoutLinks:[],contentsWithLinks:[],locale:this.$page.props.appLocale}},mounted(){this.filterContents(),this.applyIframeStyles()},methods:{applyIframeStyles(){this.$nextTick(()=>{const i=document.getElementById("iframe");if(i){const e=i.querySelector("iframe");e&&(e.style.width="100%",e.style.height="500px",e.style.border="none")}})},filterContents(){this.contentsWithoutLinks=[],this.contentsWithLinks=[],this.contents.forEach(i=>{i.type==="link"?this.contentsWithLinks.push(i):this.contentsWithoutLinks.push(i)})},getTextClasses(i){return{"font-lora text-[12pt] md:text-[16pt]":!0}},getImageUrl(i){return window.Laravel.baseUrl+i},checkImageDimensions(i){this.$nextTick(()=>{const e=this.$refs["image-"+i],m=e[0].naturalWidth,u=e[0].naturalHeight;this.imageOrientations.push({index:1,vertical:m<u})})},imageIsVertical(i){const e=this.imageOrientations.find(m=>m.index===i);return e?e.vertical:!1},removeFontStyles(i){const e=document.createElement("div");return e.innerHTML=i,e.querySelectorAll("[style]").forEach(s=>{const h=s.getAttribute("style").split(";").filter(t=>{const l=t.trim();return!(l.startsWith("font-family")||l.startsWith("font-size")||l.startsWith("font-style")||l.startsWith("font-weight")||l.startsWith("background")||l.startsWith("list-style"))}).join(";");h?s.setAttribute("style",h):s.removeAttribute("style")}),e.querySelectorAll("ul").forEach(s=>{s.classList.add("list-disc","list-inside")}),e.innerHTML}}},L=["innerHTML"],W={key:1,class:"space-y-4 w-full"},T=["src","onLoad"],S={key:0,class:"text-xs sm:text-sm text-primary leading-tight"},w={key:2},C={class:"border-b-[1rem] border-custom-dark-blue p-10"},I={class:"text-secondary font-metaProBold text-[14pt] md:text-[18pt]"},B={key:3},E={class:"m-10"},D={class:"text-secondary font-metaProBold text-[14pt] md:text-[18pt]"},H={key:4},O=["href"],M={class:"my-auto"},V={key:5},q=["innerHTML"],A={key:0,class:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-5",id:"links"},F=["href"],j={class:"m-auto font-metaProBold text-4xl"};function N(i,e,m,u,s,c){const h=k("DocumentTextOutline");return o(),n("div",null,[(o(!0),n(y,null,p(s.contentsWithoutLinks,(t,l)=>(o(),n("div",{id:"content",class:f({"mb-10 md:mb-12 xl:mb-20":t.type!=="file","mb-4 md:mb-6 xl:mb-8 md:-mt-4 xl:-mt-6":t.type==="file"})},[t.type==="text"?(o(),n("div",{key:0,class:f(c.getTextClasses(l)),innerHTML:c.removeFontStyles(t.content[s.locale])},null,10,L)):a("",!0),t.type==="attachment"?(o(),n("div",W,[r("img",{src:c.getImageUrl(t.content[s.locale]),alt:"attachment",ref_for:!0,ref:"image-"+l,onLoad:P=>c.checkImageDimensions(l),class:f({"w-1/3":c.imageIsVertical(l),"w-1/2":!c.imageIsVertical(l)})},null,42,T),t.title?(o(),n("p",S,d(t.title[s.locale]),1)):a("",!0)])):a("",!0),t.type==="quote-blue"?(o(),n("div",w,[r("div",C,[r("p",I,d(t.content[s.locale]),1)])])):a("",!0),t.type==="quote-pink"?(o(),n("div",B,[r("div",null,[e[0]||(e[0]=r("div",{class:"h-[1.5rem] bg-gradient-to-b from-secondary from-[10%]"},null,-1)),r("div",E,[r("p",D,d(t.content[s.locale]),1)]),e[1]||(e[1]=r("div",{class:"h-[1.5rem] bg-gradient-to-t from-secondary from-[10%]"},null,-1))])])):a("",!0),t.type==="file"?(o(),n("div",H,[r("a",{href:"/"+t.content[s.locale],class:"space-x-2 flex"},[v(h,{class:"h-8 text-secondary fill-secondary"}),r("span",M,d(t.title[s.locale]),1)],8,O)])):a("",!0),t.type==="iframe"?(o(),n("div",V,[r("div",{id:"iframe",innerHTML:t.content[s.locale]},null,8,q)])):a("",!0)],2))),256)),s.contentsWithLinks.length?(o(),n("div",A,[(o(!0),n(y,null,p(s.contentsWithLinks,(t,l)=>(o(),n("div",null,[r("a",{href:t.content[s.locale],target:"_blank",class:"h-48 w-full bg-primary text-white flex"}
1,[r("span",j,d(t.title[s.locale]),1)],8,F)]))),256))])):a("",!0)])}const J=x(b,[["render",N]]);export{J 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.