2019-02-07 16:26:17 +08:00
|
|
|
|
<template lang="pug">
|
|
|
|
|
#leftcontent
|
|
|
|
|
#wrap
|
|
|
|
|
#leftMain
|
|
|
|
|
h1.title
|
2020-05-10 19:41:39 +08:00
|
|
|
|
nuxt-link(to='/') 轶哥
|
2019-02-07 16:26:17 +08:00
|
|
|
|
.widget.avatar
|
|
|
|
|
.widgetTitle
|
|
|
|
|
label 关于作者
|
2019-07-07 20:53:45 +08:00
|
|
|
|
img(src='https://data.sercretcore.cn/new_avatar.jpeg')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
p.aboutMe
|
|
|
|
|
| 妄图改变世界的全栈程序员。
|
|
|
|
|
.social
|
|
|
|
|
ul
|
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(
|
|
|
|
|
href='https://github.com/yi-ge',
|
|
|
|
|
target='_blank',
|
|
|
|
|
rel='external nofollow'
|
|
|
|
|
)
|
|
|
|
|
Icon(:icon='["fab", "github"]')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
Icon(:icon='["fab", "qq"]', @click='info("qq")')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
Icon(:icon='["fab", "weixin"]', @click='info("weixin")')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(
|
|
|
|
|
href='http://weibo.com/syxj',
|
|
|
|
|
target='_blank',
|
|
|
|
|
rel='external nofollow'
|
|
|
|
|
)
|
|
|
|
|
Icon(:icon='["fab", "weibo"]')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
Icon(:icon='["fas", "envelope"]', @click='info("email")')
|
2020-06-10 21:25:02 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(
|
|
|
|
|
href='https://www.wyr.me/rss.xml',
|
|
|
|
|
target='_blank',
|
|
|
|
|
rel='external nofollow'
|
|
|
|
|
)
|
|
|
|
|
Icon(:icon='["fas", "rss"]')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
.social-info-box(v-if='socialInfo')
|
|
|
|
|
| {{ socialInfo }}
|
|
|
|
|
#navication.widget.navication
|
|
|
|
|
.widgetTitle
|
|
|
|
|
label 导航
|
|
|
|
|
ul
|
|
|
|
|
li
|
|
|
|
|
nuxt-link(to='/') 主页
|
2020-08-31 12:04:07 +08:00
|
|
|
|
li(
|
|
|
|
|
v-for='(categorys, index) in $store.state.categorys',
|
|
|
|
|
:key='index',
|
|
|
|
|
v-show='categorys.name !== \'未分类\''
|
|
|
|
|
)
|
|
|
|
|
nuxt-link(:to='"/" + categorys.slug') {{ categorys.name }}
|
2019-06-01 19:56:59 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(:href='"https://driver.wyr.me/"', target='_blank') MAC N卡驱动更新提示
|
2019-02-07 16:26:17 +08:00
|
|
|
|
.search-box
|
2020-08-31 12:04:07 +08:00
|
|
|
|
input.search(
|
|
|
|
|
type='text',
|
|
|
|
|
placeholder='搜索',
|
|
|
|
|
v-model='searchVal',
|
|
|
|
|
@keyup.enter='search'
|
|
|
|
|
)
|
|
|
|
|
Icon(:icon='["fas", "search"]', @click='search')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
.widget.comment
|
|
|
|
|
.widgetTitle
|
|
|
|
|
label 最新评论
|
|
|
|
|
ul
|
2020-08-31 12:04:07 +08:00
|
|
|
|
li(
|
|
|
|
|
v-for='(newComment, index) in $store.state.newComments',
|
|
|
|
|
:key='index'
|
|
|
|
|
)
|
2019-02-07 16:26:17 +08:00
|
|
|
|
strong {{ newComment.comment_author }}:
|
|
|
|
|
span
|
2020-08-31 12:04:07 +08:00
|
|
|
|
nuxt-link(
|
|
|
|
|
:to='"/post/" + newComment.post.ID + "#comments"',
|
|
|
|
|
v-html='newComment.comment_content_html'
|
|
|
|
|
)
|
2019-02-07 16:26:17 +08:00
|
|
|
|
.meta
|
|
|
|
|
span
|
2020-08-31 12:04:07 +08:00
|
|
|
|
Icon(:icon='["far", "clock"]')
|
2019-02-07 16:26:17 +08:00
|
|
|
|
| {{ newComment.comment_date }}
|
|
|
|
|
span
|
|
|
|
|
| —
|
2020-08-31 12:04:07 +08:00
|
|
|
|
nuxt-link(:to='"/post/" + newComment.post.ID') {{ newComment.post.post_title }}
|
2019-02-07 16:26:17 +08:00
|
|
|
|
.widget.posts
|
|
|
|
|
.widgetTitle
|
|
|
|
|
label 热门文章
|
|
|
|
|
ul
|
2020-08-31 12:04:07 +08:00
|
|
|
|
li(
|
|
|
|
|
v-for='(hotArticle, index) in $store.state.hotArticle',
|
|
|
|
|
:key='index'
|
|
|
|
|
)
|
|
|
|
|
.thumbnail(
|
|
|
|
|
v-if='hotArticle && hotArticle.postimages && hotArticle.postimages[0]'
|
|
|
|
|
)
|
|
|
|
|
img(
|
|
|
|
|
width='150',
|
|
|
|
|
:src='hotArticle.postimages[0].guid + "?x-oss-process=image/resize,m_lfit,h_150,w_150"'
|
|
|
|
|
)
|
|
|
|
|
.detail(
|
|
|
|
|
:style='hotArticle && hotArticle.postimages && hotArticle.postimages[0] ? "margin-left: 70px" : "margin-left: 0"'
|
|
|
|
|
)
|
|
|
|
|
nuxt-link(
|
|
|
|
|
:to='"/post/" + hotArticle.ID',
|
|
|
|
|
:title='hotArticle.post_title'
|
|
|
|
|
) {{ hotArticle.post_title }}
|
2019-02-07 16:26:17 +08:00
|
|
|
|
.meta {{ hotArticle.post_modified }}
|
2020-08-31 12:04:07 +08:00
|
|
|
|
.widget.links(v-if='$route.path === "/"')
|
2019-06-30 12:46:50 +08:00
|
|
|
|
.widgetTitle
|
|
|
|
|
label 友情链接
|
|
|
|
|
.links
|
2020-05-10 20:41:04 +08:00
|
|
|
|
ul
|
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(href='https://wintc.top/', target='_blank') 沐码小站
|
2020-05-10 20:41:04 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(href='https://johnsonlee.site/', target='_blank') Johnson Blog
|
2020-05-18 00:46:12 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(href='https://www.lzhpo.com/', target='_blank') 会打篮球的程序猿
|
2020-05-15 13:20:34 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(href='https://www.lfhacks.com/', target='_blank') LFhacks
|
2020-05-31 18:54:06 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(href='https://www.ixiqin.com/', target='_blank') 西秦公子
|
2020-05-10 20:41:43 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(href='https://8code.net/', target='_blank') 前端视角
|
2020-05-17 16:28:21 +08:00
|
|
|
|
li
|
2020-08-31 12:04:07 +08:00
|
|
|
|
a(href='http://www.zzfly.net/', target='_blank') 烟花易冷
|
2019-02-07 16:26:17 +08:00
|
|
|
|
#tags.widget.tags
|
|
|
|
|
.widgetTitle
|
|
|
|
|
label 标签
|
|
|
|
|
.tagcloud
|
2020-08-31 12:04:07 +08:00
|
|
|
|
nuxt-link(
|
|
|
|
|
:to='"/tag/" + tag.slug',
|
|
|
|
|
:title='tag.name',
|
|
|
|
|
v-for='tag in $store.state.tags',
|
|
|
|
|
:key='tag.term_id'
|
|
|
|
|
) {{ tag.name }}
|
2019-02-07 16:26:17 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
2019-12-13 11:46:15 +08:00
|
|
|
|
data () {
|
2019-02-07 16:26:17 +08:00
|
|
|
|
return {
|
|
|
|
|
socialInfo: false,
|
|
|
|
|
searchVal: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2019-12-13 11:46:15 +08:00
|
|
|
|
info (type) {
|
2019-02-07 16:26:17 +08:00
|
|
|
|
if (type === 'qq') {
|
|
|
|
|
this.socialInfo = 'QQ: 373226722'
|
|
|
|
|
} else if (type === 'weixin') {
|
|
|
|
|
this.socialInfo = '微信: wy373226722'
|
|
|
|
|
} else if (type === 'email') {
|
|
|
|
|
this.socialInfo = 'Email: a@wyr.me'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.socialInfo = false
|
|
|
|
|
}, 3000)
|
|
|
|
|
},
|
2019-12-13 11:46:15 +08:00
|
|
|
|
search () {
|
2020-07-17 00:02:48 +08:00
|
|
|
|
if (this.searchVal !== '') { this.$router.push({ path: '/search?q=' + this.searchVal }) }
|
2019-02-07 16:26:17 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|