Skip to content

Commit

Permalink
1. fix bugs of gitalk #9
Browse files Browse the repository at this point in the history
2. fix bugs of valine
  • Loading branch information
jerryc127 committed Jun 27, 2019
1 parent 6656cb8 commit d49414a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
4 changes: 1 addition & 3 deletions layout/includes/comments/disqus.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ if theme.disqus.enable
var d = document, s = d.createElement('script');
s.src = "https://" + '!{theme.disqus.shortname}' +".disqus.com/embed.js";
s.setAttribute('data-timestamp', '' + +new Date());
(d.head || d.body).appendChild(s);
if theme.disqus.count
script#dsq-count-scr(src="https://" + theme.disqus.shortname + ".disqus.com/count.js" async)
(d.head || d.body).appendChild(s);
20 changes: 10 additions & 10 deletions layout/includes/comments/gitalk.pug
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
if theme.gitment && theme.gitment.enable
#gitment-container
if theme.gitalk && theme.gitalk.enable
#gitalk-container
script.
var gitment = new Gitment({
var gitalk = new Gitalk({
clientID: '!{theme.gitalk.client_id}',
clientSecret: '!{theme.gitalk.client_secret}',
repo: '!{theme.gitalk.repo}',
owner: '!{theme.gitalk.owner}',
admin: '!{theme.gitalk.admin}',
id: md5(decodeURI(location.pathname)),
owner: '!{theme.gitment.owner}',
repo: '!{theme.gitment.repo}',
oauth: {
client_id: '!{theme.gitment.client_id}',
client_secret: '!{theme.gitment.client_secret}'
}
language: '!{lang}'
})
gitment.render('gitment-container')
gitalk.render('gitalk-container')
1 change: 1 addition & 0 deletions layout/includes/comments/gitment.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if theme.gitment && theme.gitment.enable
#gitment-container
script.
var gitment = new Gitment({
id: md5(decodeURI(location.pathname)),
owner: '!{theme.gitment.owner}',
repo: '!{theme.gitment.repo}',
oauth: {
Expand Down
3 changes: 1 addition & 2 deletions layout/includes/comments/valine.pug
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if theme.valine && theme.valine.enable
#vcomment.vcomment
script(src='https://cdn.jsdelivr.net/npm/leancloud-storage/dist/av-min.js')
script(src='https://cdn.jsdelivr.net/npm/[email protected]/dist/Valine.min.js')
script(src='https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js')
script.
var notify = '#{ theme.valine.notify }' == true ? true : false;
var verify = '#{ theme.valine.verify }' == true ? true : false;
Expand Down
7 changes: 3 additions & 4 deletions source/css/_global/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ table


// valine
#vcomment
#vcomment
font-size: inherit

input
font-size: 0.65rem

Expand All @@ -165,9 +167,6 @@ table

.info
display: none

.vcomment
margin-top: 20px

.vimg
border: 0
Expand Down

0 comments on commit d49414a

Please sign in to comment.