From 22b3ab924da7dc966a5d67eb56601a6a65550f60 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Sat, 12 Aug 2023 22:45:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E9=A1=B5=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/post.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/post.html b/templates/post.html index 5d39153..64d9568 100644 --- a/templates/post.html +++ b/templates/post.html @@ -60,6 +60,14 @@ h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font- document.getElementById("postBody").setAttribute("style","font-size:{{ blogBase['fontSize'] }}"); {%- endif %} +{% if blogBase['commentNum']>0 -%} + cmButton=document.getElementById("cmButton"); + span=document.createElement("span"); + span.setAttribute("class","Counter"); + span.innerHTML="{{ blogBase['commentNum'] }}"; + cmButton.appendChild(span); +{%- endif %} + function openComments(){ cm=document.getElementById("comments"); cmButton=document.getElementById("cmButton");