remove: 刪除部分多餘的代碼

This commit is contained in:
Jerry
2021-01-17 19:17:34 +08:00
parent 1a0e279cdb
commit d33dc5551c
6 changed files with 9 additions and 22 deletions

View File

@@ -199,10 +199,9 @@ reward:
# Easily browse and edit blog source code online.
post_edit:
enable: false
# Link for view source
# url: https://github.com/user-name/repo-name/tree/branch-name/subdirectory-name/
# Link for fork & edit
# url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name/
# For example: https://github.com/jerryc127/butterfly.js.org/edit/main/source/
url:
# Related Articles
related_post:

View File

@@ -48,6 +48,3 @@ header#page-header(class=isHomeClass style=bg_img)
else
#page-site-info
h1#site-title=site_title
if theme.post_edit.enable
a.post-edit-link(href=post_edit(page.source) title=_p('post.edit'))
i.fa.fa-pen-nib

View File

@@ -1,7 +1,7 @@
#post-info
h1.post-title= page.title || _p('no_title')
if theme.post_edit.enable
a.post-edit-link(href=post_edit(page.source) title=_p('post.edit'))
a.post-edit-link(href=theme.post_edit.url + page.source title=_p('post.edit') target="_blank")
i.fa.fa-pen-nib
#post-meta

View File

@@ -1,6 +1,6 @@
{
"name": "hexo-theme-butterfly",
"version": "3.6.0-b4",
"version": "3.6.0-b5",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {

View File

@@ -70,9 +70,3 @@ hexo.extend.helper.register('injectHtml', function (data) {
}
return result
})
hexo.extend.helper.register('post_edit', function(src) {
const { post_edit } = this.theme;
if (!post_edit.enable) return '';
return post_edit.url + src
})

View File

@@ -84,9 +84,6 @@
+maxWidth768()
top: 7rem
.post-edit-link
padding-left: 0.3rem
// post
&.post-bg
height: 20rem
@@ -146,7 +143,7 @@
font-size: 1.72em
.post-edit-link
padding-left: 0.3rem
padding-left: .5rem
#post-meta
color: var(--light-grey)