快乐的梦鱼 1 mese fa
parent
commit
ab00b6a071

+ 30 - 1
src/assets/scss/main.scss

@@ -70,10 +70,39 @@ header {
     margin: 0 auto;
   }
   .logo {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
     font-family: 'STSongtiSC', "Microsoft YaHei", sans-serif;
-    font-size: 24px;
+    font-size: 26px;
     font-weight: bold;
     color: var(--color-primary);
+
+    .col {
+      position: relative;
+      display: flex;
+      flex-direction: column;
+      padding-left: 10px;
+
+      &::before {
+        content: '';
+        position: absolute;
+        top: calc(50% - 17px);
+        left: -1px;
+        width: 1px;
+        height: 35px;
+        background-color: var(--color-border);
+      }
+
+      span {
+        font-size: 14px;
+        margin-right: 0;
+        margin-bottom: 2px;
+      }
+    }
+    span {
+      margin-right: 10px;
+    }
   }
   .mobile-menu-toggle {
     display: none;

+ 14 - 4
src/components/NavBar.vue

@@ -2,7 +2,13 @@
   <!-- 头部 -->
   <header>
     <div class="inner">
-      <div class="logo">厦门市文化遗产保护中心</div>
+      <div class="logo">
+        <span>厦门市文化遗产保护中心</span>
+        <div class="col">
+          <span>厦门市非物质文化遗产保护中心</span>
+          <span>厦门市闽南文化生态保护中心</span>
+        </div>
+      </div>
       <!-- 导航 -->
       <nav class="main-nav" :class="{ show: isMenuOpen }">
         <div class="container">
@@ -36,16 +42,20 @@ const navItems = await useSSrSimpleDataLoader('navItems', async () => {
   const data = (await $fetch('/api/channel/nav')).data || [];
 
   const specialPages = [] as any[];
-  // 政策法规 特殊页
+  //特殊页
+  const indexPage = data.find(item => item.name === '首页');
+  if (indexPage) {
+    indexPage.url = '/';
+  }
   const lawsPage = data.find(item => item.name === '政策法规');
   if (lawsPage) {
     lawsPage.url = '/channel/laws/?id=' + lawsPage.id;
   }
   const contactPage = data.find(item => item.name === '联系我们');
   if (contactPage) {
-    contactPage.url = '/about';
+    contactPage.url = '/about/';
   }
-  specialPages.push(lawsPage, contactPage);
+  specialPages.push(lawsPage, contactPage, indexPage);
 
   return data.map(item => {
     const isSpeical = (specialPages.includes(item));

+ 1 - 1
src/pages/about.vue

@@ -53,7 +53,7 @@
         <div class="row">
           <div class="col col-sm-12 col-md-6 col-lg-8">
             <h3>厦门市文化遗产保护中心</h3>
-            <p>厦门市文化遗产保护中心(厦门市非物质文化遗产保护中心、厦门市闽南文化生态保护中心)为全额拨款公益一类事业单位,隶属厦门市文化和旅游局,机构规格为副处级,内设办公室、文物保护部、非遗保护部、考古部、信息科技部、安全管理部。</p>
+            <p>厦门市文化遗产保护中心(厦门市非物质文化遗产保护中心、厦门市闽南文化生态保护中心)为全额拨款公益一类事业单位,隶属厦门市文化和旅游局,内设办公室、文物保护部、非遗保护部、考古部、信息科技部、安全管理部。</p>
           </div>
           <div class="col col-sm-12 col-md-6 col-lg-4 d-flex flex-row justify-content-end">
             <img src="@/assets/images/about-logo.png" alt="厦门市文化遗产保护中心">

+ 2 - 2
src/pages/channel/[id].vue

@@ -104,10 +104,10 @@ import { DateUtils } from '@imengyu/imengyu-utils';
 import type { IChannel } from '~~/server/api/channel/[id]';
 import SimplePagination from '~/components/content/SimplePagination.vue';
 
-const carouselConfig = {
+const carouselConfig : (typeof Carousel['props']) = {
   itemsToShow: 1,
   wrapAround: true,
-  autoPlay: 5000,
+  autoplay: 5000,
 }
 
 const route = useRoute();

+ 1 - 1
src/pages/index.vue

@@ -232,7 +232,7 @@ import CarouselItem5 from '@/assets/images/board1/5.jpg';
 const carouselConfig = {
   itemsToShow: 1,
   wrapAround: true,
-  autoPlay: 5000,
+  autoplay: 5000,
 }
 const carouselData = await useSSrSimpleDataLoader('carousel', async () => {
   const res = await $fetch(`/api/carousel`);

+ 1 - 1
src/pages/page/[id].vue

@@ -97,7 +97,7 @@ import SimplePageContentLoader from '~/components/content/SimplePageContentLoade
 const carouselConfig = {
   itemsToShow: 1,
   wrapAround: true,
-  autoPlay: 5000,
+  autoplay: 5000,
 }
 
 const route = useRoute();