Up
A Flarum extension. A back to top button.
- Minimal CSS
- Uses Font Awesome for up arrow
- Target
#Up
or .elevator-button
for any custom CSS
Optional:
Uses elevator.js and so if you know a little about this stuff, you can make it play music too. By default, the audio files and JavaScript needed for music to play are not included. If you want to try the audio feature you will need a couple audio files, and this code can be added to your custom footer:
<script>
window.onload = function() {
var elevator = new Elevator({
element: document.querySelector('.elevator-button'),
mainAudio: '/src/to/audio.mp3',
endAudio: '/src/to/end-audio.mp3'
});
}
</script>
Want it on the bottom left instead of the default bottom right?
.elevator-button { float: left; }
Installation
Install with composer:
composer require zerosonesfun/flarum-up:"*"
Updating
composer update zerosonesfun/flarum-up:"*"
php flarum migrate
php flarum cache:clear
Remove
composer remove zerosonesfun/flarum-up
Links