From aa44ed562fd241cce4e2a8683f860f490d6ca7a3 Mon Sep 17 00:00:00 2001 From: Sven Date: Wed, 27 Sep 2017 18:06:35 +0200 Subject: [PATCH] features page added spyscoll to navigation --- static/css/style.css | 40 +++++++++++++++++------ static/js/site-min.js | 2 +- static/js/site.js | 8 +---- static/scss/style.scss | 1 + templates/base.html | 9 +++--- templates/index.html | 14 ++++++-- templates/static/features.html | 59 ++++++++++++++++++++++------------ 7 files changed, 88 insertions(+), 45 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index ab4a7d7..4ac2968 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -4687,14 +4687,35 @@ h5.fireinfo { .navbar-nav .nav-link:hover:after { transform: scaleX(1); } } -#sidebar ul { - list-style: none; } - #sidebar ul ul { - margin: 24px 0 0 0; - padding-left: 0; } - #sidebar ul li { - padding: 0 16px; - margin-bottom: 24px; } +#sidebar { + padding: 0; } + #sidebar ul { + list-style: none; } + #sidebar ul.features_nav { + padding: 0 0 24px 0; + max-height: calc(100vh - 96px); + overflow-x: auto; } + #sidebar ul ul { + margin: 24px 0 0 0; + padding-left: 0; } + #sidebar ul ul li:last-child { + margin-bottom: 0; } + #sidebar ul li { + padding: 0 16px; + margin: 8px 0; } + #sidebar ul li a.nav-link { + padding: inherit; + color: #263238; + height: 32px; + padding: 0 8px; + line-height: 2; } + #sidebar ul li a.nav-link.active { + 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; @@ -4990,7 +5011,8 @@ section#appliances { background: white; border-radius: 4px; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.2); - padding: 40px 24px; } + padding: 40px 24px; + position: relative; } .divider { width: 128px; diff --git a/static/js/site-min.js b/static/js/site-min.js index c30c758..76078ae 100644 --- a/static/js/site-min.js +++ b/static/js/site-min.js @@ -1 +1 @@ -function getCookie(o){var e=document.cookie.match("\\b"+o+"=([^;]*)\\b");return e?e[1]:void 0}$(document).ready(function(){$("#scrollto").click(function(o){o.preventDefault(),$("body").animate({scrollTop:$("#features").offset().top-72},1e3)}),$(window).scroll(function(){$(document).scrollTop()>100?($(".fixed-top").addClass("scrolled"),$(".menu-text").addClass("hidden")):($(".fixed-top").removeClass("scrolled"),$(".menu-text").removeClass("hidden"))}),$(".navbar-toggler-left").click(function(){$("#navbarSupportedContent, #mask").addClass("open"),$(".scrolled").addClass("fadeout")}),$("#mask").click(function(){$("#navbarSupportedContent, #mask").removeClass("open"),$(".scrolled").removeClass("fadeout")})}),$.query=function(o){return new RegExp("[\\?&]"+o+"=([^&#]*)").exec(window.location.href)[1]||0},$("a.download-splash").click(function(o){o.preventDefault(),linkLocation=this.href,window.location="http://downloads.ipfire.org/download-splash?file="+linkLocation}),/.*download-splash.*/i.test(window.location.href)&&$("p.download-path").ready(function(){var o=!1,e=["http://downloads.ipfire.org/"],n=$.query("file");for(i in e)prefix=e[i],n.substring(0,prefix.length)==prefix&&(o=!0);o&&($("p.download-path").prepend($("",{href:encodeURI(n),text:n})),setTimeout(function(){window.location=n},"2000"))}),jQuery.postJSON=function(url,args,callback){args._xsrf=getCookie("_xsrf"),$.ajax({url:url,data:$.param(args),dataType:"text",type:"POST",success:function(response){callback(eval("("+response+")"))}})}; \ No newline at end of file +function getCookie(o){var e=document.cookie.match("\\b"+o+"=([^;]*)\\b");return e?e[1]:void 0}$(document).ready(function(){$(window).scroll(function(){$(document).scrollTop()>100?($(".fixed-top").addClass("scrolled"),$(".menu-text").addClass("hidden")):($(".fixed-top").removeClass("scrolled"),$(".menu-text").removeClass("hidden"))}),$(".navbar-toggler-left").click(function(){$("#navbarSupportedContent, #mask").addClass("open"),$(".scrolled").addClass("fadeout")}),$("#mask").click(function(){$("#navbarSupportedContent, #mask").removeClass("open"),$(".scrolled").removeClass("fadeout")})}),$.query=function(o){return new RegExp("[\\?&]"+o+"=([^&#]*)").exec(window.location.href)[1]||0},$("a.download-splash").click(function(o){o.preventDefault(),linkLocation=this.href,window.location="http://downloads.ipfire.org/download-splash?file="+linkLocation}),/.*download-splash.*/i.test(window.location.href)&&$("p.download-path").ready(function(){var o=!1,e=["http://downloads.ipfire.org/"],n=$.query("file");for(i in e)prefix=e[i],n.substring(0,prefix.length)==prefix&&(o=!0);o&&($("p.download-path").prepend($("",{href:encodeURI(n),text:n})),setTimeout(function(){window.location=n},"2000"))}),jQuery.postJSON=function(url,args,callback){args._xsrf=getCookie("_xsrf"),$.ajax({url:url,data:$.param(args),dataType:"text",type:"POST",success:function(response){callback(eval("("+response+")"))}})}; \ No newline at end of file diff --git a/static/js/site.js b/static/js/site.js index 93d0d12..b1dbd48 100644 --- a/static/js/site.js +++ b/static/js/site.js @@ -1,10 +1,4 @@ -$(document).ready(function () { - $("#scrollto").click(function(e) { - e.preventDefault(); - $('body').animate({ - scrollTop: $("#features").offset().top -72 - }, 1000); - }); +$(document).ready(function () { $(window).scroll(function () { if ($(document).scrollTop() > 100) { $(".fixed-top").addClass("scrolled"); diff --git a/static/scss/style.scss b/static/scss/style.scss index e31db2a..20bb379 100644 --- a/static/scss/style.scss +++ b/static/scss/style.scss @@ -268,6 +268,7 @@ section#appliances { border-radius: 4px; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.2); padding: 40px 24px; + position: relative; } } diff --git a/templates/base.html b/templates/base.html index 97d7f91..d80b324 100644 --- a/templates/base.html +++ b/templates/base.html @@ -21,10 +21,13 @@ {% end %} + + + - +
@@ -192,10 +195,6 @@
{% end block %} - - - -
-
- + @@ -330,4 +330,14 @@
+ {% end block %} diff --git a/templates/static/features.html b/templates/static/features.html index 0268caa..5469b6a 100644 --- a/templates/static/features.html +++ b/templates/static/features.html @@ -6,32 +6,32 @@
-{% end block %} + + + +{% end block %} \ No newline at end of file -- 2.39.2