From 41c769ab5c19da92ecba35d9accc4bc123029e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 23 May 2017 20:47:46 +0200 Subject: Remove the use of bootstrap-carousel The custom.js file was converted to not use jquery also. Once bootstrap is gone, we can remove jquery entirely. --- _build/themes/ninenines/layouts/index.html | 2 +- .../themes/ninenines/layouts/partials/footer.html | 1 - _build/themes/ninenines/static/js/custom.js | 99 ++++++++++++---------- 3 files changed, 56 insertions(+), 46 deletions(-) (limited to '_build/themes/ninenines') diff --git a/_build/themes/ninenines/layouts/index.html b/_build/themes/ninenines/layouts/index.html index 22ec32a7..49eff047 100644 --- a/_build/themes/ninenines/layouts/index.html +++ b/_build/themes/ninenines/layouts/index.html @@ -9,7 +9,7 @@ {{ $.Scratch.Set "projects" 0 }} {{ range $.Site.Data.projects }} - {{ .title }} + {{ .title }} {{ $.Scratch.Add "projects" 1 }} {{ end }} diff --git a/_build/themes/ninenines/layouts/partials/footer.html b/_build/themes/ninenines/layouts/partials/footer.html index 0b199856..4f0f6dee 100644 --- a/_build/themes/ninenines/layouts/partials/footer.html +++ b/_build/themes/ninenines/layouts/partials/footer.html @@ -19,7 +19,6 @@ - diff --git a/_build/themes/ninenines/static/js/custom.js b/_build/themes/ninenines/static/js/custom.js index 84936d37..7e674540 100644 --- a/_build/themes/ninenines/static/js/custom.js +++ b/_build/themes/ninenines/static/js/custom.js @@ -1,49 +1,60 @@ -var carousel = ""; -$(document).ready(function() {; - // Starting up carousel - carousel = $('.carousel').carousel({ - interval: 9999999999999 - }) - - // Rollover images - $(function() { - $('img[data-hover]').hover(function() { - $(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp'); - }).each(function() { - $('').attr('src', $(this).attr('data-hover')); - });; - }); - - // Slide selector - $(".navbar .nav li a").click(function() { - function clear_prods() { - $(".navbar .nav li").each(function(){ - $(this).removeClass("active"); - }); - } - carousel.unbind('slide'); - clear_prods(); - $(this).parent().addClass("active"); - carousel.carousel($(this).data()["slide"]); - carousel.carousel('stop'); - carousel.bind('slide', function() { - clear_prods(); - carousel.unbind('slide'); - }); - }); - - if ($("#docs h2").length == 0){ - $("#docs-nav").remove(); - }else{ - $("