Skip to content

Commit

Permalink
fix: style of back-to-top
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Dec 31, 2019
1 parent b81d551 commit e5bda3a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
18 changes: 12 additions & 6 deletions assets/scss/_common/back-to-top.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
.back-to-top {
font-size: 90%;
color: var(--color-contrast-medium);
position: fixed;
right: 1em;
right: 0;
z-index: 1;
a {
display: block;
padding: 1em;
color: var(--color-contrast-medium);
&:hover {
color: var(--color-primary);
}
}
}

@if ($enableBackToTopAutoHide) {
.back-to-top {
bottom: -2em;
bottom: -5em;
transition: bottom 0.3s ease-in-out;
&.show {
bottom: 1em;
bottom: 0;
}
}
} @else {
.back-to-top {
bottom: 1em;
bottom: 0;
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"css/meme.min.fab06b4f1edf8acfa72af56b03bef62f13de7a260e3750467664d4b093b1126f.css","MediaType":"text/css","Data":{"Integrity":"sha256-+rBrTx7fis+nKvVrA772LxPeeiYON1BGdmTUsJOxEm8="}}
{"Target":"css/meme.min.399b3631d811af4afc515f7a55ad88d8ff211fdfbde992e5d2cdfd21683a82e8.css","MediaType":"text/css","Data":{"Integrity":"sha256-OZs2MdgRr0r8UV96Va2I2P8hH9+96ZLl0s39IWg6gug="}}
4 changes: 3 additions & 1 deletion layouts/partials/back-to-top.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ if or (and .IsHome .Site.Params.displayBackToTopInHome) (and (not .IsHome) .Site.Params.enableBackToTop) }}
<a href="#" id="back-to-top" class="back-to-top">{{ index .Site.Data.SVG .Site.Params.backToTopIcon | safeHTML }}</a>
<div id="back-to-top" class="back-to-top">
<a href="#">{{ index .Site.Data.SVG .Site.Params.backToTopIcon | safeHTML }}</a>
</div>
{{ end }}

0 comments on commit e5bda3a

Please sign in to comment.