From b21b276061672d7ba9cbf21b80002d82ca29d0e5 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 14 Apr 2016 17:31:05 -0400 Subject: [PATCH] Slideshow jq separated, only called on front-page --- css/app.css | 2 -- functions.php | 7 ++++ js/app.js | 45 ------------------------- js/custom/pageSetup.js | 45 ------------------------- js/glmSlideshow/glmSlideshow.js | 42 +++++++++++++++++++++++ nggallery/gallery-glmphotos-light-3.php | 2 +- scss/_main.scss | 3 -- 7 files changed, 50 insertions(+), 96 deletions(-) create mode 100644 js/glmSlideshow/glmSlideshow.js diff --git a/css/app.css b/css/app.css index f9960a0..5d72d32 100644 --- a/css/app.css +++ b/css/app.css @@ -6580,7 +6580,6 @@ main.page-inside #content-wrapper #main-content h2 { font-size: 1.375rem; } } h2#block-title { - text-transform: uppercase; font-size: 1.5rem; } .blocks .block#block-1, .blocks .block#block-2, .blocks .block#block-3 { @@ -6598,7 +6597,6 @@ h2#block-title { height: auto; } .blocks .block:hover .block-text { font-size: 1.75rem; - text-transform: uppercase; letter-spacing: 0.05em; margin-top: 13px; color: #f5822a; diff --git a/functions.php b/functions.php index 6ca0f55..f47e725 100644 --- a/functions.php +++ b/functions.php @@ -76,6 +76,13 @@ function glm_site_scripts() true ); if(is_front_page()) { + wp_enqueue_script( + 'glm_foundation', + get_template_directory_uri() . '/js/glmSlideshow/glmSlideshow.js', + 'jquery', + '1.0', + true + ); } } diff --git a/js/app.js b/js/app.js index 9d2c8c9..065f131 100644 --- a/js/app.js +++ b/js/app.js @@ -62,49 +62,4 @@ $(document).ready(function () { $('#submit-button > td').attr("colspan",2); -// -// - $("#metaslider_14").nivoSlider({ - pauseOnHover:true, - effect: 'slideInLeft', - directionNavHide:true, - pauseTime: 7000, - afterLoad: function (){ -// $("#metaslider_11 .nivo-caption").fadeIn(); - $("#metaslider_14 .nivo-caption").addClass("open"); - - }, - beforeChange: function () { - $("#metaslider_14 .nivo-caption").removeClass("open"); - $("#metaslider_14 .nivo-caption").addClass("close"); - }, - afterChange: function () { - $("#metaslider_14 .nivo-caption").removeClass("close"); - $("#metaslider_14 .nivo-caption").addClass("open"); - - - } - }); - - - // remove this code before final push - $("#metaslider_11").nivoSlider({ - pauseOnHover:true, - directionNavHide:true, - effect: 'slideInLeft', - pauseTime: 7000, - afterLoad: function (){ -// $("#metaslider_11 .nivo-caption").fadeIn(); - $("#metaslider_11 .nivo-caption").addClass("open"); - - }, - beforeChange: function () { - $("#metaslider_11 .nivo-caption").removeClass("open"); - $("#metaslider_11 .nivo-caption").addClass("close"); - }, - afterChange: function () { - $("#metaslider_11 .nivo-caption").removeClass("close"); - $("#metaslider_11 .nivo-caption").addClass("open"); - } - }); }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 9ee4b65..42f9749 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -53,49 +53,4 @@ $(document).ready(function () { $('#submit-button > td').attr("colspan",2); -// -// - $("#metaslider_14").nivoSlider({ - pauseOnHover:true, - effect: 'slideInLeft', - directionNavHide:true, - pauseTime: 7000, - afterLoad: function (){ -// $("#metaslider_11 .nivo-caption").fadeIn(); - $("#metaslider_14 .nivo-caption").addClass("open"); - - }, - beforeChange: function () { - $("#metaslider_14 .nivo-caption").removeClass("open"); - $("#metaslider_14 .nivo-caption").addClass("close"); - }, - afterChange: function () { - $("#metaslider_14 .nivo-caption").removeClass("close"); - $("#metaslider_14 .nivo-caption").addClass("open"); - - - } - }); - - - // remove this code before final push - $("#metaslider_11").nivoSlider({ - pauseOnHover:true, - directionNavHide:true, - effect: 'slideInLeft', - pauseTime: 7000, - afterLoad: function (){ -// $("#metaslider_11 .nivo-caption").fadeIn(); - $("#metaslider_11 .nivo-caption").addClass("open"); - - }, - beforeChange: function () { - $("#metaslider_11 .nivo-caption").removeClass("open"); - $("#metaslider_11 .nivo-caption").addClass("close"); - }, - afterChange: function () { - $("#metaslider_11 .nivo-caption").removeClass("close"); - $("#metaslider_11 .nivo-caption").addClass("open"); - } - }); }); diff --git a/js/glmSlideshow/glmSlideshow.js b/js/glmSlideshow/glmSlideshow.js new file mode 100644 index 0000000..23e3028 --- /dev/null +++ b/js/glmSlideshow/glmSlideshow.js @@ -0,0 +1,42 @@ +$(document).foundation(); +$(document).ready(function () { + 'use strict'; + $("#metaslider_14").nivoSlider({ + pauseOnHover:true, + effect: 'slideInLeft', + directionNavHide:true, + pauseTime: 7000, + afterLoad: function (){ +// $("#metaslider_11 .nivo-caption").fadeIn(); + $("#metaslider_14 .nivo-caption").addClass("open"); + }, + beforeChange: function () { + $("#metaslider_14 .nivo-caption").removeClass("open"); + $("#metaslider_14 .nivo-caption").addClass("close"); + }, + afterChange: function () { + $("#metaslider_14 .nivo-caption").removeClass("close"); + $("#metaslider_14 .nivo-caption").addClass("open"); + } + }); + + // remove this code before final push + $("#metaslider_11").nivoSlider({ + pauseOnHover:true, + directionNavHide:true, + effect: 'slideInLeft', + pauseTime: 7000, + afterLoad: function (){ +// $("#metaslider_11 .nivo-caption").fadeIn(); + $("#metaslider_11 .nivo-caption").addClass("open"); + }, + beforeChange: function () { + $("#metaslider_11 .nivo-caption").removeClass("open"); + $("#metaslider_11 .nivo-caption").addClass("close"); + }, + afterChange: function () { + $("#metaslider_11 .nivo-caption").removeClass("close"); + $("#metaslider_11 .nivo-caption").addClass("open"); + } + }); +}); \ No newline at end of file diff --git a/nggallery/gallery-glmphotos-light-3.php b/nggallery/gallery-glmphotos-light-3.php index 408c538..a18f0ae 100644 --- a/nggallery/gallery-glmphotos-light-3.php +++ b/nggallery/gallery-glmphotos-light-3.php @@ -66,7 +66,7 @@ Follow variables are useable :
- VIEW PROFILE + VIEW
diff --git a/scss/_main.scss b/scss/_main.scss index 8c80b34..b6af2fd 100644 --- a/scss/_main.scss +++ b/scss/_main.scss @@ -78,8 +78,6 @@ main.page-inside { } } h2#block-title { - text-transform: uppercase; -// font-weight: normal; font-size: rem-calc(24); } .blocks { @@ -104,7 +102,6 @@ h2#block-title { &:hover { .block-text { font-size: rem-calc(28); - text-transform: uppercase; letter-spacing: 0.05em; margin-top: 13px; color: $orange; -- 2.17.1