PageSourceSearch

https://shop.apiya.ai/_nuxt/hRKZ3xB6.js

js apiya.ai collected 2026-10-05 14:06:43 UTC 6,597 bytes, 1 lines download raw bytes

1import{q as P,a9 as j,am as V,L,O as S,k as a,h as e,a4 as l,a7 as r,ap as T,al as $,j as b,F as y,Y as k,E as H,o as I,X as u,ae as N,P as n,c as U}from"./CH4HNF8D.js";import{u as A,d as F}from"./Dzt4ivT7.js";import{p as D}from"./Cg7XbYUo.js";import{d as E}from"./CZGZjV6W.js";const R={class:"blog-page min-h-screen theme-page pt-20 pb-16 relative overflow-hidden"},q={class:"container mx-auto px-4 relative z-10"},K={class:"mb-10 mt-8 text-center"},O={class:"text-2xl md:text-3xl font-bold mb-3 tracking-tight theme-text-primary"},X={class:"theme-text-secondary max-w-2xl mx-auto text-lg leading-relaxed border-b theme-border pb-4"},Y={class:"mb-12 max-w-xl mx-auto"},G={class:"relative theme-panel-soft backdrop-blur-md border rounded-2xl flex items-center px-5 py-3 transition-all focus-within:shadow-lg"},J=["placeholder"],Q={key:0,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},W={key:1},Z={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},ee=["onClick"],te={key:0,class:"h-48 overflow-hidden relative"},oe=["src","alt"],se={class:"p-8 flex flex-col flex-1"},le={class:"flex items-center justify-between mb-6"},ae={class:"text-xs theme-text-muted font-mono"},re={class:"text-base font-semibold mb-3 theme-text-primary transition-colors line-clamp-2 leading-snug"},ne={class:"theme-text-secondary text-sm mb-8 line-clamp-3 leading-relaxed flex-1"},ie={class:"flex items-center text-sm font-medium theme-text-muted group-hover:text-primary transition-colors mt-auto pt-6 border-t theme-border"},de={key:0,class:"mt-16 flex justify-center"},ce={class:"flex items-center space-x-2 theme-panel-soft backdrop-blur-md p-2 rounded-2xl border"},ue=["disabled"],me={class:"px-4 py-2 font-mono theme-text-muted"},pe={class:"theme-text-primary font-bold"},he=["disabled"],ve={key:2,class:"text-center py-20 border theme-border rounded-2xl theme-panel backdrop-blur-sm"},xe={class:"theme-text-muted text-lg"},be=P({__name:"Blog",setup(ge){const w=N(),{t:i}=j(),g=A(),p=u(!0),h=u([]),d=u(1),C=u(12),B=u(0),m=u(0),c=u(""),v=s=>{if(!s)return"";const t=g.locale;return s[t]||s["zh-CN"]||s["en-US"]||""},M=s=>s?new Date(s).toLocaleDateString(g.locale,{year:"numeric",month:"long",day:"numeric"}):"",f=async()=>{p.value=!0;try{const s={type:"blog",page:d.value,page_size:C.value},t=c.value.trim();t&&(s.search=t);const o=await D.list(s);h.value=o.data.data||[],o.data.pagination&&(B.value=o.data.pagination.total||0,m.value=o.data.pagination.total_page||0)}catch(s){console.error("Failed to load posts:",s)}finally{p.value=!1}},x=E(f,300),z=s=>{w.push("/tech/".concat(s))},_=s=>{s<1||s>m.value||(d.value=s,x(),window.scrollTo({top:0,behavior:"smooth"}))};return V(c,()=>{d.value=1,x()}),L(()=>{f()}),S(()=>{x.cancel()}),(s,t)=>(n(),a("div",R,[e("div",q,[e("div",K,[e("h1",O,l(r(i)("nav.blog")),1),e("p",X,l(r(i)("blog.subtitle")),1)]),e("div",Y,[e("div",G,[t[4]||(t[4]=e("svg",{class:"w-5 h-5 theme-text-muted shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),T(e("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>c.value=o),type:"text",placeholder:r(i)("blog.searchPlaceholder"),class:"flex-1 bg-transparent border-none outline-none px-3 theme-text-primary placeholder:theme-text-muted"},null,8,J),[[$,c.value]]),c.value?(n(),a("button",{key:0,type:"button",onClick:t[1]||(t[1]=o=>c.value=""),class:"theme-text-muted hover:text-primary hover:bg-primary-soft transition-colors text-sm font-medium px-2 py-1 rounded-md"},l(r(i)("blog.searchClear")),1)):b("",!0)])]),p.value?(n(),a("div",Q,[(n(),a(y,null,k(6,o=>e("div",{key:o,class:"theme-surface-muted rounded-2xl h-[300px] animate-pulse border"})),64))])):h.value.length>0?(n(),a("div",W,[e("div",Z,[(n(!0),a(y,null,k(h.value,o=>(n(),a("article",{key:o.id,class:"group theme-panel backdrop-blur-xl border rounded-2xl overflow-hidden hover:bg-primary-soft hover:border-primary/60 hover:shadow-[0_0_0_1px_rgba(255,125,0,0.34)] transition-all duration-300 hover:-translate-y-1 cursor-pointer flex flex-col",onClick:fe=>z(o.slug)},[o.thumbnail?(n(),a("div",te,[e("img",{src:r(F)(o.thumbnail),alt:v(o.title),loading:"lazy",class:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"},null,8,oe),t[5]||(t[5]=e("div",{class:"absolute inset-0 bg-black/35"},null,-1))])):b("",!0),e("div",se,[e("div",le,[e("span",{class:H(["theme-badge-meta",o.type==="blog"?"theme-badge-accent":"theme-badge-info"])},l(o.type==="blog"?r(i)("nav.blog"):r(i)("nav.notice")),3),e("time",ae,l(M(o.published_at)),1)]),e("h2",re,l(v(o.title)),1),e("p",ne,l(v(o.summary)),1),e("div",ie,[I(l(r(i)("blog.readMore"))+" ",1),t[6]||(t[6]=e("svg",{class:"w-4 h-4 ml-2 transition-transform group-hover:translate-x-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 8l4 4m0 0l-4 4m4-4H3"})],-1))])])],8,ee))),128))]),m.value>1?(n(),a("div",de,[e("nav",ce,[e("button",{onClick:t[2]||(t[2]=o=>_(d.value-1)),disabled:d.value===1,class:"w-10 h-10 flex items-center justify-center rounded-xl border theme-btn-secondary transition-all disabled:opacity-30 disabled:cursor-not-allowed"},[...t[7]||(t[7]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])],8,ue),e("span",me,[e("span",pe,l(d.value),1),t[8]||(t[8]=e("span",{class:"mx-2 opacity-50"},"/",-1)),e("span",null,l(m.value),1)]),e("button",{onClick:t[3]||(t[3]=o=>_(d.value+1)),disabled:d.value===m.value,class:"w-10 h-10 flex items-center justify-center rounded-xl border theme-btn-secondary transition-all disabled:opacity-30 disabled:cursor-not-allowed"},[...t[9]||(t[9]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])],8,he)])])):b("",!0)])):(n(),a("div",ve,[t[10]||(t[10]=e("svg",{class:"w-20 h-20 mx-auto theme-text-muted mb-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})],-1)),e("p",xe,l(c.value.trim()?r(i)("blog.noResults"):r(i)("blog.empty")),1)]))])]))}}),Ce=U(be,[["__scopeId","data-v-148f298f"]]);export{Ce 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.