Skip to content

Commit b94c827

Browse files
committedSep 8, 2021
fix(default-theme): use description as tagline by default
1 parent 96bcdda commit b94c827

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed
 

Diff for: ‎src/client/theme-default/components/HomeHero.vue

+8-12
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ import NavLink from './NavLink.vue'
66
const { site, frontmatter } = useData()
77
88
const showHero = computed(() => {
9-
const {
10-
heroImage,
11-
heroText,
12-
tagline,
13-
actionLink,
14-
actionText
15-
} = frontmatter.value
9+
const { heroImage, heroText, tagline, actionLink, actionText } =
10+
frontmatter.value
1611
return heroImage || heroText || tagline || (actionLink && actionText)
1712
})
1813
1914
const heroText = computed(() => frontmatter.value.heroText || site.value.title)
15+
const tagline = computed(
16+
() => frontmatter.value.tagline || site.value.description
17+
)
2018
</script>
2119

2220
<template>
@@ -30,9 +28,7 @@ const heroText = computed(() => frontmatter.value.heroText || site.value.title)
3028
</figure>
3129

3230
<h1 v-if="heroText" id="main-title" class="title">{{ heroText }}</h1>
33-
<p v-if="frontmatter.tagline" class="description">
34-
{{ frontmatter.tagline }}
35-
</p>
31+
<p v-if="tagline" class="tagline">{{ tagline }}</p>
3632

3733
<NavLink
3834
v-if="frontmatter.actionLink && frontmatter.actionText"
@@ -99,7 +95,7 @@ const heroText = computed(() => frontmatter.value.heroText || site.value.title)
9995
}
10096
}
10197
102-
.description {
98+
.tagline {
10399
margin: 0;
104100
margin-top: 0.25rem;
105101
line-height: 1.3;
@@ -108,7 +104,7 @@ const heroText = computed(() => frontmatter.value.heroText || site.value.title)
108104
}
109105
110106
@media (min-width: 420px) {
111-
.description {
107+
.tagline {
112108
line-height: 1.2;
113109
font-size: 1.6rem;
114110
}

0 commit comments

Comments
 (0)