文章布局,文章页面采用文章布局
This commit is contained in:
parent
6a4800acbb
commit
fe130e0971
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
||||||
// 文章头部信息
|
// 文章头部信息
|
||||||
const articleHeader = {
|
const articleHeader = {
|
||||||
title: '共享烘干机APP方案开发与制作',
|
title: '共享烘干机APP方案开发与制作',
|
||||||
|
|
@ -278,8 +279,8 @@ const pagination = {
|
||||||
<div class="relative mb-8">
|
<div class="relative mb-8">
|
||||||
<div class="relative overflow-hidden rounded-xl">
|
<div class="relative overflow-hidden rounded-xl">
|
||||||
<img
|
<img
|
||||||
:src="articleContent.heroImage.src"
|
|
||||||
:alt="articleContent.heroImage.alt"
|
:alt="articleContent.heroImage.alt"
|
||||||
|
:src="articleContent.heroImage.src"
|
||||||
class="w-full h-64 md:h-80 object-cover"
|
class="w-full h-64 md:h-80 object-cover"
|
||||||
>
|
>
|
||||||
<!-- 红色覆盖按钮 -->
|
<!-- 红色覆盖按钮 -->
|
||||||
|
|
@ -355,8 +356,8 @@ const pagination = {
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-for="tag in popularTags"
|
v-for="tag in popularTags"
|
||||||
:key="tag"
|
:key="tag"
|
||||||
to="/tags"
|
|
||||||
class="px-3 py-1 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-full text-sm hover:bg-blue-100 dark:hover:bg-blue-900 hover:text-blue-800 dark:hover:text-blue-200 transition-colors duration-200"
|
class="px-3 py-1 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-full text-sm hover:bg-blue-100 dark:hover:bg-blue-900 hover:text-blue-800 dark:hover:text-blue-200 transition-colors duration-200"
|
||||||
|
to="/tags"
|
||||||
>
|
>
|
||||||
{{ tag }}
|
{{ tag }}
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
|
|
||||||
13
app/layouts/article.vue
Normal file
13
app/layouts/article.vue
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<UContainer>
|
||||||
|
<AppHeader/>
|
||||||
|
<slot/>
|
||||||
|
<BottomNavigation/>
|
||||||
|
<AppFooter/>
|
||||||
|
</UContainer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
// 设置页面布局
|
||||||
|
definePageMeta({
|
||||||
|
layout: 'article'
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -11,3 +14,4 @@
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user