Merge branch 'main' of https://github.com/TOPVERSE/TOPVERSE_Official
This commit is contained in:
commit
b79906cef9
14
Dockerfile
14
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM node:18-bullseye
|
FROM node:lts-alpine3.17
|
||||||
|
|
||||||
RUN mkdir -p /web
|
RUN mkdir -p /web
|
||||||
|
|
||||||
|
@ -6,15 +6,15 @@ COPY . /web
|
||||||
|
|
||||||
WORKDIR /web
|
WORKDIR /web
|
||||||
|
|
||||||
RUN npm config set registry https://registry.npm.taobao.org
|
# RUN yarn config set registry https://registry.npm.taobao.org
|
||||||
RUN npm install -g pnpm
|
# RUN npm install -g yarn
|
||||||
RUN pnpm install
|
RUN yarn
|
||||||
|
RUN yarn build
|
||||||
RUN pnpm build
|
RUN rm -rf node_module
|
||||||
|
|
||||||
ENV HOST 0.0.0.0
|
ENV HOST 0.0.0.0
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD ["pnpm", "start"]
|
CMD ["yarn", "start"]
|
||||||
|
|
|
@ -28,6 +28,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<div class="absolute top-0 z-10 h-full w-full flex items-center justify-center text-shadow">
|
<div class="absolute top-0 z-10 h-full w-full flex items-center justify-center text-shadow">
|
||||||
<Typography
|
<Typography
|
||||||
|
scale-135
|
||||||
text-color="white"
|
text-color="white"
|
||||||
:topic="$t(carousels[pages].title)" :description="$t(carousels[pages].description)" :link="{
|
:topic="$t(carousels[pages].title)" :description="$t(carousels[pages].description)" :link="{
|
||||||
...carousels[pages].link,
|
...carousels[pages].link,
|
||||||
|
|
|
@ -12,20 +12,20 @@ $defineProps<{
|
||||||
class="group relative h-full w-full overflow-hidden rounded-lg bg-primary bg-opacity-35 shadow-lg"
|
class="group relative h-full w-full overflow-hidden rounded-lg bg-primary bg-opacity-35 shadow-lg"
|
||||||
>
|
>
|
||||||
<img :src="img" class="h-full w-full" style="object-fit: cover;">
|
<img :src="img" class="h-full w-full" style="object-fit: cover;">
|
||||||
<div class="mask-img opacity-0 group-hover:opacity-100">
|
<div class="mask-img h-50px bg-dark-700/70 transition-all group-hover:(h-full)">
|
||||||
<div class="text-h6 w-full">
|
<div class="text-h6 flex-grow">
|
||||||
<p :title="$t(topic)" class="w-90% truncate text-white">
|
<p :title="$t(topic)" class="line-clamp-1 w-full text-white group-hover:(line-clamp-3 h-full)">
|
||||||
{{ $t(topic) }}
|
{{ $t(topic) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div i-solar-arrow-right-linear stroke-3 font-bold text-white />
|
<div i-solar-arrow-right-linear mx-2 stroke-3 font-bold text-white />
|
||||||
</div>
|
</div>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.mask-img{
|
.mask-img{
|
||||||
--uno:'absolute bottom-0 left-0 z-1 flex h-50px w-full items-center justify-center border-t-2px border-dark-50/10 bg-black/15 p-2 px-10 backdrop-blur-md transition ';
|
--uno:'absolute bottom-0 left-0 z-1 flex w-full items-center justify-center border-t-2px border-dark-50/10 p-2 px-10 backdrop-blur-md transition ';
|
||||||
box-shadow: 0 -5px 25px rgba(0,0,0,0.4);
|
box-shadow: 0 -5px 25px rgba(0,0,0,0.4);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -25,7 +25,7 @@ $defineProps<{
|
||||||
}}
|
}}
|
||||||
</p>
|
</p>
|
||||||
<NuxtLink v-if="link" :href="link?.href">
|
<NuxtLink v-if="link" :href="link?.href">
|
||||||
<ABtn>
|
<ABtn variant="light" class="group" color="white" icon=" i-solar-arrow-right-linear transition-all group-hover:px-4">
|
||||||
{{ link?.name }}
|
{{ link?.name }}
|
||||||
</ABtn>
|
</ABtn>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
|
|
@ -21,7 +21,7 @@ const colors = [
|
||||||
<template>
|
<template>
|
||||||
<Section>
|
<Section>
|
||||||
<Typography :topic="$t(topic)" />
|
<Typography :topic="$t(topic)" />
|
||||||
<div class="grid-row gap-0 pt-20 md:(grid-cols-2)" :class="`lg:grid-cols-${content.length}`">
|
<div class="grid-row gap-10 pt-20 md:(grid-cols-2)" :class="`lg:grid-cols-${content.length}`">
|
||||||
<div
|
<div
|
||||||
v-for="(col, i) in content"
|
v-for="(col, i) in content"
|
||||||
:key="i"
|
:key="i"
|
||||||
|
@ -30,21 +30,9 @@ const colors = [
|
||||||
<h2 :title="$t(col.title)" class="text-h2 w-full text-center text-7xl font-bold text-transparent" :class="colors[i]">
|
<h2 :title="$t(col.title)" class="text-h2 w-full text-center text-7xl font-bold text-transparent" :class="colors[i]">
|
||||||
{{ $t(col.title) }}
|
{{ $t(col.title) }}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-for="(col, i) in content"
|
|
||||||
:key="i"
|
|
||||||
class="h-full w-full flex flex-col items-center justify-center"
|
|
||||||
>
|
|
||||||
<h5 :title="$t(col.subtext)" class="text-h4 text-h5 mt-3 text-center">
|
<h5 :title="$t(col.subtext)" class="text-h4 text-h5 mt-3 text-center">
|
||||||
{{ $t(col.subtext) }}
|
{{ $t(col.subtext) }}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-for="(col, i) in content"
|
|
||||||
:key="i"
|
|
||||||
class="h-full w-full flex flex-col items-center justify-center"
|
|
||||||
>
|
|
||||||
<p :title="$t(col.description)" class="text-h6 mt-1 text-center">
|
<p :title="$t(col.description)" class="text-h6 mt-1 text-center">
|
||||||
{{ $t(col.description) }}
|
{{ $t(col.description) }}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -36,6 +36,10 @@ export default defineNuxtConfig({
|
||||||
danger: hex2hsl(colors.rose[500]).toString(),
|
danger: hex2hsl(colors.rose[500]).toString(),
|
||||||
info: hex2hsl(colors.blue[500]).toString(),
|
info: hex2hsl(colors.blue[500]).toString(),
|
||||||
},
|
},
|
||||||
|
cssVars: {
|
||||||
|
// 'base-c': hex2hsl(colors.white).toString(),
|
||||||
|
'body-bg-c': hex2hsl(colors.white).toString(),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
dark: {
|
dark: {
|
||||||
|
@ -46,6 +50,9 @@ export default defineNuxtConfig({
|
||||||
danger: hex2hsl(colors.rose[500]).toString(),
|
danger: hex2hsl(colors.rose[500]).toString(),
|
||||||
info: hex2hsl(colors.blue[500]).toString(),
|
info: hex2hsl(colors.blue[500]).toString(),
|
||||||
},
|
},
|
||||||
|
cssVars: {
|
||||||
|
'body-bg-c': hex2hsl(colors.dark[900]).toString(),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"build": "nuxi build",
|
"build": "nuxi build",
|
||||||
"dev": "nuxi dev",
|
"dev": "nuxi dev",
|
||||||
"dev:pwa": "VITE_PLUGIN_PWA=true nuxi dev",
|
"dev:pwa": "VITE_PLUGIN_PWA=true nuxi dev",
|
||||||
"start": "pnpm build && node .output/server/index.mjs",
|
"start": "node .output/server/index.mjs",
|
||||||
"typecheck": "vue-tsc --noEmit",
|
"typecheck": "vue-tsc --noEmit",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"postinstall": "nuxi prepare",
|
"postinstall": "nuxi prepare",
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<NuxtPage />
|
||||||
|
</template>
|
|
@ -2,7 +2,7 @@
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const { locale } = useI18n()
|
const { locale } = useI18n()
|
||||||
|
|
||||||
const path = `/${locale.value}${route.path.split('blog')[1]}`
|
const path = `/${locale.value}/${route.params.id}`
|
||||||
|
|
||||||
const { data } = await useAsyncData(`content-${path}`, () => {
|
const { data } = await useAsyncData(`content-${path}`, () => {
|
||||||
return queryContent().where({ _path: path }).findOne()
|
return queryContent().where({ _path: path }).findOne()
|
||||||
|
@ -10,8 +10,8 @@ const { data } = await useAsyncData(`content-${path}`, () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Banner :img="data?.img" :title="data?.title" :topic="data?.topic" :description="data?.description" />
|
<SectionBanner :img="data?.img" :title="data?.title" :topic="data?.topic" :description="data?.description" font-bold text-white />
|
||||||
<main class="m-auto prose">
|
<main class="m-auto prose xl:max-w-900px">
|
||||||
<ContentRenderer v-if="data" :value="data" />
|
<ContentRenderer v-if="data" :value="data" />
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
sdf
|
||||||
|
</template>
|
|
@ -30,7 +30,7 @@ const sectionNine = useSectionNine()
|
||||||
<Section class="border-b-2 border-dark/40 border-b-solid from-dark/30 bg-gradient-to-t dark:(border-light-50/10 from-light/5)">
|
<Section class="border-b-2 border-dark/40 border-b-solid from-dark/30 bg-gradient-to-t dark:(border-light-50/10 from-light/5)">
|
||||||
<Typography :title=" $t(sectionTwo.title) " :description=" $t(sectionTwo.description) " />
|
<Typography :title=" $t(sectionTwo.title) " :description=" $t(sectionTwo.description) " />
|
||||||
|
|
||||||
<div class="grid-row grid-cols-2 py-10 md:grid-cols-3" :class="`lg:grid-cols-${sectionTwo.content.length}`">
|
<div class="grid-row grid-cols-2 gap-18 py-10 md:(grid-cols-3 gap-10)" :class="`lg:grid-cols-${sectionTwo.content.length} lg:gap-2 `">
|
||||||
<LocaleNuxtLink
|
<LocaleNuxtLink
|
||||||
v-for="(content, i) in sectionTwo.content"
|
v-for="(content, i) in sectionTwo.content"
|
||||||
:key="i"
|
:key="i"
|
||||||
|
@ -71,7 +71,9 @@ const sectionNine = useSectionNine()
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<LocaleNuxtLink :href="sectionThree.link.href">
|
<LocaleNuxtLink :href="sectionThree.link.href">
|
||||||
<ABtn>{{ $t(sectionThree.link.name) }}</ABtn>
|
<ABtn variant="light">
|
||||||
|
{{ $t(sectionThree.link.name) }}
|
||||||
|
</ABtn>
|
||||||
</LocaleNuxtLink>
|
</LocaleNuxtLink>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue