Pārlūkot izejas kodu

feat: remove back to top button

Limited use given the fixed navbar and ToC sidebar for Books
George Cushen 4 gadi atpakaļ
vecāks
revīzija
e8c96d1db9

+ 0 - 10
wowchemy/assets/js/wowchemy.js

@@ -694,16 +694,6 @@
       // window.addEventListener('hashchange', filter_publications, false);
     }
 
-    // Scroll to top of page.
-    $('.back-to-top').click(function (event) {
-      event.preventDefault();
-      $('html, body').animate({
-        'scrollTop': 0
-      }, 800, function () {
-        window.location.hash = "";
-      });
-    });
-
     // Load citation modal on 'Cite' click.
     $('.js-cite-modal').click(function (e) {
       e.preventDefault();

+ 1 - 4
wowchemy/assets/scss/wowchemy/_footer.scss

@@ -2,7 +2,6 @@
 
 footer {
   margin: 4rem 0 0;
-  padding: 2rem 0;
   width: 100%;
 }
 
@@ -15,14 +14,12 @@ footer .powered-by {
   font-size: 0.67rem;
 }
 
-.site-footer,
-footer a.back-to-top i {
+.site-footer {
   color: rgba(0,0,0,0.54);
 }
 
 // Dark footer theme
 .dark .site-footer,
-.dark footer a.back-to-top i,
 .dark .docs .body-footer {
   color: rgba(255,255,255,0.54);
 }

+ 0 - 10
wowchemy/layouts/partials/site_footer.html

@@ -27,15 +27,5 @@
     the free, <a href="https://github.com/wowchemy/wowchemy-hugo-modules" target="_blank" rel="noopener">
     open source</a> website builder that empowers creators.
     {{ end }}
-
-    {{ if not (in (slice "book" "docs" "updates") .Type) }}
-    <span class="float-right">
-      <a href="#" class="back-to-top" aria-label="Back to top">
-        <span class="button_icon">
-          <i class="fas fa-chevron-up fa-2x"></i>
-        </span>
-      </a>
-    </span>
-    {{ end }}
   </p>
 </footer>