]> git.ipfire.org Git - ipfire.org.git/commitdiff
remove sticky Navbar on feature page and add scroll to
authorSven <sven.hoehn@posteo.de>
Thu, 5 Oct 2017 08:13:29 +0000 (10:13 +0200)
committerSven <sven.hoehn@posteo.de>
Thu, 5 Oct 2017 08:13:29 +0000 (10:13 +0200)
static/css/style.css
templates/static/features.html

index 4ac2968c2116b023b464e09ab2f795d8023187d5..3f46af34efed17459561bf45864ceaeb4b78f33d 100644 (file)
@@ -4692,11 +4692,9 @@ h5.fireinfo {
   #sidebar ul {
     list-style: none; }
     #sidebar ul.features_nav {
-      padding: 0 0 24px 0;
-      max-height: calc(100vh - 96px);
-      overflow-x: auto; }
+      padding: 0 0 24px 0; }
     #sidebar ul ul {
-      margin: 24px 0 0 0;
+      margin: 0;
       padding-left: 0; }
       #sidebar ul ul li:last-child {
         margin-bottom: 0; }
@@ -4713,9 +4711,6 @@ h5.fireinfo {
           color: #b71c1c;
           border-left: 2px solid #b71c1c;
           padding: 0 8px 0 6px; }
-  #sidebar ul.features_nav.fixed {
-    position: fixed;
-    top: 120px; }
 
 .btn-red900 {
   color: #fff !important;
index 5469b6ac529fd8ddfc3818d112fdff51b03395f0..091c41fde50c52f479af1d8211a5012d7ef9d983 100644 (file)
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
 <script>
        $(document).ready(function () {
-               $(window).scroll(function () {
-               if ($(document).scrollTop() > 40) {
-                   $("#sidebar ul.features_nav").addClass("fixed");
-               } else {
-                   $("#sidebar ul.features_nav").removeClass("fixed");
-               }
-           });
-           
                $('body').scrollspy({ target: '#sidebar', offset: 148 })
+               
+               $('a[href^="#"]').on('click', function(event) {
+               var target = $(this.getAttribute('href'));
+               if( target.length ) {
+                       event.preventDefault();
+                       $('html, body').stop().animate({
+                               scrollTop: target.offset().top -150
+                       }, 750);
+               }
+       });
        });
 </script>
 {% end block %}
\ No newline at end of file