Fixed footer direction label being cut off

This commit is contained in:
squidfunk 2023-03-29 13:01:30 +02:00
parent 7c473e148b
commit f4d894d53b
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
8 changed files with 25 additions and 28 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.666dee5c.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.7a7fce14.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.a0c5b2b5.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.a0c5b2b5.min.css' | url }}">

View File

@ -15,10 +15,10 @@
{% include ".icons/material/arrow-left.svg" %} {% include ".icons/material/arrow-left.svg" %}
</div> </div>
<div class="md-footer__title"> <div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction"> <span class="md-footer__direction">
{{ direction }} {{ direction }}
</span> </span>
<div class="md-ellipsis">
{{ page.previous_page.title }} {{ page.previous_page.title }}
</div> </div>
</div> </div>
@ -28,10 +28,10 @@
{% set direction = lang.t("footer.next") %} {% set direction = lang.t("footer.next") %}
<a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next" aria-label="{{ direction }}: {{ page.next_page.title | e }}" rel="next"> <a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next" aria-label="{{ direction }}: {{ page.next_page.title | e }}" rel="next">
<div class="md-footer__title"> <div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction"> <span class="md-footer__direction">
{{ direction }} {{ direction }}
</span> </span>
<div class="md-ellipsis">
{{ page.next_page.title }} {{ page.next_page.title }}
</div> </div>
</div> </div>

View File

@ -54,8 +54,9 @@
// a tiny factor seems to get rid of the ellipsis and renders the text as // a tiny factor seems to get rid of the ellipsis and renders the text as
// it should - see https://bit.ly/2ZUCXQ8 // it should - see https://bit.ly/2ZUCXQ8
flex-grow: 0.01; flex-grow: 0.01;
padding-top: px2rem(28px); align-items: end;
padding-bottom: px2rem(8px); max-width: 100%;
margin-block: px2rem(20px) px2rem(8px);
overflow: hidden; overflow: hidden;
outline-color: var(--md-accent-fg-color); outline-color: var(--md-accent-fg-color);
transition: opacity 250ms; transition: opacity 250ms;
@ -70,12 +71,13 @@
transform: scaleX(-1); transform: scaleX(-1);
} }
// Footer link to previous page
&--prev {
// [mobile -]: Adjust width to 25/75 and hide title // [mobile -]: Adjust width to 25/75 and hide title
@include break-to-device(mobile) { @include break-to-device(mobile) {
// Footer link to previous page
&--prev {
flex-shrink: 0;
// Hide footer title // Hide footer title
.md-footer__title { .md-footer__title {
display: none; display: none;
@ -97,12 +99,11 @@
// Footer title // Footer title
&__title { &__title {
position: relative;
flex-grow: 1; flex-grow: 1;
max-width: calc(100% - #{px2rem(48px)}); max-width: calc(100% - #{px2rem(48px)});
padding: 0 px2rem(20px); padding: 0 px2rem(20px);
margin-bottom: px2rem(14px);
font-size: px2rem(18px); font-size: px2rem(18px);
line-height: px2rem(48px);
white-space: nowrap; white-space: nowrap;
} }
@ -114,10 +115,6 @@
// Footer link direction (i.e. prev and next) // Footer link direction (i.e. prev and next)
&__direction { &__direction {
position: absolute;
inset-inline: 0;
padding: 0 px2rem(20px);
margin-top: px2rem(-20px);
font-size: px2rem(12.8px); font-size: px2rem(12.8px);
opacity: 0.7; opacity: 0.7;
} }

View File

@ -48,10 +48,10 @@
{% include ".icons/material/arrow-left.svg" %} {% include ".icons/material/arrow-left.svg" %}
</div> </div>
<div class="md-footer__title"> <div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction"> <span class="md-footer__direction">
{{ direction }} {{ direction }}
</span> </span>
<div class="md-ellipsis">
{{ page.previous_page.title }} {{ page.previous_page.title }}
</div> </div>
</div> </div>
@ -68,10 +68,10 @@
rel="next" rel="next"
> >
<div class="md-footer__title"> <div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction"> <span class="md-footer__direction">
{{ direction }} {{ direction }}
</span> </span>
<div class="md-ellipsis">
{{ page.next_page.title }} {{ page.next_page.title }}
</div> </div>
</div> </div>