From 9264a90174a075de0e2b1cc1724ad00691a09246 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 11 Feb 2016 11:05:30 -0500 Subject: [PATCH] changing style for list and grid views. changing duplicate ids --- css/app.css | 6 +++--- js/app.js | 28 +++++++++++++--------------- js/custom/upcp.js | 28 +++++++++++++--------------- scss/_body.scss | 4 ++-- scss/_structure.scss | 2 +- 5 files changed, 32 insertions(+), 36 deletions(-) diff --git a/css/app.css b/css/app.css index b23afcb..48660fe 100644 --- a/css/app.css +++ b/css/app.css @@ -6888,11 +6888,11 @@ body .shadow-wrapper { font-weight: 700; color: #515151; } -#tags { +.tags { margin-top: 20px; } - #tags#tags #tagsTitle { + .tags.tags .tagsTitle { margin-bottom: -25px; } - #tags#tags a { + .tags#tags a { font-size: 1rem; padding-left: 5px; } diff --git a/js/app.js b/js/app.js index efcde27..215957b 100644 --- a/js/app.js +++ b/js/app.js @@ -97,7 +97,8 @@ $(document).ready(function () { $(listView).css("display", "inherit"); $(categoriesGridView).css("display", "none"); $(categoriesListView).css("display", "none"); - $("#blog-side-info-wrapper").insertBefore(gridView); +// $("#blog-side-info-wrapper").insertBefore(gridView); +// $("#blog-side-info-wrapper").insertBefore(listView); } // navigate back to products page if on single product page @@ -182,21 +183,10 @@ $(document).ready(function () { // $(".product").show(); } }); -// toggle search bar -// $("#search-icon").click(function () { -// $(".searchform").animate({width: 'toggle'}, 1000); -// $("#search-icon").css("visibility", "hidden"); -// //$('.searchform').css("left", "3px"); -// $(".searchform input[type='text']").focus(); -// }); -// $(".searchform input[type='text']").blur(function () { -// $(".searchform").animate({width: 'toggle'}, 1000); -// // $('.searchform').css("right", "5px"); -// $("#search-icon").css("visibility", "visible"); -// }); + $("#page-title").append($("#productBreadcrumbs")); -// $("#blog-side-info-wrapper").insertBefore(categoriesGridView); -// $("#blog-side-info-wrapper").insertBefore(categoriesListView); +// $("#blog-side-info-wrapper").insertBefore(categoriesGridView); + $("#blog-side-info-wrapper").insertBefore(categoriesListView); $("#blog-side-info-wrapper").insertBefore(gridView); $("#blog-side-info-wrapper").insertBefore(listView); @@ -232,6 +222,8 @@ $(document).ready(function () { }); } } + + // auto expand related files tree view $.when( $(".hitarea").triggerHandler('click') ).done(function() { @@ -242,6 +234,7 @@ $(document).ready(function () { createCookieSubcat("subcat", "subcat"); }); + // remove features filter on subcategory page if($(".subcat").is(":visible")){ $("#blog-side-info-wrapper").css("display", "none"); } @@ -249,6 +242,7 @@ $(document).ready(function () { createCookieSubcat("subcat", "subcat"); }); + // remove extra content form the page bottom if ((window.location.href.indexOf("/?michsci_category") >= 0) || (window.location.href.indexOf("/?pagename") >= 0) ){ var $bottomText = $("#catelog-content").nextAll(); var $bottomText2 = $(categoriesGridView).nextAll(); @@ -265,4 +259,8 @@ $(document).ready(function () { } else { $("#productBreadcrumbs").insertBefore("#catTitleOutput"); } + // remove gallery link if gallery isnt present + if($("#glm_gallery").length === 0){ + $(".galleryLink").css("display","none"); + } }); \ No newline at end of file diff --git a/js/custom/upcp.js b/js/custom/upcp.js index 1e43164..f227ad1 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -77,7 +77,8 @@ $(document).ready(function () { $(listView).css("display", "inherit"); $(categoriesGridView).css("display", "none"); $(categoriesListView).css("display", "none"); - $("#blog-side-info-wrapper").insertBefore(gridView); +// $("#blog-side-info-wrapper").insertBefore(gridView); +// $("#blog-side-info-wrapper").insertBefore(listView); } // navigate back to products page if on single product page @@ -162,21 +163,10 @@ $(document).ready(function () { // $(".product").show(); } }); -// toggle search bar -// $("#search-icon").click(function () { -// $(".searchform").animate({width: 'toggle'}, 1000); -// $("#search-icon").css("visibility", "hidden"); -// //$('.searchform').css("left", "3px"); -// $(".searchform input[type='text']").focus(); -// }); -// $(".searchform input[type='text']").blur(function () { -// $(".searchform").animate({width: 'toggle'}, 1000); -// // $('.searchform').css("right", "5px"); -// $("#search-icon").css("visibility", "visible"); -// }); + $("#page-title").append($("#productBreadcrumbs")); -// $("#blog-side-info-wrapper").insertBefore(categoriesGridView); -// $("#blog-side-info-wrapper").insertBefore(categoriesListView); +// $("#blog-side-info-wrapper").insertBefore(categoriesGridView); + $("#blog-side-info-wrapper").insertBefore(categoriesListView); $("#blog-side-info-wrapper").insertBefore(gridView); $("#blog-side-info-wrapper").insertBefore(listView); @@ -212,6 +202,8 @@ $(document).ready(function () { }); } } + + // auto expand related files tree view $.when( $(".hitarea").triggerHandler('click') ).done(function() { @@ -222,6 +214,7 @@ $(document).ready(function () { createCookieSubcat("subcat", "subcat"); }); + // remove features filter on subcategory page if($(".subcat").is(":visible")){ $("#blog-side-info-wrapper").css("display", "none"); } @@ -229,6 +222,7 @@ $(document).ready(function () { createCookieSubcat("subcat", "subcat"); }); + // remove extra content form the page bottom if ((window.location.href.indexOf("/?michsci_category") >= 0) || (window.location.href.indexOf("/?pagename") >= 0) ){ var $bottomText = $("#catelog-content").nextAll(); var $bottomText2 = $(categoriesGridView).nextAll(); @@ -245,4 +239,8 @@ $(document).ready(function () { } else { $("#productBreadcrumbs").insertBefore("#catTitleOutput"); } + // remove gallery link if gallery isnt present + if($("#glm_gallery").length === 0){ + $(".galleryLink").css("display","none"); + } }); \ No newline at end of file diff --git a/scss/_body.scss b/scss/_body.scss index 5df4f21..1dd84cd 100644 --- a/scss/_body.scss +++ b/scss/_body.scss @@ -183,9 +183,9 @@ body { font-weight: 700; color: rgb(81, 81, 81); } -#tags{ +.tags{ margin-top: 20px; - &#tags #tagsTitle{ + &.tags .tagsTitle{ margin-bottom: -25px; } diff --git a/scss/_structure.scss b/scss/_structure.scss index f963467..1ecea8d 100644 --- a/scss/_structure.scss +++ b/scss/_structure.scss @@ -12,7 +12,7 @@ } //6. Main //7. Slideshow -//8. Blog +//8. Blog //9. Sidebar //10. Links //11. Footer -- 2.17.1