mirror of https://github.com/YunYouJun/valaxy
fix: post card title center when has cover, close #157
This commit is contained in:
parent
f7559fe1ac
commit
b8e471770f
|
@ -1,15 +1,19 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Post } from 'valaxy'
|
||||
import { useLayout } from 'valaxy'
|
||||
import YunPostMeta from 'valaxy-theme-yun/components/YunPostMeta.vue'
|
||||
|
||||
defineProps<{
|
||||
frontmatter: Post
|
||||
}>()
|
||||
|
||||
// 仅在 Post 布局显示
|
||||
const isPost = useLayout('post')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<YunPostMeta :frontmatter="frontmatter">
|
||||
<span id="busuanzi_container_page_pv">
|
||||
<span v-if="isPost" id="busuanzi_container_page_pv">
|
||||
本文总阅读量 <span id="busuanzi_value_page_pv" /> 次
|
||||
</span>
|
||||
</YunPostMeta>
|
||||
|
|
|
@ -81,16 +81,20 @@ useScriptTag('//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js')
|
|||
```vue
|
||||
<script lang="ts" setup>
|
||||
import type { Post } from 'valaxy'
|
||||
import { useLayout } from 'valaxy'
|
||||
import YunPostMeta from 'valaxy-theme-yun/components/YunPostMeta.vue'
|
||||
|
||||
defineProps<{
|
||||
frontmatter: Post
|
||||
}>()
|
||||
|
||||
// 仅在 Post 布局显示
|
||||
const isPost = useLayout('post')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<YunPostMeta :frontmatter="frontmatter">
|
||||
<span id="busuanzi_container_page_pv">
|
||||
<span v-if="isPost" id="busuanzi_container_page_pv">
|
||||
本文总阅读量 <span id="busuanzi_value_page_pv" /> 次
|
||||
</span>
|
||||
</YunPostMeta>
|
||||
|
|
|
@ -31,7 +31,7 @@ const { icon, styles } = usePostProperty(props.post.type)
|
|||
:to="post.path || ''"
|
||||
m="t-3"
|
||||
>
|
||||
<div class="flex justify-center items-center title text-2xl" font="serif black">
|
||||
<div class="flex justify-center items-center title text-2xl" text="center" font="serif black">
|
||||
<div v-if="post.type" class="inline-flex" m="r-1" :class="icon" />{{ post.title }}
|
||||
</div>
|
||||
</AppLink>
|
||||
|
|
Loading…
Reference in New Issue