File tree Expand file tree Collapse file tree 3 files changed +29
-9
lines changed
Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 11{% assign t = site.data.locales[page.lang][page.lang] %}
2- < button id ="scrollToTopButton " title ="Go to top "> Scroll to Top</ button >
2+ < button id ="scrollToTopButton " title ="Go to top " aria-label ="Scroll to top ">
3+ < svg aria-hidden ="true " viewBox ="0 0 24 24 " focusable ="false ">
4+ < path d ="M12 4L5 11h4v9h6v-9h4z "> </ path >
5+ </ svg >
6+ </ button >
37< footer class ="bg-white border-top text-center pt-5 ">
48 < div class ="container-lg p-responsive mx-auto ">
59
Original file line number Diff line number Diff line change 44 bottom : 20px ;
55 right : 20px ;
66 z-index : 99 ;
7- font-size : 16px ;
8- background-color : #333 ;
9- color : #fff ;
10- border : none ;
7+ width : 44px ;
8+ height : 44px ;
9+ padding : 0 ;
10+ align-items : center ;
11+ justify-content : center ;
12+ background-color : #fff ;
13+ color : #6a737d ;
14+ border : 1px solid #d0d7de ;
1115 cursor : pointer ;
12- padding : 10px ;
13- border-radius : 4px ;
14- }
16+ border-radius : 50% ;
17+ box-shadow : 0 2px 6px rgba (27 , 31 , 35 , 0.12 );
18+ }
19+
20+ #scrollToTopButton :hover {
21+ background-color : #f6f8fa ;
22+ border-color : #afb8c1 ;
23+ }
24+
25+ #scrollToTopButton svg {
26+ width : 20px ;
27+ height : 26px ;
28+ display : block ;
29+ fill : #6a737d ;
30+ }
Original file line number Diff line number Diff line change 22window . addEventListener ( 'scroll' , function ( ) {
33 var scrollToTopButton = document . getElementById ( 'scrollToTopButton' ) ;
44 if ( window . scrollY > 300 ) {
5- scrollToTopButton . style . display = 'block ' ;
5+ scrollToTopButton . style . display = 'flex ' ;
66 } else {
77 scrollToTopButton . style . display = 'none' ;
88 }
You can’t perform that action at this time.
0 commit comments