]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/templates/static/features.html
features: Fix scrollspy
[ipfire.org.git] / src / templates / static / features.html
index 92283cd23e66effcb363e829fa11526374d0dbb4..023bb46a47dad59853857c7b25d9dc2743a2ef3c 100644 (file)
@@ -6,8 +6,6 @@
        <div class="container">
                <div class="row">
                        <nav id="sidebar" class="col-12 col-md-3" role="dropdown">
-                               <input type="checkbox" id="menu">
-                               <label for="menu" onclick></label>
                                <ul class="nav flex-column features_nav">
                                        <li class="nav-item"><a class="nav-link active" href="#about">About IPFire</a></li>
                                        <li class="nav-item"><a class="nav-link" href="#security">Security</a></li>
@@ -37,7 +35,7 @@
                                </ul>
                        </nav>
 
-                       <section class="content col-12 col-md-9 features">
+                       <section class="content col-12 col-md-9">
                                <div class="card">
                                        <div class="card-body">
                                                <section id="about">
                </div>
        </div>
 
-       <script>
-               $(document).ready(function () {
-                       $('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 -147
-                                       }, 750);
-                               }
-                       });
-               });
-       </script>
-
        <!-- Gallery Lightbox -->
        <!-- Root element of PhotoSwipe. Must have class pswp. -->
        <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
                </symbol>
        </svg>
 {% end block %}
+
+{% block javascript %}
+       <script>
+               $(document).ready(function () {
+                       $("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 - 147
+                                       }, 750);
+                               }
+                       });
+               });
+       </script>
+{% end block %}