mirror of
https://github.com/MeiK2333/github-style.git
synced 2025-10-07 10:04:04 +00:00
添加移动端适配
This commit is contained in:
14
README.md
14
README.md
@@ -138,6 +138,20 @@ pygmentsUseClasses = true
|
|||||||
userStatusEmoji = "😀"
|
userStatusEmoji = "😀"
|
||||||
favicon = "/images/github.png"
|
favicon = "/images/github.png"
|
||||||
location = "China"
|
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]]
|
[[params.links]]
|
||||||
title = "Link"
|
title = "Link"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{{ if .Site.Params.enableGitalk }}
|
{{ if .Site.Params.enableGitalk }}
|
||||||
<div id="gitalk-container" style="margin:0 auto;width: 600px;height: auto"></div>
|
<div id="gitalk-container" class="gitalk-container"></div>
|
||||||
<link rel="stylesheet" href="/css/gitalk.css">
|
<link rel="stylesheet" href='{{ "css/gitalk.css" | absURL }}'>
|
||||||
<script src="/js/gitalk.min.js"></script>
|
<script src='{{ "js/gitalk.min.js" | absURL }}'></script>
|
||||||
<script>
|
<script>
|
||||||
const gitalk = new Gitalk({
|
const gitalk = new Gitalk({
|
||||||
clientID: '{{ .Site.Params.Gitalk.clientID }}',
|
clientID: '{{ .Site.Params.Gitalk.clientID }}',
|
||||||
@@ -9,16 +9,11 @@
|
|||||||
repo: '{{ .Site.Params.Gitalk.repo }}',
|
repo: '{{ .Site.Params.Gitalk.repo }}',
|
||||||
owner: '{{ .Site.Params.Gitalk.owner }}',
|
owner: '{{ .Site.Params.Gitalk.owner }}',
|
||||||
admin: ['{{ .Site.Params.Gitalk.owner }}'],
|
admin: ['{{ .Site.Params.Gitalk.owner }}'],
|
||||||
proxy: '{{ .Site.Params.gitalk.proxy }}',
|
id: eval({{ .Site.Params.Gitalk.id }}), // Ensure uniqueness and length less than 50
|
||||||
id: location.pathname, // Ensure uniqueness and length less than 50
|
|
||||||
distractionFreeMode: false // Facebook-like distraction free mode
|
distractionFreeMode: false // Facebook-like distraction free mode
|
||||||
});
|
});
|
||||||
(function() {
|
(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');
|
gitalk.render('gitalk-container');
|
||||||
})();
|
})();
|
||||||
</script>
|
</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