File tree 4 files changed +43
-34
lines changed
4 files changed +43
-34
lines changed Original file line number Diff line number Diff line change 66
66
color : # 012970 ;
67
67
}
68
68
69
- /*--------------------------------------------------------------
70
- # Back to top button
71
- --------------------------------------------------------------*/
72
- .back-to-top {
73
- position : fixed;
74
- visibility : hidden;
75
- opacity : 0 ;
76
- right : 15px ;
77
- bottom : 15px ;
78
- z-index : 99999 ;
79
- background : # 4154f1 ;
80
- width : 40px ;
81
- height : 40px ;
82
- border-radius : 4px ;
83
- transition : all 0.4s ;
84
- }
85
-
86
- .back-to-top i {
87
- font-size : 24px ;
88
- color : # fff ;
89
- line-height : 0 ;
90
- }
91
-
92
- .back-to-top : hover {
93
- background : # 6776f4 ;
94
- color : # fff ;
95
- }
96
-
97
- .back-to-top .active {
98
- visibility : visible;
99
- opacity : 1 ;
100
- }
101
-
102
69
/*--------------------------------------------------------------
103
70
# Override some default Bootstrap stylings
104
71
--------------------------------------------------------------*/
@@ -1389,3 +1356,10 @@ h6 {
1389
1356
.filter-description-popover {
1390
1357
margin-left : 1rem ;
1391
1358
}
1359
+
1360
+ # btn-back-to-top {
1361
+ position : fixed;
1362
+ bottom : 20px ;
1363
+ right : 20px ;
1364
+ display : none;
1365
+ }
Original file line number Diff line number Diff line change
1
+ //Get the button
2
+ let mybutton = document . getElementById ( "btn-back-to-top" ) ;
3
+
4
+ // When the user scrolls down 20px from the top of the document, show the button
5
+ window . onscroll = function ( ) {
6
+ scrollFunction ( ) ;
7
+ } ;
8
+
9
+ function scrollFunction ( ) {
10
+ if (
11
+ document . body . scrollTop > 20 ||
12
+ document . documentElement . scrollTop > 20
13
+ ) {
14
+ mybutton . style . display = "block" ;
15
+ } else {
16
+ mybutton . style . display = "none" ;
17
+ }
18
+ }
19
+ // When the user clicks on the button, scroll to the top of the document
20
+ mybutton . addEventListener ( "click" , backToTop ) ;
21
+
22
+ function backToTop ( ) {
23
+ document . body . scrollTop = 0 ;
24
+ document . documentElement . scrollTop = 0 ;
25
+ }
Original file line number Diff line number Diff line change 146
146
</ div >
147
147
</ div >
148
148
149
+ < button
150
+ type ="button "
151
+ class ="btn btn-danger btn-floating btn-lg "
152
+ id ="btn-back-to-top "
153
+ >
154
+ < i class ="fas fa-arrow-up "> </ i >
155
+ </ button >
156
+
149
157
< footer class ="py-3 my-4 ">
150
158
< ul class ="nav justify-content-center border-bottom pb-3 mb-3 ">
151
159
< li class ="nav-item ">
177
185
< script src ="{% static 'floating-scrollbar/jquery.floatingscroll.min.js' %} "> </ script >
178
186
179
187
< script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/js/select2.min.js "
> </ script >
188
+
189
+ < script src ="{% static 'js/back_to_top.js' %} "> </ script >
180
190
</ body >
181
191
</ html >
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ <h2 class="accordion-header" id="flush-heading_id_signal_availability">
276
276
</ div >
277
277
< div class ="col-9 ">
278
278
< form methog ="GET " id ="orderByForm ">
279
- < div class ="row margin-bottom-1rem d-flex justify-content-end ">
279
+ < div class ="row d-flex justify-content-end ">
280
280
< div class ="col-6 ">
281
281
< div class ="input-group mb-3 d-flex justify-content-start ">
282
282
< span class ="pt-05 ">
You can’t perform that action at this time.
0 commit comments