File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 git config user.name "github-actions[bot]"
5050 git config user.email "github-actions[bot]@users.noreply.github.com"
5151 git add VERSION
52- git diff --staged --quiet || git commit -m "Bump version to ${{ steps.version.outputs.VERSION }} [skip ci] "
52+ git diff --staged --quiet || git commit -m "Bump version to ${{ steps.version.outputs.VERSION }}"
5353 git push
5454
5555 - name : Add version and build date to config
Original file line number Diff line number Diff line change 8181 </ article >
8282 </ main >
8383
84+ < button class ="back-to-top " id ="back-to-top " aria-label ="Back to top ">
85+ < svg xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round ">
86+ < polyline points ="18 15 12 9 6 15 "> </ polyline >
87+ </ svg >
88+ </ button >
89+
8490 < footer class ="footer ">
8591 < div class ="footer-container ">
8692 < p > {{ site.title }} © {{ 'now' | date: '%Y' }} < a href ="https://managed-code.com "> ManagedCode</ a > </ p >
9096 </ footer >
9197
9298 < script >
99+ // TOC navigation
93100 document . querySelectorAll ( '.toc a' ) . forEach ( link => {
94101 link . addEventListener ( 'click' , function ( e ) {
95102 e . preventDefault ( ) ;
103110 }
104111 } ) ;
105112 } ) ;
113+
114+ // Back to top
115+ const backToTop = document . getElementById ( 'back-to-top' ) ;
116+ window . addEventListener ( 'scroll' , ( ) => {
117+ if ( window . scrollY > 400 ) {
118+ backToTop . classList . add ( 'visible' ) ;
119+ } else {
120+ backToTop . classList . remove ( 'visible' ) ;
121+ }
122+ } ) ;
123+ backToTop . addEventListener ( 'click' , ( ) => {
124+ window . scrollTo ( { top : 0 , behavior : 'smooth' } ) ;
125+ } ) ;
106126 </ script >
107127</ body >
108128</ html >
Original file line number Diff line number Diff line change @@ -446,6 +446,43 @@ hr {
446446 text-decoration : underline;
447447}
448448
449+ /* Back to top button */
450+ .back-to-top {
451+ position : fixed;
452+ bottom : 32px ;
453+ right : 32px ;
454+ width : 44px ;
455+ height : 44px ;
456+ background : # 27232A ;
457+ color : white;
458+ border : none;
459+ border-radius : 50% ;
460+ cursor : pointer;
461+ display : flex;
462+ align-items : center;
463+ justify-content : center;
464+ opacity : 0 ;
465+ visibility : hidden;
466+ transition : all 0.3s ease;
467+ box-shadow : 0 2px 8px rgba (39 , 35 , 42 , 0.15 );
468+ z-index : 99 ;
469+ }
470+
471+ .back-to-top .visible {
472+ opacity : 1 ;
473+ visibility : visible;
474+ }
475+
476+ .back-to-top : hover {
477+ background : # 785D8F ;
478+ transform : translateY (-2px );
479+ }
480+
481+ .back-to-top svg {
482+ width : 18px ;
483+ height : 18px ;
484+ }
485+
449486/* Responsive */
450487@media (max-width : 768px ) {
451488 .nav {
You can’t perform that action at this time.
0 commit comments