From 4aa6d04d4b957bffcf96c163856eb73a3628ee28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=86=E7=93=9C=E4=BA=91?= Date: Mon, 14 Aug 2023 09:53:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E9=A1=B5=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [comment]: # (##{"style":“”}##) --- Gmeek.py | 8 ++++---- templates/post.html | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Gmeek.py b/Gmeek.py index c970953..5f4e1d2 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -103,7 +103,7 @@ class GMEEK(): postBase["startSite"]=self.blogBase["startSite"] postBase["i18n"]=self.blogBase["i18n"] postBase["commentNum"]=issue["commentNum"] - postBase["fontSize"]=issue["fontSize"] + postBase["style"]=issue["style"] postBase["script"]=issue["script"] postBase["top"]=issue["top"] postBase["repoName"]=options.repo_name @@ -189,10 +189,10 @@ class GMEEK(): self.blogBase["postListJson"][postNum]["createdAt"]=postConfig["timestamp"] else: self.blogBase["postListJson"][postNum]["createdAt"]=int(time.mktime(issue.created_at.timetuple())) - if "fontSize" in postConfig: - self.blogBase["postListJson"][postNum]["fontSize"]=str(postConfig["fontSize"]) + if "style" in postConfig: + self.blogBase["postListJson"][postNum]["style"]=str(postConfig["style"]) else: - self.blogBase["postListJson"][postNum]["fontSize"]="" + self.blogBase["postListJson"][postNum]["style"]="" if "script" in postConfig: self.blogBase["postListJson"][postNum]["script"]=str(postConfig["script"]) else: diff --git a/templates/post.html b/templates/post.html index f957a88..5db7289 100644 --- a/templates/post.html +++ b/templates/post.html @@ -17,6 +17,8 @@ h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font- .g-emoji{font-size:24px;} @media (max-width: 767px) {body {padding: 8px;}} +{{ blogBase['style'] }} + {% endblock %} {% block header %}

@@ -56,10 +58,6 @@ h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font- {% block script %}