Replace heading elements of panel with span.

Fix the heading levels audit.
This commit is contained in:
Cotes Chung 2020-10-27 05:14:33 +08:00
parent 5741aa4e18
commit 57a4bfdb82
4 changed files with 22 additions and 20 deletions

View file

@ -17,9 +17,7 @@
{% if update_list.size > 0 %} {% if update_list.size > 0 %}
<div id="access-lastmod" class="post"> <div id="access-lastmod" class="post">
<h3 data-toc-skip> <span>{{- site.data.label.panel.lastmod -}}</span>
{{- site.data.label.panel.lastmod -}}
</h3>
<ul class="post-content pl-0 pb-1 ml-1 mt-2"> <ul class="post-content pl-0 pb-1 ml-1 mt-2">
{% for item in update_list %} {% for item in update_list %}
@ -44,15 +42,14 @@
{% if trending_tags.size > 0 %} {% if trending_tags.size > 0 %}
<div id="access-tags"> <div id="access-tags">
<h3 data-toc-skip> <span>{{- site.data.label.panel.trending_tags -}}</span>
{{- site.data.label.panel.trending_tags -}}
</h3>
<div class="d-flex flex-wrap mt-3 mb-1 mr-3"> <div class="d-flex flex-wrap mt-3 mb-1 mr-3">
{% for tag in trending_tags %} {% for tag in trending_tags %}
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %} {% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a> <a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -60,9 +57,9 @@
{% if page.layout == 'post' and site.toc and page.toc %} {% if page.layout == 'post' and site.toc and page.toc %}
<div id="toc-wrapper" class="pl-0 pr-4 mb-5"> <div id="toc-wrapper" class="pl-0 pr-4 mb-5">
<h3 data-toc-skip class="pl-3 pt-2 mb-2"> <span class="pl-3 pt-2 mb-2">
{{- site.data.label.panel.toc -}} {{- site.data.label.panel.toc -}}
</h3> </span>
<nav id="toc" data-toggle="toc"></nav> <nav id="toc" data-toggle="toc"></nav>
</div> </div>
{% endif %} {% endif %}

View file

@ -523,13 +523,8 @@ footer {
margin-bottom: 4rem; margin-bottom: 4rem;
} }
} }
h3 { span {
padding-top: .5rem; @include panel-label;
padding-bottom: .5rem;
margin-top: 0;
margin-bottom: 0;
letter-spacing: -0.02em;
@include label(inherit, 600);
} }
.post-content { .post-content {
font-size: .9rem; font-size: .9rem;

View file

@ -99,6 +99,17 @@
font-family: 'Roboto Condensed', 'Microsoft Yahei', sans-serif; font-family: 'Roboto Condensed', 'Microsoft Yahei', sans-serif;
} }
@mixin panel-label {
display: block;
line-height: 1.2;
padding-top: .5rem;
padding-bottom: .5rem;
margin-top: 0;
margin-bottom: 0;
letter-spacing: -0.02em;
@include label(inherit);
}
@mixin align-center { @mixin align-center {
position: relative; position: relative;
left: 50%; left: 50%;

View file

@ -132,7 +132,6 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
} }
#toc-wrapper { #toc-wrapper {
margin-top: 7rem;
border-left: 1px solid rgba(158, 158, 158, 0.17); border-left: 1px solid rgba(158, 158, 158, 0.17);
position: -webkit-sticky; position: -webkit-sticky;
position: sticky; position: sticky;
@ -142,8 +141,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
&.topbar-down { &.topbar-down {
top: 6rem; top: 6rem;
} }
>h3 { > span {
@include label(inherit, 600); @include panel-label;
} }
} }