showPostSource来配置是否显示github源链接
This commit is contained in:
parent
0d65cfba26
commit
47a33a939f
2
Gmeek.py
2
Gmeek.py
@ -61,7 +61,7 @@ class GMEEK():
|
||||
os.mkdir(self.post_dir)
|
||||
|
||||
def defaultConfig(self):
|
||||
dconfig={"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","bottomText":""}
|
||||
dconfig={"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","bottomText":"","showPostSource":1}
|
||||
config=json.loads(open('config.json', 'r', encoding='utf-8').read())
|
||||
self.blogBase={**dconfig,**config}.copy()
|
||||
self.blogBase["postListJson"]=json.loads('{}')
|
||||
|
||||
@ -27,18 +27,20 @@
|
||||
{% block header %}
|
||||
<h1 class="postTitle">{{ blogBase['postTitle'] }}</h1>
|
||||
<div class="title-right">
|
||||
|
||||
|
||||
<a href="{{ blogBase['homeUrl'] }}"><button id="buttonHome" class="btn btn-invisible circle" title="{{ i18n['home'] }}">
|
||||
<svg class="octicon" width="16" height="16">
|
||||
<path id="pathHome" fill-rule="evenodd" d="{{ IconList['home'] }}"></path>
|
||||
</svg>
|
||||
</button></a>
|
||||
|
||||
{% if blogBase['showPostSource']==1 %}
|
||||
<a href="{{ blogBase['postSourceUrl'] }}" target="_blank"><button class="btn btn-invisible circle" title="Issue">
|
||||
<svg class="octicon" width="16" height="16">
|
||||
<path id="pathIssue" fill-rule="evenodd" d="{{ IconList['github'] }}"></path>
|
||||
</svg>
|
||||
</button></a>
|
||||
{% endif %}
|
||||
|
||||
<button class="btn btn-invisible circle" onclick="modeSwitch();" title="{{ i18n['switchTheme'] }}">
|
||||
<svg class="octicon" width="16" height="16" >
|
||||
|
||||
Loading…
Reference in New Issue
Block a user