feat: 限制页面宽度
- 为页面添加1200px的宽度限制,提升其在宽屏下的观感
This commit is contained in:
@ -1,69 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="page-container">
|
|
||||||
<div v-if="content">
|
|
||||||
<el-breadcrumb class="breadcrumb" separator="/">
|
|
||||||
<el-breadcrumb-item class="text-md opacity-50">
|
|
||||||
<NuxtLink :to="$localePath('/')">
|
|
||||||
{{ $t('navigation.home') }}
|
|
||||||
</NuxtLink>
|
|
||||||
</el-breadcrumb-item>
|
|
||||||
<el-breadcrumb-item class="text-md opacity-50">
|
|
||||||
<NuxtLink :to="$localePath('/about')">
|
|
||||||
{{ $t('navigation.contact-info') }}
|
|
||||||
</NuxtLink>
|
|
||||||
</el-breadcrumb-item>
|
|
||||||
</el-breadcrumb>
|
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<markdown-renderer :content="content || ''" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else class="loading">
|
|
||||||
<el-skeleton :rows="5" animated />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
const { findOne } = useStrapi()
|
|
||||||
const { getStrapiLocale } = useLocalizations()
|
|
||||||
|
|
||||||
const strapiLocale = getStrapiLocale()
|
|
||||||
|
|
||||||
const content = ref<string>('')
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
try {
|
|
||||||
const response = await findOne<StrapiContactInfo>('contact-info', undefined, {
|
|
||||||
populate: '*',
|
|
||||||
locale: strapiLocale,
|
|
||||||
})
|
|
||||||
if (response.data) {
|
|
||||||
content.value = response.data.content || ''
|
|
||||||
} else {
|
|
||||||
console.warn('No contact info data found')
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Failed to fetch contact info:', error)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.page-container {
|
|
||||||
padding: 2rem 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.breadcrumb {
|
|
||||||
padding: 1rem 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 1rem;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.markdown-body ul) {
|
|
||||||
list-style-type: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -64,6 +64,8 @@ onMounted(async () => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.page-container {
|
.page-container {
|
||||||
padding: 2rem 1rem;
|
padding: 2rem 1rem;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
|
|||||||
@ -129,7 +129,9 @@ useHead({
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.page-container {
|
.page-container {
|
||||||
min-height: 60vh;
|
min-height: 80vh;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
|
|||||||
@ -11,14 +11,13 @@
|
|||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="page-content">
|
||||||
<div class="productions-container">
|
<div class="productions-container">
|
||||||
<el-collapse v-model="activeNames" class="production-collapse">
|
<el-collapse v-model="activeNames" class="production-collapse">
|
||||||
<el-collapse-item
|
<el-collapse-item v-for="(group, type) in groupedProductions" :key="type" :title="type || '未分类'"
|
||||||
v-for="(group, type) in groupedProductions" :key="type" :title="type || '未分类'"
|
|
||||||
:name="type || 'no-category'">
|
:name="type || 'no-category'">
|
||||||
<div class="group-list">
|
<div class="group-list">
|
||||||
<production-card
|
<production-card v-for="production in group" :key="production.documentId || production.id"
|
||||||
v-for="production in group" :key="production.documentId || production.id"
|
|
||||||
:slug="production.documentId" :image-url="useStrapiMedia(production?.cover?.url || '')"
|
:slug="production.documentId" :image-url="useStrapiMedia(production?.cover?.url || '')"
|
||||||
:name="production.title" :description="production.summary || ''" />
|
:name="production.title" :description="production.summary || ''" />
|
||||||
</div>
|
</div>
|
||||||
@ -26,6 +25,7 @@ v-for="production in group" :key="production.documentId || production.id"
|
|||||||
</el-collapse>
|
</el-collapse>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@ -92,6 +92,8 @@ onMounted(async () => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.page-container {
|
.page-container {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 1200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
|
|||||||
@ -67,7 +67,9 @@ onMounted(async () => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.page-container {
|
.page-container {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
min-height: 60vh;
|
min-height: 80vh;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
|
|||||||
@ -98,6 +98,8 @@ onMounted(async () => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.page-container {
|
.page-container {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
|
|||||||
@ -59,6 +59,11 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.page-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 2rem 2rem 0rem;
|
padding: 2rem 2rem 0rem;
|
||||||
|
|||||||
@ -55,6 +55,11 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.page-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 2rem 2rem 0rem;
|
padding: 2rem 2rem 0rem;
|
||||||
|
|||||||
@ -53,6 +53,11 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.page-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 2rem 2rem 0rem;
|
padding: 2rem 2rem 0rem;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<support-tabs />
|
<support-tabs />
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1 class="page-title">{{ $t('navigation.support') }}</h1>
|
<h1 class="page-title">{{ $t('navigation.support') }}</h1>
|
||||||
<el-breadcrumb class="breadcrumb" separator="/">
|
<el-breadcrumb class="breadcrumb" separator="/">
|
||||||
@ -105,6 +105,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.page-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -123,8 +127,6 @@
|
|||||||
|
|
||||||
.page-content {
|
.page-content {
|
||||||
padding: 1rem 2rem 2rem;
|
padding: 1rem 2rem 2rem;
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -135,7 +137,7 @@ section {
|
|||||||
|
|
||||||
.card-group {
|
.card-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 100px;
|
gap: 50px;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user