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

View file

@ -516,20 +516,15 @@ footer {
&.topbar-down {
top: 6rem;
}
>div {
> div {
padding-left: 1rem;
border-left: 1px solid var(--main-border-color);
&:not(:last-child) {
margin-bottom: 4rem;
}
}
h3 {
padding-top: .5rem;
padding-bottom: .5rem;
margin-top: 0;
margin-bottom: 0;
letter-spacing: -0.02em;
@include label(inherit, 600);
span {
@include panel-label;
}
.post-content {
font-size: .9rem;

View file

@ -99,6 +99,17 @@
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 {
position: relative;
left: 50%;

View file

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