1. fix bugs of gitalk #9

2. fix bugs of valine
This commit is contained in:
hwy0127@gmail.com
2019-06-28 01:24:57 +08:00
Unverified
parent 6656cb8c6f
commit d49414a039
5 changed files with 16 additions and 19 deletions

View File

@@ -11,5 +11,3 @@ if theme.disqus.enable
s.src = "https://" + '!{theme.disqus.shortname}' +".disqus.com/embed.js"; s.src = "https://" + '!{theme.disqus.shortname}' +".disqus.com/embed.js";
s.setAttribute('data-timestamp', '' + +new Date()); s.setAttribute('data-timestamp', '' + +new Date());
(d.head || d.body).appendChild(s); (d.head || d.body).appendChild(s);
if theme.disqus.count
script#dsq-count-scr(src="https://" + theme.disqus.shortname + ".disqus.com/count.js" async)

View File

@@ -1,13 +1,13 @@
if theme.gitment && theme.gitment.enable if theme.gitalk && theme.gitalk.enable
#gitment-container #gitalk-container
script. 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)), id: md5(decodeURI(location.pathname)),
owner: '!{theme.gitment.owner}', language: '!{lang}'
repo: '!{theme.gitment.repo}',
oauth: {
client_id: '!{theme.gitment.client_id}',
client_secret: '!{theme.gitment.client_secret}'
}
}) })
gitment.render('gitment-container') gitalk.render('gitalk-container')

View File

@@ -2,6 +2,7 @@ if theme.gitment && theme.gitment.enable
#gitment-container #gitment-container
script. script.
var gitment = new Gitment({ var gitment = new Gitment({
id: md5(decodeURI(location.pathname)),
owner: '!{theme.gitment.owner}', owner: '!{theme.gitment.owner}',
repo: '!{theme.gitment.repo}', repo: '!{theme.gitment.repo}',
oauth: { oauth: {

View File

@@ -1,7 +1,6 @@
if theme.valine && theme.valine.enable if theme.valine && theme.valine.enable
#vcomment.vcomment #vcomment.vcomment
script(src='https://cdn.jsdelivr.net/npm/leancloud-storage/dist/av-min.js') script(src='https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js')
script(src='https://cdn.jsdelivr.net/npm/valine@v1.3.6/dist/Valine.min.js')
script. script.
var notify = '#{ theme.valine.notify }' == true ? true : false; var notify = '#{ theme.valine.notify }' == true ? true : false;
var verify = '#{ theme.valine.verify }' == true ? true : false; var verify = '#{ theme.valine.verify }' == true ? true : false;

View File

@@ -149,6 +149,8 @@ table
// valine // valine
#vcomment #vcomment
font-size: inherit
input input
font-size: 0.65rem font-size: 0.65rem
@@ -166,9 +168,6 @@ table
.info .info
display: none display: none
.vcomment
margin-top: 20px
.vimg .vimg
border: 0 border: 0