mirror of
https://github.com/MeiK2333/github-style.git
synced 2025-10-07 01:54:06 +00:00
添加移动端适配
This commit is contained in:
14
README.md
14
README.md
@@ -138,6 +138,20 @@ pygmentsUseClasses = true
|
||||
userStatusEmoji = "😀"
|
||||
favicon = "/images/github.png"
|
||||
location = "China"
|
||||
enableGitalk = true
|
||||
|
||||
[params.gitalk]
|
||||
clientID = "Your client ID"
|
||||
clientSecret = "Your client secret"
|
||||
repo = "repo"
|
||||
owner = "MeiK2333"
|
||||
admin = "MeiK2333"
|
||||
id = "location.pathname"
|
||||
labels = "gitalk"
|
||||
perPage = 15
|
||||
pagerDirection = "last"
|
||||
createIssueManually = true
|
||||
distractionFreeMode = false
|
||||
|
||||
[[params.links]]
|
||||
title = "Link"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{{ if .Site.Params.enableGitalk }}
|
||||
<div id="gitalk-container" style="margin:0 auto;width: 600px;height: auto"></div>
|
||||
<link rel="stylesheet" href="/css/gitalk.css">
|
||||
<script src="/js/gitalk.min.js"></script>
|
||||
<div id="gitalk-container" class="gitalk-container"></div>
|
||||
<link rel="stylesheet" href='{{ "css/gitalk.css" | absURL }}'>
|
||||
<script src='{{ "js/gitalk.min.js" | absURL }}'></script>
|
||||
<script>
|
||||
const gitalk = new Gitalk({
|
||||
clientID: '{{ .Site.Params.Gitalk.clientID }}',
|
||||
@@ -9,16 +9,11 @@
|
||||
repo: '{{ .Site.Params.Gitalk.repo }}',
|
||||
owner: '{{ .Site.Params.Gitalk.owner }}',
|
||||
admin: ['{{ .Site.Params.Gitalk.owner }}'],
|
||||
proxy: '{{ .Site.Params.gitalk.proxy }}',
|
||||
id: location.pathname, // Ensure uniqueness and length less than 50
|
||||
id: eval({{ .Site.Params.Gitalk.id }}), // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false // Facebook-like distraction free mode
|
||||
});
|
||||
(function() {
|
||||
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
|
||||
document.getElementById('gitalk-container').innerHTML = 'Gitalk comments not available by default when the website is previewed locally.';
|
||||
return;
|
||||
}
|
||||
gitalk.render('gitalk-container');
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
File diff suppressed because it is too large
Load Diff
43357
static/js/gitalk.min.js
vendored
43357
static/js/gitalk.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user