文章页显示评论数量

This commit is contained in:
Meekdai 2023-08-12 22:45:33 +08:00
parent eea7b19e92
commit 22b3ab924d

View File

@ -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'] }}"); document.getElementById("postBody").setAttribute("style","font-size:{{ blogBase['fontSize'] }}");
{%- endif %} {%- 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(){ function openComments(){
cm=document.getElementById("comments"); cm=document.getElementById("comments");
cmButton=document.getElementById("cmButton"); cmButton=document.getElementById("cmButton");