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)
|
os.mkdir(self.post_dir)
|
||||||
|
|
||||||
def defaultConfig(self):
|
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())
|
config=json.loads(open('config.json', 'r', encoding='utf-8').read())
|
||||||
self.blogBase={**dconfig,**config}.copy()
|
self.blogBase={**dconfig,**config}.copy()
|
||||||
self.blogBase["postListJson"]=json.loads('{}')
|
self.blogBase["postListJson"]=json.loads('{}')
|
||||||
|
|||||||
@ -34,11 +34,13 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button></a>
|
</button></a>
|
||||||
|
|
||||||
|
{% if blogBase['showPostSource']==1 %}
|
||||||
<a href="{{ blogBase['postSourceUrl'] }}" target="_blank"><button class="btn btn-invisible circle" title="Issue">
|
<a href="{{ blogBase['postSourceUrl'] }}" target="_blank"><button class="btn btn-invisible circle" title="Issue">
|
||||||
<svg class="octicon" width="16" height="16">
|
<svg class="octicon" width="16" height="16">
|
||||||
<path id="pathIssue" fill-rule="evenodd" d="{{ IconList['github'] }}"></path>
|
<path id="pathIssue" fill-rule="evenodd" d="{{ IconList['github'] }}"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button></a>
|
</button></a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<button class="btn btn-invisible circle" onclick="modeSwitch();" title="{{ i18n['switchTheme'] }}">
|
<button class="btn btn-invisible circle" onclick="modeSwitch();" title="{{ i18n['switchTheme'] }}">
|
||||||
<svg class="octicon" width="16" height="16" >
|
<svg class="octicon" width="16" height="16" >
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user