Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 0a2c067

Browse files
committed
feat: enhance the styles
1 parent 6704ede commit 0a2c067

File tree

9 files changed

+58
-48
lines changed

9 files changed

+58
-48
lines changed

components/Header.vue

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<NavLink
66
:link="$site.base"
77
class="home-link"
8-
>{{ $site.title }}</NavLink>
8+
>{{ $site.title }}
9+
</NavLink>
910
</div>
1011
<div class="header-right-wrap">
1112
<ul class="nav" v-if="$themeConfig.nav">
@@ -38,7 +39,6 @@
3839
box-sizing border-box
3940
// background lighten(#3eaf7c, 90%)
4041
background-color #FFF
41-
font-family Abel, sans-serif
4242
padding 20px 32px 20px
4343
margin auto
4444
border-bottom 1px solid rgba(0, 0, 0, 0.15)
@@ -70,11 +70,13 @@
7070
margin 0
7171
letter-spacing 2px
7272
display block
73-
font-weight 900
73+
font-family PT Serif, Serif
74+
7475
a
7576
color #000
77+
font-weight 500
7678
text-decoration none
77-
79+
7880
.header-right-wrap
7981
flex 1
8082
display flex
@@ -86,37 +88,43 @@
8688
margin 0
8789
align-items end
8890
91+
8992
.nav-item
9093
flex 1
9194
margin-left 20px
9295
9396
a
97+
font-family PT Serif, Serif
9498
font-size 20px
9599
// color lighten(#3eaf7c, 30%)
96100
text-decoration none
97101
transition color .3s
98-
102+
99103
.search-box
104+
font-family PT Serif, Serif
100105
margin-left 20px
101106
102107
input
103108
border-radius 5px
104109
transition all .5s
105110
border: 1px solid #000
111+
106112
&:hover
107113
border: 1px solid $accentColor
108114
box-shadow 0 0 5px $accentColor
109-
115+
110116
.suggestions
111117
border 1px solid #000
112118
top: 40px
113119
right 0
120+
114121
a
115122
color #000
116123
text-decoration none
124+
117125
&.focused
118126
color $accentColor
119-
127+
120128
@media (max-width: $MQMobile)
121129
.header-wrapper
122130
flex-direction column

components/Pagination.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
>
66
<router-link
77
class="prev"
8-
title="上一页"
8+
title="Previous Page"
99
v-if="pagination.hasPrev"
1010
:to="pagination.prevLink"
1111
>
12-
上一页
12+
Prev
1313
</router-link>
1414
<router-link
1515
class="next"
16-
title="下一页"
16+
title="Next Page"
1717
v-if="pagination.hasNext"
1818
:to="pagination.nextLink"
1919
>
20-
下一页
20+
Next
2121
</router-link>
2222
</div>
2323
</template>

global-components/BaseListLayout.vue

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
<template>
22
<div id="base-list-layout">
3-
<div class="ui-post" v-for="page in pages">
4-
<div class="ui-post-title">
5-
<NavLink :link="page.path">{{ page.title }}</NavLink>
6-
</div>
7-
<div class="ui-post-summary">
8-
{{ page.frontmatter.summary || page.summary }}
9-
<!-- <Content :page-key="page.key" slot-key="intro"/>-->
10-
</div>
11-
<div class="ui-post-author" v-if="page.frontmatter.author">
12-
<NavigationIcon/>
13-
<span>{{ page.frontmatter.author }} in {{ page.frontmatter.location }}</span>
14-
</div>
15-
<div class="ui-post-date" v-if="page.frontmatter.date">
16-
<ClockIcon/>
17-
<span>{{ new Date(page.frontmatter.date.trim()).toDateString() }}</span>
3+
<div class="ui-posts">
4+
<div class="ui-post" v-for="page in pages">
5+
<div class="ui-post-title">
6+
<NavLink :link="page.path">{{ page.title }}</NavLink>
7+
</div>
8+
<div class="ui-post-summary">
9+
{{ page.frontmatter.summary || page.summary }}
10+
<!-- <Content :page-key="page.key" slot-key="intro"/>-->
11+
</div>
12+
<div class="ui-post-author" v-if="page.frontmatter.author">
13+
<NavigationIcon/>
14+
<span>{{ page.frontmatter.author }} in {{ page.frontmatter.location }}</span>
15+
</div>
16+
<div class="ui-post-date" v-if="page.frontmatter.date">
17+
<ClockIcon/>
18+
<span>{{ new Date(page.frontmatter.date.trim()).toDateString() }}</span>
19+
</div>
1820
</div>
1921
</div>
2022

