Fixed position of back-to-top button on pages without sidebar

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2019-06-09 19:48:41 +02:00
parent 1591e404f4
commit 66232dcad9
2 changed files with 14 additions and 1 deletions

View File

@ -98,6 +98,19 @@
}
}
@media (max-width: 1300px - .02) {
#back-to-top.no-sidebar {
position: fixed;
right: 20px;
}
}
@media (min-width: 1300px) {
#back-to-top.no-sidebar {
margin-left: 102%;
}
}
$navbarHeight: 58px;
// sticky sidebar

View File

@ -38,7 +38,7 @@
{% endif %}
</div>
<button id="back-to-top"
class="btn btn-primary btn-lg"
class="btn btn-primary btn-lg{% if page.hidesidebar %} no-sidebar{% endif %}"
title="Click to return to the start of the page" data-toggle="tooltip" data-placement="left">
<span class="fas fa-chevron-up"></span>
</button>