File tree 1 file changed +34
-0
lines changed
doc/source/themes/nature_with_gtoc
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -61,3 +61,37 @@ <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
61
61
</ div >
62
62
</ div >
63
63
{%- endblock %}
64
+
65
+ {%- block footer %}
66
+ < style type ="text/css ">
67
+ .scrollToTop {
68
+ text-align : center;
69
+ font-weight : bold;
70
+ position : fixed;
71
+ bottom : 60px ;
72
+ right : 40px ;
73
+ display : none;
74
+ }
75
+ </ style >
76
+ < a href ="# " class ="scrollToTop "> Scroll To Top</ a >
77
+ < script type ="text/javascript ">
78
+ $ ( document ) . ready ( function ( ) {
79
+ //Check to see if the window is top if not then display button
80
+ $ ( window ) . scroll ( function ( ) {
81
+ if ( $ ( this ) . scrollTop ( ) > 200 ) {
82
+ $ ( '.scrollToTop' ) . fadeIn ( ) ;
83
+ } else {
84
+ $ ( '.scrollToTop' ) . fadeOut ( ) ;
85
+ }
86
+ } ) ;
87
+
88
+ //Click event to scroll to top
89
+ $ ( '.scrollToTop' ) . click ( function ( ) {
90
+ $ ( 'html, body' ) . animate ( {
91
+ scrollTop : 0
92
+ } , 500 ) ;
93
+ return false ;
94
+ } ) ;
95
+ } ) ;
96
+ </ script >
97
+ {% endblock %}
You can’t perform that action at this time.
0 commit comments