Files
NSG_PORTAL_V2/components/dynamic-page/page-component/templates/other/details/infographics.vue
T

29 lines
1.5 KiB
Vue
Raw Normal View History

2024-05-31 12:39:53 +07:00
<script setup lang="ts">
2024-06-03 12:27:58 +07:00
import { useArticleStore } from '~/stores/articles';
2024-06-03 21:53:23 +07:00
import { breakpoint } from '~/definitions';
import { useWindowSize } from '@vueuse/core'
2024-05-31 12:39:53 +07:00
2024-06-03 21:53:23 +07:00
const { width } = useWindowSize()
import { useDynamicPageStore } from "~/stores/dynamic-page";
const { currentArticle } = storeToRefs(useArticleStore());
const { step } = storeToRefs(useDynamicPageStore());
2024-05-31 12:39:53 +07:00
</script>
<template>
2024-06-03 12:27:58 +07:00
<div class="content" v-if="currentArticle">
2024-06-03 21:53:23 +07:00
<h1 id="sub" v-html="currentArticle?.sub" class=" font-bold opacity-60 pb-1" :style="{ 'font-size': `${16 + Number(step)}px`}"></h1>
2024-06-06 13:29:22 +07:00
<h3 id="title" :style="{ 'font-size': width > breakpoint.lg ? `${32 + Number(step)}px` : `${20 + Number(step)}px`}" class="font-bold pb-1" v-html="currentArticle?.title"></h3>
<p id="published-on" class="text-gray-600 mb-3" :style="{ 'font-size': `${14 + Number(step)}px` }">{{ utils.dateFormat(currentArticle?.publishedOn, "dddd, DD/MM/YYYY - HH:mm") }}</p>
2024-06-03 21:53:23 +07:00
2024-06-03 12:27:58 +07:00
<!-- <div class="author">Tác giả - Thời gian tạo</div> -->
2024-06-06 13:29:22 +07:00
<div id="intro" v-if="currentArticle?.intro" v-html="currentArticle?.intro" class="font-semibold tracking-widest mb-3" :style="{'font-size': `${16 + Number(step)}px`}"></div>
2024-06-03 21:53:23 +07:00
<div id="article-detail" :class="'text-[16px] tracking-wider'" v-html="currentArticle.detail" class="[&_img]:mx-auto" :style="{ 'font-size': `${16 + Number(step)}px`}"> </div>
2024-05-31 12:39:53 +07:00
</div>
</template>
<style scoped lang="scss">
.content {
overflow: hidden;
}
</style>