2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{_ as C}from"./D4Kwfg7p.js";import{g as y,j as k,k as x,l as z,C as L,D as S,c as r,o as c,a as t,m as E,t as n,n as f,E as B,F as v,b as d,w as _,r as w,P as K,d as g,G as F,B as V}from"./DSWUVrVG.js";const D={class:"relative"},I={class:"mr-1"},M={key:0,class:"absolute right-0 mt-2 bg-white rounded-md shadow-lg py-1 min-w-[100px] z-50"},N=y({__name:"LanguageSwitcher",setup(b){const u=k(),l=x(!1),i=z(()=>u.locale.value),o=()=>{l.value=!l.value},a=e=>{u.locale.value=e,l.value=!1,localStorage.setItem("user-locale",e)},p=e=>{e.target.closest(".relative")||(l.value=!1)};return L(()=>{const e=localStorage.getItem("user-locale");e&&(u.locale.value=e),document.addEventListener("click",p)}),S(()=>{document.removeEventListener("click",p)}),(e,s)=>(c(),r("div",D,[t("button",{onClick:o,class:"flex items-center text-white/85 hover:text-secondary transition-colors duration-300"},[t("span",I,n(i.value==="zh"?"EN":"中"),1),s[2]||(s[2]=t("i",{class:"fas fa-chevron-down text-xs"},null,-1))]),l.value?(c(),r("div",M,[t("button",{onClick:s[0]||(s[0]=m=>a("zh")),class:f(["block w-full text-left px-4 py-2 text-gray-800 hover:bg-gray-100",{"bg-gray-100":i.value==="zh"}])}," 中文 ",2),t("button",{onClick:s[1]||(s[1]=m=>a("en")),class:f(["block w-full text-left px-4 py-2 text-gray-800 hover:bg-gray-100",{"bg-gray-100":i.value==="en"}])}," English ",2)])):E("",!0)]))}}),R={class:"container"},O={class:"flex items-center justify-between h-16"},j={class:"text-xl font-bold"},P={class:"hidden md:flex items-center space-x-8"},T={class:"container py-4"},U={class:"flex flex-col space-y-4"},Y={class:"py-2"},G=y({__name:"NavBar",setup(b){B();const{t:u}=k(),l=x(!1),i=x(!1),o=[{i18nKey:"nav.home",path:"/"},{i18nKey:"nav.products",path:"/products"},{i18nKey:"nav.solutions",path:"/solutions"},{i18nKey:"nav.cases",path:"/cases"},{i18nKey:"nav.about",path:"/about"},{i18nKey:"nav.contact",path:"/contact"}],a=()=>{l.value=!l.value},p=()=>{window.scrollY>100?i.value=!0:i.value=!1};return L(()=>{window.addEventListener("scroll",p)}),S(()=>{window.removeEventListener("scroll",p)}),(e,s)=>{const m=C;return c(),r(v,null,[t("nav",{class:f(["bg-primary shadow-md fixed w-full z-50",{"nav-scrolled":i.value}])},[t("div",R,[t("div",O,[d(m,{to:"/",class:"flex items-center text-white"},{default:_(()=>[s[1]||(s[1]=t("i",{class:"fas fa-cloud text-2xl mr-2"},null,-1)),t("span",j,n(e.$t("common.appName")),1)]),_:1}),t("div",P,[(c(),r(v,null,w(o,(h,$)=>d(m,{key:$,to:h.path,class:f(["text-white/85 hover:text-secondary transition-colors duration-300",{"text-white":(e._.provides[K]||e.$route).path===h.path}])},{default:_(()=>[g(n(e.$t(h.i18nKey)),1)]),_:2},1032,["to","class"])),64)),d(N)]),t("button",{class:"md:hidden text-white p-2 rounded-lg hover:bg-white/10 transition-colors duration-300","aria-label":"打开菜单",onClick:a},s[2]||(s[2]=[t("i",{class:"fas fa-bars text-xl"},null,-1)]))]),t("div",{class:f(["md:hidden bg-primary absolute top-16 left-0 right-0 shadow-lg",{hidden:!l.value}])},[t("div",T,[t("div",U,[(c(),r(v,null,w(o,(h,$)=>d(m,{key:$,to:h.path,class:f(["text-white/85 hover:text-secondary transition-colors duration-300 py-2",{"text-white":(e._.provides[K]||e.$route).path===h.path}]),onClick:s[0]||(s[0]=mt=>l.value=!1)},{default:_(()=>[g(n(e.$t(h.i18nKey)),1)]),_:2},1032,["to","class"])),64)),t("div",Y,[d(N)])])])],2)])],2),s[3]||(s[3]=t("div",{class:"h-16"},null,-1))],64)}}}),q={class:"bg-primary text-white py-12"},A={class:"container"},H={class:"grid md:grid-cols-4 gap-8"},J={class:"text-lg font-semibold mb-4"},Q={class:"text-white/50 mb-4"},W={class:"text-lg font-semibold mb-4"},X={class:"space-y-2"},Z={class:"text-lg font-semibold mb-4"},tt={class:"space-y-2"},et={class:"text-lg font-semibold mb-4"},st={class:"space-y-3"},ot={class:"flex items-start"},nt={class:"text-white/70"},at={class:"flex items-start"},lt={class:"text-white/70"},it={class:"flex items-start"},rt={class:"text-white/70"},ct={class:"mt-12 pt-8 border-t border-white/10 text-center"},dt={class:"text-white/50"},ut=y({__name:"FooterSection",setup(b){const{t:u}=k(),l=[{i18nKey:"footer.productLinks.ec2",path:"/products"},{i18nKey:"footer.productLinks.s3",path:"/products"},{i18nKey:"footer.productLinks.rds",path:"/products"},{i18nKey:"footer.productLinks.lambda",path:"/products"},{i18nKey:"footer.productLinks.more",path:"/products"}],i=[{i18nKey:"footer.solutionLinks.web",path:"/solutions"},{i18nKey:"footer.solutionLinks.enterprise",path:"/solutions"},{i18nKey:"footer.solutionLinks.disaster",path:"/solutions"},{i18nKey:"footer.solutionLinks.bigdata",path:"/solutions"},{i18nKey:"footer.solutionLinks.microservice",path:"/solutions"}];return(o,a)=>{const p=C;return c(),r("footer",q,[t("div",A,[t("div",H,[t("div",null,[t("h5",J,n(o.$t("common.appName")),1),t("p",Q,n(o.$t("footer.description")),1),a[0]||(a[0]=F('<div class="flex space-x-4"><a href="#" class="text-white/50 hover:text-white transition-colors"><i class="fab fa-weixin"></i></a><a href="#" class="text-white/50 hover:text-white transition-colors"><i class="fab fa-weibo"></i></a><a href="#" class="text-white/50 hover:text-white transition-colors"><i class="fab fa-linkedin"></i></a></div>',1))]),t("div",null,[t("h5",W,n(o.$t("footer.products")),1),t("ul",X,[(c(),r(v,null,w(l,(e,s)=>t("li",{key:s},[d(p,{to:e.path,class:"text-white/70 hover:text-white transition-colors"},{default:_(()=>[g(n(o.$t(e.i18nKey)),1)]),_:2},1032,["to"])])),64))])]),t("div",null,[t("h5",Z,n(o.$t("footer.solutions")),1),t("ul",tt,[(c(),r(v,null,w(i,(e,s)=>t("li",{key:s},[d(p,{to:e.path,class:"text-white/70 hover:text-white transition-colors"},{default:_(()=>[g(n(o.$t(e.i18nKey)),1)]),_:2},1032,["to"])])),64))])]),t("div",null,[t("h5",et,n(o.$t("footer.contactUs")),1),t("ul",st,[t("li",ot,[a[1]||(a[1]=t("i",{class:"fas fa-map-marker-alt text-white/70 mt-1 mr-3"},null,-1)),t("span",nt,n(o.$t("footer.address")),1)]),t("li",at,[a[2]||(a[2]=t("i",{class:"fas fa-phone text-white/70 mt-1 mr-3"},null,-1)),t("span",lt,n(o.$t("footer.phone")),1)]),t("li",it,[a[3]||(a[3]=t("i",{class:"fas fa-envelope text-white/70 mt-1 mr-3"},null,-1)),t("span",rt,n(o.$t("footer.email")),1)])])])]),t("div",ct,[t("p",dt,"© "+n(new Date().getFullYear())+" "+n(o.$t("common.appName"))+". "+n(o.$t("footer.allRightsReserved")),1)])])])}}}),pt={class:"flex flex-col min-h-screen"},ht={key:0,class:"page-loader"},ft={class:"flex-grow"},xt=y({__name:"default",setup(b){const u=x(!0);return L(()=>{setTimeout(()=>{u.value=!1},500)}),(l,i)=>{const o=G,a=ut;return c(),r("div",pt,[u.value?(c(),r("div",ht,i[0]||(i[0]=[t("div",{class:"loader-spinner"},null,-1)]))):E("",!0),d(o),t("main",ft,[V(l.$slots,"default")]),d(a)])}}});export{xt as default};
|