diff --git a/layouts/common.styl b/layouts/common.styl index 4b9614f..e7a3856 100644 --- a/layouts/common.styl +++ b/layouts/common.styl @@ -150,6 +150,7 @@ footer .footer height 100% width 295px float left + box-shadow 8px 0px 11px 0px #fff #rightContent margin-left 300px @@ -531,7 +532,7 @@ input:-moz-placeholder padding-top 6px cursor pointer - #leftBackgroundColor, #LeftMenu + #LeftMenu display none #rightContent diff --git a/layouts/default.vue b/layouts/default.vue index 311330a..9d90212 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -19,7 +19,7 @@ .page-container #LeftMenu(:style="'display: '+ showLeftMenuValue + ';' + isPhone") LeftContent - #rightContent(@click='showLeftMenu(false)') + #rightContent(@click='hiddenLeftMenu') nuxt Footer v-dialog @@ -61,12 +61,17 @@ export default { } }, methods: { - showLeftMenu (show) { - if (this.showLeftMenuValue === 'block' || show === false) { + showLeftMenu () { + if (this.showLeftMenuValue === 'block') { this.showLeftMenuValue = 'none' } else { this.showLeftMenuValue = 'block' } + }, + hiddenLeftMenu () { + if (document.body.clientWidth < 768) { + this.showLeftMenuValue = 'none' + } } } } diff --git a/pages/post/_id.vue b/pages/post/_id.vue index 644d1cb..acc32ac 100644 --- a/pages/post/_id.vue +++ b/pages/post/_id.vue @@ -54,12 +54,20 @@ .comment-avatar img(:src="'https://picsum.photos/100/100/?blur=1'") .comment-nickname 张三 - .comment-logout 退出 - .comment-btn 发布 + .comment-logout(@click="commentLogout") 退出 + .comment-btn(@click="commentCommit") 发布 .comment-reply-commit(id="comment-reply-commit", v-show="replyID") .login(v-show="!visitorToken", @click="login") img(src="https://cdn.wyr.me/imgs/GitHub-Login.png") #editor-reply + .comment-toolbar + .comment-no-userinfo(v-if="!visitorToken") 尚未登陆 + .comment-userinfo(v-else) + .comment-avatar + img(:src="'https://picsum.photos/100/100/?blur=1'") + .comment-nickname 张三 + .comment-logout(@click="commentLogout") 退出 + .comment-btn(@click="commentCommit") 发布 ins.adsbygoogle(style="display:block; text-align:center; margin-top:20px;", data-ad-layout="in-article", data-ad-format="fluid", data-ad-client="ca-pub-2143583075951360", data-ad-slot="4741804954") .articelRightToc(v-show="articels.post_toc_show && showRightToc", @click="articelRightTocClick") .articelTitle 目录 @@ -440,6 +448,13 @@ export default { }) } }, + commentCommit () { + + }, + commentLogout () { + window.localStorage.visitorToken = null + this.visitorToken = null + }, login () { window.open('https://github.com/login/oauth/authorize?client_id=ce1673a37333e47e482d&redirect_uri=https://www.wyr.me/auth', 'Github授权', 'scrollbars=yes,resizable=yes,status=no,location=yes,toolbar=no,menubar=no,width=800,height=600,left=0,top=0') }