diff --git a/Gmeek.py b/Gmeek.py index ee781e6..a9e75e4 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -72,7 +72,7 @@ class GMEEK(): os.mkdir(self.post_dir) def defaultConfig(self): - dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","themeMode":"manual","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssSplit":"sentence","exlink":{}} + dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","themeMode":"manual","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","indexScript":"","indexStyle":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssSplit":"sentence","exlink":{}} config=json.loads(open('config.json', 'r', encoding='utf-8').read()) self.blogBase={**dconfig,**config}.copy() self.blogBase["postListJson"]=json.loads('{}') diff --git a/templates/base.html b/templates/base.html index eb9b42d..c08a19b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -60,6 +60,5 @@ if(themeSettings[theme]){changeTheme(...themeSettings[theme]);} console.log("\n %c Gmeek {{ blogBase['GMEEK_VERSION'] }} https://github.com/Meekdai/Gmeek \n\n","padding:5px 0;background:#02d81d;color:#fff"); {% block script %}{% endblock %} -{{ blogBase['script'] }} diff --git a/templates/plist.html b/templates/plist.html index d607273..5847de0 100644 --- a/templates/plist.html +++ b/templates/plist.html @@ -34,6 +34,7 @@ .LabelTime{display:none;} } +{{ blogBase['indexStyle'] }} {% endblock %} {% block header %} @@ -140,4 +141,5 @@ document.getElementById("{{ key }}").setAttribute("d",value=IconList["{{ key }}" document.getElementById("{{ blogBase['singeListJson'][num]['postTitle'] }}").setAttribute("d",value=IconList["{{ blogBase['singeListJson'][num]['labels'][0] }}"]); {%- endfor %} +{{ blogBase['indexScript'] }} {% endblock %} diff --git a/templates/post.html b/templates/post.html index 6bd90d2..6676904 100644 --- a/templates/post.html +++ b/templates/post.html @@ -110,5 +110,5 @@ function iFrameLoading(){ } } - +{{ blogBase['script'] }} {% endblock %}