feat: add tagline

This commit is contained in:
reco_luan 2020-03-15 19:37:40 +08:00
parent 0a3fdb85d8
commit 9ce2a3806b
4 changed files with 16 additions and 28 deletions

View File

@ -9,10 +9,12 @@
alt="hero">
</ModuleTransition>
<ModuleTransition delay="0.04">
<h1 v-if="recoShowModule && $frontmatter.isShowTitleInHome !== false">{{ $frontmatter.heroText || $title || '午后南杂' }}</h1>
<h1 v-if="recoShowModule && $frontmatter.heroText !== null">{{ $frontmatter.heroText || $title || 'vuePress-theme-reco' }}</h1>
</ModuleTransition>
<ModuleTransition delay="0.08">
<p v-show="recoShowModule" class="description">{{ $description || 'Welcome to your vuePress-theme-reco site' }}</p>
<p v-if="recoShowModule && $frontmatter.tagline !== null" class="description">
{{ $frontmatter.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}
</p>
</ModuleTransition>
<ModuleTransition delay="0.16">
<p class="huawei" v-if="recoShowModule && $themeConfig.huawei === true">

View File

@ -13,12 +13,14 @@
alt="hero">
</ModuleTransition>
<ModuleTransition delay="0.04">
<h1 v-if="$frontmatter.isShowTitleInHome !== false">{{ $frontmatter.heroText || $title || '午后南杂' }}</h1>
<h1 v-if="recoShowModule && $frontmatter.heroText !== null">
{{ $frontmatter.heroText || $title || 'vuePress-theme-reco' }}
</h1>
</ModuleTransition>
<ModuleTransition delay="0.08">
<p v-show="recoShowModule" class="description">
{{ $description || 'Welcome to your vuePress-theme-reco site' }}
<p v-if="recoShowModule && $frontmatter.tagline !== null" class="description">
{{ $frontmatter.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}
</p>
</ModuleTransition>

View File

@ -1,22 +1,18 @@
<template>
<main class="page">
<ModuleTransition>
<slot v-show="recoShowModule" name="top"/>
</ModuleTransition>
<ModuleTransition delay="0.08">
<div v-show="recoShowModule" class="page-title">
<div v-show="recoShowModule && $page.title" class="page-title">
<h1>{{$page.title}}</h1>
<hr>
<PageInfo :pageInfo="$page" :showAccessNumber="showAccessNumber"></PageInfo>
</div>
</ModuleTransition>
<ModuleTransition delay="0.16">
<ModuleTransition delay="0.08">
<Content v-show="recoShowModule" class="theme-reco-content" />
</ModuleTransition>
<ModuleTransition delay="0.24">
<ModuleTransition delay="0.16">
<footer v-show="recoShowModule" class="page-edit">
<div
class="edit-link"
@ -40,7 +36,7 @@
</footer>
</ModuleTransition>
<ModuleTransition delay="0.32">
<ModuleTransition delay="0.24">
<div class="page-nav" v-if="recoShowModule && (prev || next)">
<p class="inner">
<span
@ -72,10 +68,6 @@
</p>
</div>
</ModuleTransition>
<ModuleTransition delay="0.40">
<slot v-show="recoShowModule" name="bottom"/>
</ModuleTransition>
</main>
</template>
@ -99,6 +91,7 @@ export default {
computed: {
showAccessNumber () {
console.log(this)
return this.$themeConfig.commentsSolution === 'valine'
},
lastUpdated () {

View File

@ -1,17 +1,8 @@
<template>
<div>
<Common>
<component v-if="$frontmatter.home" :is="homeCom"></component>
<Page
v-else
:sidebar-items="sidebarItems">
<slot
name="page-top"
slot="top"/>
<slot
name="page-bottom"
slot="bottom"/>
</Page>
<component v-if="$frontmatter.home" :is="homeCom"/>
<Page v-else :sidebar-items="sidebarItems"/>
<Footer v-if="$frontmatter.home" class="footer" />
</Common>
</div>