This commit is contained in:
nguyen van thai
2024-07-16 09:58:54 +07:00
parent 9cc998e0bf
commit 5a041acd54
3 changed files with 20 additions and 20 deletions
@@ -20,7 +20,7 @@ const setGlobalState = (id: any) => {
<template v-if="record && record.childs && record.childs.length > 0 && record.typeChild === enumPageComponentStaticChild.DEFAULT">
<div class="navigation-submenu">
<div class="navigation_title">
<nuxt-link :to="record?.slug" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
<nuxt-link :to="`/${record?.slug}`" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
</div>
<div class="navigation-item submenu-container dropdown-container">
<RecusiveNavItem :records="record.childs" />
@@ -31,7 +31,7 @@ const setGlobalState = (id: any) => {
<div class="navigation-submenu">
<div class="position-relative ps-3">
<div class="navigation_title ">
<nuxt-link :to="record?.slug" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
<nuxt-link :to="`/${record?.slug}`" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
</div>
</div>
<div class="full-layout dropdown-container">
@@ -45,7 +45,7 @@ const setGlobalState = (id: any) => {
</template>
<template v-else>
<div class="navigation_title navigation-item" >
<nuxt-link :to="record?.slug" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
<nuxt-link :to="`/${record?.slug}`" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
</div>
</template>
</div>
@@ -190,7 +190,7 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
</div>
</div>
<div class="tags" v-if="currentArticle.tags">
<div class="tags" v-if="currentArticle && currentArticle?.tags">
<span>
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
@@ -200,8 +200,8 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
</svg>
</span>
<ul>
<li v-for="(tag, index) in currentArticle.tags">
<ul >
<li v-for="(tag, index) in currentArticle?.tags">
<nuxt-link class="font-raleway font-500" :to="`/tag/${tag.code}`">{{ tag.title }}</nuxt-link>
</li>
</ul>
@@ -221,38 +221,38 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
<div class="content detail-default">
<div class="content__top">
<div class="flex justify-between flex-wrap items-center mb-10px">
<ul class="flex gap-32px" v-if="currentCategoryTree.length">
<ul class="flex gap-32px" v-if="currentCategoryTree?.length">
<li v-for="( category, index ) in currentCategoryTree" :key="index" class="first:text-#000 text-#929292 last:after:content-[''] relative after:absolute after:content-['/'] after:text-20px after:right--20px" >
<nuxt-link class=" font-raleway text-18px font-500 leading-180% uppercase" :to="`/${category.code}`">{{ category.title }}</nuxt-link>
</li>
</ul>
<div v-if="currentArticle.topics" class="pl-20px relative bg-primary inline-block">
<nuxt-link class="h-30px block py-4px px-16px border-1 border-#000 bg-white text-12px leading-180% font-raleway font-400" :to="`/topic/${currentArticle.topics[0].slug}`">{{ currentArticle.topics[0].title }}</nuxt-link>
<div v-if="currentArticle?.topics" class="pl-20px relative bg-primary inline-block">
<nuxt-link class="h-30px block py-4px px-16px border-1 border-#000 bg-white text-12px leading-180% font-raleway font-400" :to="`/topic/${currentArticle?.topics[0].slug}`">{{ currentArticle?.topics[0].title }}</nuxt-link>
</div>
</div>
<h2 class="font-gelasio text-44px font-bold leading-130%" v-if="currentArticle.title" v-html="currentArticle.title"></h2>
<h2 class="font-gelasio text-44px font-bold leading-130%" v-if="currentArticle?.title" v-html="currentArticle?.title"></h2>
<div class="author flex gap-12px my-20px" v-if="currentArticle.authors">
<div class="author flex gap-12px my-20px" v-if="currentArticle?.authors">
<ul class="flex">
<li :style="{'z-index': index + 1}" class="relative ml--12px first:ml-0" v-for="(author, index) in currentArticle.authors" :key="index">
<li :style="{'z-index': index + 1}" class="relative ml--12px first:ml-0" v-for="(author, index) in currentArticle?.authors" :key="index">
<nuxt-link :to="`/tac-gia/${author.code}`">
<img :src="author.thumbnail || `http://picsum.photos/1024/600?random=1`" alt="" class="w-64px p-1px border-1px border-white h-64px object-cover rounded-full">
<img :src="author?.thumbnail || `http://picsum.photos/1024/600?random=1`" alt="" class="w-64px p-1px border-1px border-white h-64px object-cover rounded-full">
</nuxt-link>
</li>
</ul>
<div>
<div class="mt-10px">
<nuxt-link class="font-raleway text-#000" v-for="(author, index) in currentArticle.authors" :key="index" :to="`/tac-gia/${author.code}`">{{ author.title + (index < currentArticle.authors.length - 1 ? ', ' : '') }}</nuxt-link>
<nuxt-link class="font-raleway text-#000" v-for="(author, index) in currentArticle?.authors" :key="index" :to="`/tac-gia/${author.code}`">{{ author.title + (index < currentArticle.authors.length - 1 ? ', ' : '') }}</nuxt-link>
</div>
<div class="text-12px">
Xuất bản vào {{ formatDate(currentArticle.publishedOn, 'DD/MM/YYYY | hh:mm') }}
Xuất bản vào {{ formatDate(currentArticle?.publishedOn, 'DD/MM/YYYY | hh:mm') }}
</div>
</div>
</div>
<figure v-if="currentArticle.thumbnail">
<img :src="currentArticle.thumbnail" class="w-full " alt="">
<figure v-if="currentArticle?.thumbnail">
<img :src="currentArticle?.thumbnail" class="w-full " alt="">
</figure>
</div>
<div class="content__bottom" >
@@ -303,11 +303,11 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
</div>
<div>
<p class="my-10px" v-if="currentArticle.intro" v-html="currentArticle.intro">
<p class="my-10px" v-if="currentArticle?.intro" v-html="currentArticle.intro">
</p>
<!-- <div v-html="currentArticle.detail" class="[&_p_>_span]:!font-raleway [&_p]:mb-10px"></div> -->
<component :is="{ template: currentArticle.detail, components: { Poll, Quiz, Survey, Document, Attachment, Tag } }" />
<component :is="{ template: currentArticle?.detail, components: { Poll, Quiz, Survey, Document, Attachment, Tag } }" />
</div>
</div>
<div class="content__bottom__right">