Skip to content

Commit 832d674

Browse files
author
reco_luan
committed
fix: optimize style
1 parent d524a1b commit 832d674

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

packages/vuepress-theme-reco/components/Home.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
alt="hero">
1010
</ModuleTransition>
1111
<ModuleTransition delay="0.04">
12-
<h1 v-if="recoShowModule && $frontmatter.heroText !== null">{{ $frontmatter.heroText || $title || 'vuePress-theme-reco' }}</h1>
12+
<h1
13+
v-if="recoShowModule && $frontmatter.heroText !== null"
14+
:style="{ marginTop: $frontmatter.heroImage ? '0px' : '140px'}"
15+
>
16+
{{ $frontmatter.heroText || $title || 'vuePress-theme-reco' }}
17+
</h1>
1318
</ModuleTransition>
1419
<ModuleTransition delay="0.08">
1520
<p v-if="recoShowModule && $frontmatter.tagline !== null" class="description">
@@ -95,7 +100,7 @@ export default {
95100
font-size: 1.2rem;
96101
color: #fff;
97102
background-color: $accentColor;
98-
padding: 0.6rem 1.2rem;
103+
padding: 0.2rem 1.2rem;
99104
border-radius: $borderRadius
100105
transition: background-color 0.1s ease;
101106
box-sizing: border-box;

packages/vuepress-theme-reco/components/Page.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,17 @@ function flatten (items, res) {
260260
margin: 0 auto;
261261
padding: 1rem 2.5rem;
262262
color var(--text-color)
263+
.theme-reco-content h2
264+
position relative
265+
padding-left 0.8rem
266+
&::before
267+
position absolute
268+
left 0
269+
bottom 0
270+
display block
271+
height 1.8rem
272+
content ''
273+
border-left 5px solid $accentColor
263274
.page-edit
264275
@extend $wrapper
265276
padding-top 1rem

packages/vuepress-theme-reco/styles/theme.styl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,7 @@ h1
125125
display block
126126

127127
h2
128-
position relative
129-
padding-left 0.8rem
130128
font-size 1.4rem
131-
&::before
132-
position: absolute
133-
left 0
134-
bottom 0
135-
display: block
136-
height 1.8rem
137-
content: ''
138-
border-left 5px solid $accentColor
139129

140130
h3
141131
font-size 1.2rem

0 commit comments

Comments
 (0)