Prev/next post pagination: hide title on small devices, when there's not enough space

This commit is contained in:
roneo.org 2022-09-23 19:15:49 +02:00
parent 3a0a4811cb
commit a4262fb255
2 changed files with 12 additions and 2 deletions

View File

@ -391,6 +391,16 @@ h6:hover .anchor {
text-align: left; text-align: left;
} }
.paginav .name {
display: none;
}
@media screen and (min-width: 540px) {
.paginav .name {
display: block;
}
}
h1>a>svg { h1>a>svg {
display: inline; display: inline;
} }

View File

@ -5,14 +5,14 @@
<a class="prev" href="{{ .Permalink }}"> <a class="prev" href="{{ .Permalink }}">
<span class="title">« {{ i18n "prev_page" }}</span> <span class="title">« {{ i18n "prev_page" }}</span>
<br> <br>
<span>{{- .Name -}}</span> <span class="name">{{- .Name -}}</span>
</a> </a>
{{- end }} {{- end }}
{{- with $pages.Prev . }} {{- with $pages.Prev . }}
<a class="next" href="{{ .Permalink }}"> <a class="next" href="{{ .Permalink }}">
<span class="title">{{ i18n "next_page" }} »</span> <span class="title">{{ i18n "next_page" }} »</span>
<br> <br>
<span>{{- .Name -}}</span> <span class="name">{{- .Name -}}</span>
</a> </a>
{{- end }} {{- end }}
</nav> </nav>