@@ -44,29 +46,36 @@
4446
padding-bottom 80px
4547
4648
.ui-post
47-
margin-bottom 50px
48-
49+
padding-bottom 25px
50+
margin-bottom 25px
51+
border-bottom 1px solid #f1f1f1
52+
&:last-child
53+
border-bottom 0px
54+
margin-bottom 0px
55+
4956
p
5057
margin 0
5158
5259
.ui-post-title
53-
font-weight bold
54-
font-size 24px
60+
font-family PT Serif, Serif
61+
font-size 28px
5562
border-bottom 0
5663
5764
a
5865
cursor pointer
5966
color #000
6067
transition all .2s
68+
font-weight bold
6169
text-decoration none
6270
6371
&:hover
6472
text-decoration underline
6573
6674
.ui-post-summary
6775
font-size 14px
68-
margin-bottom 10px
76+
margin-bottom 15px
6977
color rgba(0, 0, 0, 0.54)
78+
font-weight 200
7079
7180
.ui-post-author
7281
display flex
@@ -75,6 +84,7 @@
7584
line-height 12px
7685
color rgba(0, 0, 0, 0.84)
7786
margin-bottom 3px
87+
font-weight 400
7888
7989
svg
8090
margin-right 5px
@@ -86,7 +96,8 @@
8696
align-items center
8797
font-size 12px
8898
color rgba(0, 0, 0, 0.54)
89-
99+
font-weight 200
100+
90101
svg
91102
margin-right 5px
92103
width 14px

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ module.exports = (themeConfig, ctx) => {
8181
*/
8282
if (themeConfig.summary) {
8383
config.extendPageData = function (pageCtx) {
84-
console.log('extendPageData', pageCtx.path)
8584
const strippedContent = pageCtx._strippedContent
8685
if (!strippedContent) {
8786
return

layouts/GlobalLayout.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<script>
1212
import GlobalLayout from '@app/components/GlobalLayout.vue'
1313
import Header from '@theme/components/Header.vue'
14-
import Footer from '@theme/components/Header.vue'
14+
import Footer from '@theme/components/Footer.vue'
1515
1616
export default {
1717
components: {
@@ -25,7 +25,8 @@
2525
<style lang="stylus">
2626
.content-wrapper
2727
padding-top 160px
28-
min-height calc(100vh - 80px - 60px)
28+
min-height calc(100vh - 80px - 60px - 160px)
2929
max-width 740px
3030
padding-left 20vw
31+
padding-bottom 80px
3132
</style>

layouts/Post.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
.vuepress-blog-theme-content
2020
font-size 16px
2121
letter-spacing 0px
22-
font-family PT Serif
22+
font-family PT Serif, Serif
2323
color #2c3e50
2424
position relative
2525
box-shadow: 0 10px 20px rgba(0,0,0,0.05), 0 6px 6px rgba(0,0,0,0.07);

layouts/Tags.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,3 @@
33
<BlogTags :tags="$tag.list"/>
44
</div>
55
</template>
6-
7-
<script>
8-
export default {
9-
created() {
10-
console.log(this.$tag.list)
11-
}
12-
}
13-
</script>
14-

styles/index.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,17 @@ strong
114114
font-weight 600
115115

116116
h1, h2, h3, h4, h5, h6
117-
font-family Abel, sans-serif
118117
font-weight 600
119118
line-height 1.25
119+
font-family PT Serif
120120

121121
{$contentClass}:not(.custom) > &
122122
margin-top (0.5rem - $navbarHeight)
123123
padding-top ($navbarHeight + 1rem)
124124
margin-bottom 0
125125

126126
&:first-child
127-
margin-top -1.5rem
127+
margin-top -4rem
128128
margin-bottom 1rem
129129

130130
+ p, + pre, + .custom-block

styles/palette.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$accentColor = lighten(#4a154b, 20%)
1+
$accentColor = lighten(#4a154b, 50%)
22
$textColor = #2c3e50
33
$borderColor = rgba(0,0,0,.05)
44
$codeBgColor = #000

0 commit comments

Comments
 (0)