215 lines
11 KiB
JavaScript
215 lines
11 KiB
JavaScript
import { defineComponent, ref, computed, mergeProps, withCtx, createVNode, toDisplayString, createTextVNode, useSSRContext } from 'file://D:/doc/workspace/web3/node_modules/vue/index.mjs';
|
|
import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderComponent, ssrRenderList, ssrRenderSlot } from 'file://D:/doc/workspace/web3/node_modules/vue/server-renderer/index.mjs';
|
|
import { _ as __nuxt_component_0 } from './nuxt-link.mjs';
|
|
import { useRoute } from 'file://D:/doc/workspace/web3/node_modules/vue-router/dist/vue-router.node.mjs';
|
|
import { useI18n } from 'file://D:/doc/workspace/web3/node_modules/vue-i18n/dist/vue-i18n.mjs';
|
|
import 'file://D:/doc/workspace/web3/node_modules/ufo/dist/index.mjs';
|
|
import './server.mjs';
|
|
import 'file://D:/doc/workspace/web3/node_modules/hookable/dist/index.mjs';
|
|
import 'file://D:/doc/workspace/web3/node_modules/unctx/dist/index.mjs';
|
|
import 'file://D:/doc/workspace/web3/node_modules/h3/dist/index.mjs';
|
|
import 'file://D:/doc/workspace/web3/node_modules/radix3/dist/index.mjs';
|
|
import 'file://D:/doc/workspace/web3/node_modules/defu/dist/defu.mjs';
|
|
|
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
__name: "LanguageSwitcher",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const i18n = useI18n();
|
|
const dropdownOpen = ref(false);
|
|
const currentLocale = computed(() => i18n.locale.value);
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "relative" }, _attrs))}><button class="flex items-center text-white/85 hover:text-secondary transition-colors duration-300"><span class="mr-1">${ssrInterpolate(currentLocale.value === "zh" ? "EN" : "中")}</span><i class="fas fa-chevron-down text-xs"></i></button>`);
|
|
if (dropdownOpen.value) {
|
|
_push(`<div class="absolute right-0 mt-2 bg-white rounded-md shadow-lg py-1 min-w-[100px] z-50"><button class="${ssrRenderClass([{ "bg-gray-100": currentLocale.value === "zh" }, "block w-full text-left px-4 py-2 text-gray-800 hover:bg-gray-100"])}"> 中文 </button><button class="${ssrRenderClass([{ "bg-gray-100": currentLocale.value === "en" }, "block w-full text-left px-4 py-2 text-gray-800 hover:bg-gray-100"])}"> English </button></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div>`);
|
|
};
|
|
}
|
|
});
|
|
|
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
__name: "NavBar",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
useRoute();
|
|
const { t } = useI18n();
|
|
const mobileMenuOpen = ref(false);
|
|
const scrolled = ref(false);
|
|
const navItems = [
|
|
{ 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" }
|
|
];
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_NuxtLink = __nuxt_component_0;
|
|
_push(`<!--[--><nav class="${ssrRenderClass(["bg-primary shadow-md fixed w-full z-50", { "nav-scrolled": scrolled.value }])}"><div class="container"><div class="flex items-center justify-between h-16">`);
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
to: "/",
|
|
class: "flex items-center text-white"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`<i class="fas fa-cloud text-2xl mr-2"${_scopeId}></i><span class="text-xl font-bold"${_scopeId}>${ssrInterpolate(_ctx.$t("common.appName"))}</span>`);
|
|
} else {
|
|
return [
|
|
createVNode("i", { class: "fas fa-cloud text-2xl mr-2" }),
|
|
createVNode("span", { class: "text-xl font-bold" }, toDisplayString(_ctx.$t("common.appName")), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`<div class="hidden md:flex items-center space-x-8"><!--[-->`);
|
|
ssrRenderList(navItems, (item, index) => {
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
key: index,
|
|
to: item.path,
|
|
class: ["text-white/85 hover:text-secondary transition-colors duration-300", { "text-white": _ctx.$route.path === item.path }]
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`${ssrInterpolate(_ctx.$t(item.i18nKey))}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(_ctx.$t(item.i18nKey)), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent));
|
|
});
|
|
_push(`<!--]-->`);
|
|
_push(ssrRenderComponent(_sfc_main$3, null, null, _parent));
|
|
_push(`</div><button class="md:hidden text-white p-2 rounded-lg hover:bg-white/10 transition-colors duration-300" aria-label="打开菜单"><i class="fas fa-bars text-xl"></i></button></div><div class="${ssrRenderClass(["md:hidden bg-primary absolute top-16 left-0 right-0 shadow-lg", { "hidden": !mobileMenuOpen.value }])}"><div class="container py-4"><div class="flex flex-col space-y-4"><!--[-->`);
|
|
ssrRenderList(navItems, (item, index) => {
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
key: index,
|
|
to: item.path,
|
|
class: ["text-white/85 hover:text-secondary transition-colors duration-300 py-2", { "text-white": _ctx.$route.path === item.path }],
|
|
onClick: ($event) => mobileMenuOpen.value = false
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`${ssrInterpolate(_ctx.$t(item.i18nKey))}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(_ctx.$t(item.i18nKey)), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent));
|
|
});
|
|
_push(`<!--]--><div class="py-2">`);
|
|
_push(ssrRenderComponent(_sfc_main$3, null, null, _parent));
|
|
_push(`</div></div></div></div></div></nav><div class="h-16"></div><!--]-->`);
|
|
};
|
|
}
|
|
});
|
|
|
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
__name: "FooterSection",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const { t } = useI18n();
|
|
const products = [
|
|
{ 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" }
|
|
];
|
|
const solutions = [
|
|
{ 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 (_ctx, _push, _parent, _attrs) => {
|
|
const _component_NuxtLink = __nuxt_component_0;
|
|
_push(`<footer${ssrRenderAttrs(mergeProps({ class: "bg-primary text-white py-12" }, _attrs))}><div class="container"><div class="grid md:grid-cols-4 gap-8"><div><h5 class="text-lg font-semibold mb-4">${ssrInterpolate(_ctx.$t("common.appName"))}</h5><p class="text-white/50 mb-4">${ssrInterpolate(_ctx.$t("footer.description"))}</p><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></div><div><h5 class="text-lg font-semibold mb-4">${ssrInterpolate(_ctx.$t("footer.products"))}</h5><ul class="space-y-2"><!--[-->`);
|
|
ssrRenderList(products, (product, index) => {
|
|
_push(`<li>`);
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
to: product.path,
|
|
class: "text-white/70 hover:text-white transition-colors"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`${ssrInterpolate(_ctx.$t(product.i18nKey))}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(_ctx.$t(product.i18nKey)), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent));
|
|
_push(`</li>`);
|
|
});
|
|
_push(`<!--]--></ul></div><div><h5 class="text-lg font-semibold mb-4">${ssrInterpolate(_ctx.$t("footer.solutions"))}</h5><ul class="space-y-2"><!--[-->`);
|
|
ssrRenderList(solutions, (solution, index) => {
|
|
_push(`<li>`);
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
to: solution.path,
|
|
class: "text-white/70 hover:text-white transition-colors"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`${ssrInterpolate(_ctx.$t(solution.i18nKey))}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(_ctx.$t(solution.i18nKey)), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent));
|
|
_push(`</li>`);
|
|
});
|
|
_push(`<!--]--></ul></div><div><h5 class="text-lg font-semibold mb-4">${ssrInterpolate(_ctx.$t("footer.contactUs"))}</h5><ul class="space-y-3"><li class="flex items-start"><i class="fas fa-map-marker-alt text-white/70 mt-1 mr-3"></i><span class="text-white/70">${ssrInterpolate(_ctx.$t("footer.address"))}</span></li><li class="flex items-start"><i class="fas fa-phone text-white/70 mt-1 mr-3"></i><span class="text-white/70">${ssrInterpolate(_ctx.$t("footer.phone"))}</span></li><li class="flex items-start"><i class="fas fa-envelope text-white/70 mt-1 mr-3"></i><span class="text-white/70">${ssrInterpolate(_ctx.$t("footer.email"))}</span></li></ul></div></div><div class="mt-12 pt-8 border-t border-white/10 text-center"><p class="text-white/50">© ${ssrInterpolate((/* @__PURE__ */ new Date()).getFullYear())} ${ssrInterpolate(_ctx.$t("common.appName"))}. ${ssrInterpolate(_ctx.$t("footer.allRightsReserved"))}</p></div></div></footer>`);
|
|
};
|
|
}
|
|
});
|
|
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "default",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const pageLoading = ref(true);
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_NavBar = _sfc_main$2;
|
|
const _component_FooterSection = _sfc_main$1;
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col min-h-screen" }, _attrs))}>`);
|
|
if (pageLoading.value) {
|
|
_push(`<div class="page-loader"><div class="loader-spinner"></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(ssrRenderComponent(_component_NavBar, null, null, _parent));
|
|
_push(`<main class="flex-grow">`);
|
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
_push(`</main>`);
|
|
_push(ssrRenderComponent(_component_FooterSection, null, null, _parent));
|
|
_push(`</div>`);
|
|
};
|
|
}
|
|
});
|
|
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("layouts/default.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
|
|
export { _sfc_main as default };
|
|
//# sourceMappingURL=default.vue.mjs.map
|