tesscodes: (Default)
tesscodes: (Default)

Back-to-Top Buttons for (almost) any layout!

tesscodes: (Default)

Customizable Back-to-Top Button



Information

Hey guys! Like my controlstrip add-ons, this layout addition will work in most S1 Generator/S2 Complete layout, and gives you full control of styling, colors, and sizes, so no matter what your aesthetic, you'll be able to adapt this to match your layout in no time at all! Enjoy! ♥

S1 Generator: Add the CSS to your layout's existing CSS, then copy and past the HTML under your custom custom coding (sidebars, topbars, whatever it is your layout has!) This should ideally be done in four spots in your Generator layout, if you have custom coding viewable on all four of your page types.

S2 Complete Style: Add the CSS to your layout's existing CSS, then copy and past the HTML into your custom text box. If you experience odd spacing issues, run the HTML all onto a single line, as custom text boxes in S2 do not allow for raw HTML and will render manual line breaks. If you are not using a layout that has a sidebar enabled, you can use the sticky note, but be aware that the button will not show up on about half of your pageviews.

Positioning: Usually you'll only want one vertical and one horizontal position set unless turning the button or panel into a full height or full width navigation strip type deal. I've set this up so that you can easily change the positioning on the fly; all you need to do is set the positions you aren't using to auto.

Single Button: CSS



Single Button: HTML

<a class="top" href="#">keyboard_arrow_up</a>

Multi-Button Panel: CSS



Multi-Button Panel: HTML

Default links are back-to-top and refresh. Add as many links as you need; go to the Material Icons search to find icons for your buttons, then use the name of that icon for your link text for an instant icon!
<span class="panel">
	<a href="">refresh</a> <!-- leave blank to refresh the page -->
	<a href="#">keyboard_arrow_up</a> <!-- leave # to jump to top -->
</span>

Terms of Use

♡ Do not remove credit.
♡ Do not redistribute my codes in part or in whole (posting a copy for players to use in your game is fine with a link to original post.)
♡ If you break something during editing, please feel free to drop me a comment and I'll help as best I can!
♡ I love seeing edits! This isn't a rule, but if you have a cool edit of one of my codes I'd love to see it!

Comments

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting