forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Add back-to-top button (alshedivat#2433)
Fixes alshedivat#2425 PR alshedivat#2427 adds a back-to-top button, however the button overlaps with the footer when `footer_fixed: false` and [has inadequate spacing](alshedivat#2425 (comment)) with `footer_fixed: true` Changes in this PR: - Fix positioning of button on fixed and sticky footer layouts - Add option to disable back-to-top button by setting `back_to_top: false` in `_config.yml` - Add button transparency to avoid button blocking content view - Reduce size of button Demo - | Device | Fixed footer | Sticky footer | | :-----------: | :-------------: | :-----------: | | Mobile | ![fixed_footer_mobile](https://github.com/alshedivat/al-folio/assets/2447878/2e17be04-1fa7-40c5-b691-829e92055367) | ![sticky_footer_mobile](https://github.com/alshedivat/al-folio/assets/2447878/f5567e43-e6fe-442d-9a7f-99e0577e220b) | | Desktop | ![fixed_footer_desktop](https://github.com/alshedivat/al-folio/assets/2447878/fc755839-841a-4e6b-b249-2c75bc552ad8) | ![sticky_footer_desktop](https://github.com/alshedivat/al-folio/assets/2447878/ef9a4c99-ce4c-4ac3-8fbb-207af9be245a) | Miscellaneous change - Added personal website under `Academics` to `README.md`
- Loading branch information
1 parent
d5b89cb
commit 11b445b
Showing
5 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<script src="{{ '/assets/js/vanilla-back-to-top.min.js' | relative_url | bust_file_cache }}"></script> | ||
<script> | ||
addBackToTop(); | ||
{% if site.back_to_top %} | ||
addBackToTop(); | ||
{% endif %} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.