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");