Update tag.html

This commit is contained in:
Meekdai 2023-11-21 17:10:41 +08:00
parent c2cc3beb43
commit 224c59fc20

View File

@ -65,24 +65,7 @@ h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font-
{% block content %}
<div style="margin-bottom: 16px;">{{ blogBase['subTitle'] }}</div>
<nav class="SideNav border">
{% for num in postListJson -%}
<a class="SideNav-item d-flex flex-items-center flex-justify-between" href="{{ postListJson[num]['postUrl']|e }}">
<div class="d-flex flex-items-center">
<svg class="SideNav-icon octicon" style="witdh:16px;height:16px"><path class="svgTop{{ postListJson[num]['top'] }}" d=""></path>
</svg>
<span>{{ postListJson[num]['postTitle']|e }}</span>
</div>
<div class="listLabels">
{% if postListJson[num]['commentNum']>0 %}<span class="Label" style="background-color:{{ blogBase['commentLabelColor'] }}">{{ postListJson[num]['commentNum'] }}</span>{% endif %}
<span class="Label" style="background-color:{{ postListJson[num]['labelColor'] }}">{{ postListJson[num]['label'] }}</span>
<span class="Label" style="background-color:{{ postListJson[num]['dateLabelColor'] }}">{{ postListJson[num]['createdDate'] }}</span>
</div>
</a>
{%- endfor %}
</nav>
<nav class="SideNav border"></nav>
{% endblock %}
{% block script %}
@ -110,7 +93,7 @@ tag=window.location.hash.slice(1)
function showList(jsonData){
let SideNav=document.getElementsByClassName("SideNav")[0];
for(i in jsonData["postListJson"]){
if(jsonData["postListJson"][i]['label']==tag || tag==''){
let item=document.createElement("a");
item.setAttribute("class","SideNav-item d-flex flex-items-center flex-justify-between");
@ -130,7 +113,7 @@ function showList(jsonData){
let title=document.createElement("span");
title.setAttribute("class","listTitle");
title.innerHTML=jsonData["postListJson"][i]['title'];
title.innerHTML=jsonData["postListJson"][i]['postTitle'];
center.appendChild(svg);
center.appendChild(title);