优化布局

This commit is contained in:
Meekdai 2023-11-22 09:43:03 +08:00
parent 595c1c8879
commit c9ad72dbe0
3 changed files with 9 additions and 10 deletions

View File

@ -15,9 +15,8 @@
</head>
<style>
body{box-sizing: border-box;min-width: 200px;max-width: 900px;margin: 20px auto;padding: 45px;font-size: 16px;font-family: sans-serif;line-height: 1.25;}
.avatar {transition: 0.8s;}
.avatar:hover {transform: scale(1.15) rotate(360deg);}
#header{display:flex;padding-bottom:8px;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted));margin-bottom: 16px;}
#content {width:100%;}
#footer {margin-top:64px; text-align: center;font-size: small;}
</style>

View File

@ -5,6 +5,8 @@
{% block style %}
<style>
.avatar {transition: 0.8s;}
.avatar:hover {transform: scale(1.15) rotate(360deg);}
h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font-size:40px;font-family:Monaco;}
.title-right{display:flex;margin:auto 0 0 auto;}
.title-right button{margin-right:8px;padding:16px;}
@ -24,7 +26,7 @@ h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font-
.subnav-search form{display:none;}
.subnav-search svg{display:none;}
#buttonRSS{display:none;}
.SideNav-item .listLabels{display:none;}
.LabelTime{display:none;}
}
</style>
{% endblock %}
@ -77,8 +79,8 @@ h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font-
</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'] }}"><object><a style="color:#fff" href="/tag.html#{{ postListJson[num]['label'] }}">{{ postListJson[num]['label'] }}</a></object></span>
<span class="Label" style="background-color:{{ postListJson[num]['dateLabelColor'] }}">{{ postListJson[num]['createdDate'] }}</span>
<span class="Label LabelName" style="background-color:{{ postListJson[num]['labelColor'] }}"><object><a style="color:#fff" href="/tag.html#{{ postListJson[num]['label'] }}">{{ postListJson[num]['label'] }}</a></object></span>
<span class="Label LabelTime" style="background-color:{{ postListJson[num]['dateLabelColor'] }}">{{ postListJson[num]['createdDate'] }}</span>
</div>
</a>
{%- endfor %}

View File

@ -19,9 +19,7 @@ h1 a:not([href]){color:inherit;text-decoration:none;vertical-align: bottom;font-
@media (max-width: 767px) {
body { padding: 8px;}
h1 a{font-size:24px;}
.SideNav-item .listLabels{display:none;}
.subTitle{display:none;}
.genTime{float: none;}
.LabelTime{display:none;}
}
</style>
{% endblock %}
@ -124,12 +122,12 @@ function showList(){
let listLabels=document.createElement("div");
listLabels.setAttribute("class","listLabels");
let LabelName=document.createElement("span");
LabelName.setAttribute("class","Label");
LabelName.setAttribute("class","Label LabelName");
LabelName.setAttribute("style","background-color:"+jsonData["postListJson"][i]['labelColor']);
LabelName.innerHTML=jsonData["postListJson"][i]['label'];
listLabels.appendChild(LabelName);
let LabelTime=document.createElement("span");
LabelTime.setAttribute("class","Label");
LabelTime.setAttribute("class","Label LabelTime");
LabelTime.setAttribute("style","background-color:"+jsonData["postListJson"][i]['dateLabelColor']);
LabelTime.innerHTML=jsonData["postListJson"][i]['createdDate'];
listLabels.appendChild(LabelTime);