1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-06 02:52:41 +01:00

added scroll to top button

This commit is contained in:
kay.one 2013-06-24 22:47:56 -07:00
parent 25581c8051
commit 272cc93bd2
4 changed files with 97 additions and 45 deletions

View File

@ -1,103 +1,122 @@
@import "bootstrap/variables"; @import "bootstrap/variables";
@import "bootstrap/mixins"; @import "bootstrap/mixins";
@import "bootstrap/type"; @import "bootstrap/type";
@import "../shared/styles/clickable";
.progress { .progress {
width: 125px; width : 125px;
position: relative; position : relative;
margin-bottom: 2px; margin-bottom : 2px;
.progressbar-back-text { .progressbar-back-text {
position: absolute; position : absolute;
width: 100%; width : 100%;
height: 100%; height : 100%;
font-size: 12px; font-size : 12px;
text-align: center; text-align : center;
} }
.progressbar-front-text { .progressbar-front-text {
display: block; display : block;
width: 125px; width : 125px;
font-size: 12px; font-size : 12px;
text-align: center; text-align : center;
} }
.bar { .bar {
position: absolute; position : absolute;
overflow: hidden; overflow : hidden;
} }
} }
.backdrop .page { .backdrop .page {
background-color: transparent; background-color : transparent;
box-shadow: none; box-shadow : none;
} }
html { html {
overflow: -moz-scrollbars-vertical; overflow : -moz-scrollbars-vertical;
overflow-y: scroll; overflow-y : scroll;
} }
.input-append { .input-append {
.add-on { .add-on {
margin-left: 0; margin-left : 0;
} }
} }
.line &>[class^="icon-"], .line &>[class*=" icon-"] { .line &>[class^="icon-"], .line &>[class*=" icon-"] {
margin-top: 1em; margin-top : 1em;
height: 1em; height : 1em;
line-height: 1em; line-height : 1em;
} }
#localSeriesLookup { #localSeriesLookup {
width: 220px; width : 220px;
border: 0px; border : 0px;
background: rgb(75, 75, 75); background : rgb(75, 75, 75);
color: rgb(169, 169, 169); color : rgb(169, 169, 169);
padding: 4px; padding : 4px;
font-size: 13px; font-size : 13px;
} }
#notification-region { #notification-region {
pre { pre {
font-size: 12px; font-size : 12px;
} }
.alert { .alert {
margin: 10px; margin : 10px;
} }
i { i {
padding-right: 10px; padding-right : 10px;
} }
} }
.nz-loading { .nz-loading {
.text-center; .text-center;
font-size: 40px; font-size : 40px;
font-weight: 300; font-weight : 300;
padding: 30px; padding : 30px;
} }
.nz-spinner { .nz-spinner {
.text-center; .text-center;
font-size: 56px; font-size : 56px;
padding: 30px; padding : 30px;
} }
.page-toolbar { .page-toolbar {
margin-top: 10px; margin-top : 10px;
margin-bottom: 30px; margin-bottom : 30px;
} }
.page-container { .page-container {
min-height: 600px; min-height : 600px;
} }
button::-moz-focus-inner, a::-moz-focus-inner { button::-moz-focus-inner, a::-moz-focus-inner {
border: 0; border : 0;
} }
a:focus { a:focus {
outline: none; outline : none;
} }
.label, .badge { .label, .badge {
cursor: default; cursor : default;
}
#scroll-up {
&:hover {
text-decoration : none;
opacity : 0.4;
}
.clickable;
opacity : 0.2;
position : fixed;
bottom : 50px;
right : 50px;
display : none;
font-size : 56px;
color : white;
} }

View File

@ -64,6 +64,9 @@
<div id="modal-region"></div> <div id="modal-region"></div>
</div> </div>
</div> </div>
<a id="scroll-up" title="Back to the top!">
<i class="icon-circle-arrow-up"></i>
</a>
</div> </div>
<footer> <footer>
<div class="container"> <div class="container">

View File

@ -32,9 +32,16 @@ require.config({
[ [
'Instrumentation/ErrorHandler' 'Instrumentation/ErrorHandler'
], ],
exports: '$' exports: '$',
},
init: function () {
require(
[
'jQuery/ToTheTop'
]);
}
},
signalR: { signalR: {
deps: deps:

23
UI/jQuery/ToTheTop.js Normal file
View File

@ -0,0 +1,23 @@
'use strict';
define(
[
'bootstrap'
], function () {
$(document).ready(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('#scroll-up').fadeIn();
}
else {
$('#scroll-up').fadeOut();
}
});
$('#scroll-up').click(function () {
$("html, body").animate({ scrollTop: 0 }, 600);
return false;
});
});
});