Commit b81523e0 authored by Chi Bui's avatar Chi Bui 👀

edit

parent 4ba4cbdd
......@@ -375,7 +375,7 @@ padding: 20px 20px 14px !important;
.menu--category-menu .open ul.sidebar-submenu-2 li {
width: 251px !important;
padding: 10px 7px !important;
padding: 11px 7px !important;
/* height: 40px; */
display: flex;
align-items: center;
......@@ -402,8 +402,8 @@ padding: 20px 20px 14px !important;
}
.menu--category-menu .open ul.sidebar-submenu-2 {
padding: 10px 5px !important;
min-height: 456px;
padding: 9px 5px !important;
min-height: 458px;
margin: 0;
/* border-left: none; */
/* border-right: 2px solid #e94337; */
......@@ -420,8 +420,8 @@ padding: 20px 20px 14px !important;
display: flex;
flex-direction: column;
justify-content: flex-start;
top: 0;
left: 100%;
top: -2px;
left: 99%;
/* width: 73%; */
/* text-align: center; */
background: white !important;
......@@ -491,7 +491,7 @@ header.navbar .category-menu ul.menu ul.dropdown-menu li span {
.menu--category-menu .dropdown-toggle i {
font-size: 14px;
font-weight: 300;
top: 15px;
bottom: 10px;
position: absolute;
right: 15px;
}
......@@ -646,7 +646,30 @@ header.navbar .category-menu ul.menu ul.dropdown-menu li {
transition: max-height 0.2s ease-out;
box-shadow: none;
}
.menu--category-menu.product {
overflow:auto;
max-height: 729px;
}
.menu--category-menu.product .open ul.sidebar-submenu-2{
position: relative;
left: 0;
width: 100%;
min-height: auto;
padding: 2px !important;
/* padding-left: 10px !important; */
border: none;
}
.menu--category-menu.product .open ul.sidebar-submenu-2 li:nth-last-child(1){
border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.menu--category-menu.product .open ul.sidebar-submenu-2 li:nth-child(1){
border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.menu--category-menu.product .open ul.sidebar-submenu-2 li{
width: 100% !important;
padding-left: 20px !important;
}
@media (min-width: 768px) {
.webform-flex--container {
width: 91% !important
......@@ -1275,7 +1298,11 @@ header.navbar .block-search-navigation .search-icon {
font-size: 15px;
color: #000
}
.region-footer-fourth .block-views-blocklist-social-block-social .view-content .img-responsive {
width: 40px;
height: 40px;
margin-top: 10px;
}
/* invi 991 response */
@media (max-width: 991px) {
.region-middle-header .form-group{
......@@ -3907,8 +3934,8 @@ pre code {
.col-lg-12 {
position: relative;
min-height: 1px;
padding-right: 10px;
padding-left: 10px;
padding-right: 15px;
padding-left: 15px;
}
.col-xs-1,
......@@ -12661,9 +12688,11 @@ article.commerce-product.full .product-bottom .tab-content {
border: 1px solid #e2e2e2;
height: 427px;
}
#block-views-block-products-block-products h2 {
margin-top: 0;
}
article.commerce-product.teaser {
padding: 15px;
padding: 5px 0 5px;
}
.block-webform {
......
......@@ -16,6 +16,7 @@ for (i = 0; i < acc.length; i++) {
}
});
}
(function($, Drupal) {
// Xem thêm, ẩn bớt , menu
......@@ -57,60 +58,65 @@ for (i = 0; i < acc.length; i++) {
$(".menu.menu--category-menu.nav").addClass('not-home');
}
var current = location.pathname;
if(current == "/products"){
$(".menu.menu--category-menu.nav").removeClass('hide-block').removeClass('not-home').css({"top":"140px"});
}
if(current.length > 17){
let currentpathSlice = current.slice(0,17);
if(currentpathSlice == "/product_category"){
$(".menu.menu--category-menu.nav").removeClass('hide-block').removeClass('not-home').css({"top":"125px"});;
function menuSidebar(){
console.log('cccc')
var current = location.pathname;
if(current == "/products"){
$(".menu.menu--category-menu.nav").removeClass('hide-block').removeClass('not-home').css({"top":"140px"}).addClass('product');
}
}
// console.log($(".sidebar-submenu-3").children('li'));
$(".region-middle-bottom-header input").attr("placeholder", "Tìm kiếm");
if ($(window).width() > 991) {
var submenu3 = $(".sidebar-submenu-3");
if (submenu3.length > 0) {
for (let i = 0; i < submenu3.length; i++) {
if ($(".sidebar-submenu-3").eq(i).children('li').length > 10) {
$(".sidebar-submenu-3").eq(i).addClass('ul-flex');
$(".sidebar-submenu-3").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-3").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-3").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
}
else if(current.length > 17){
let currentpathSlice = current.slice(0,17);
if(currentpathSlice == "/product_category"){
$(".menu.menu--category-menu.nav").removeClass('hide-block').removeClass('not-home').css({"top":"125px"}).addClass('product');
}
} else {
var submenu2 = $(".sidebar-submenu-2");
for (let i = 0; i < submenu2.length; i++) {
if ($(".sidebar-submenu-2").eq(i).children('li').length > 10) {
$(".sidebar-submenu-2").eq(i).addClass('ul-flex');
$(".sidebar-submenu-2").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-2").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-2").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
}
else{
$(".region-middle-bottom-header input").attr("placeholder", "Tìm kiếm");
if ($(window).width() > 991) {
var submenu3 = $(".sidebar-submenu-3");
if (submenu3.length > 0) {
for (let i = 0; i < submenu3.length; i++) {
if ($(".sidebar-submenu-3").eq(i).children('li').length > 10) {
$(".sidebar-submenu-3").eq(i).addClass('ul-flex');
$(".sidebar-submenu-3").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-3").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-3").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
}
}
} else {
var submenu2 = $(".sidebar-submenu-2");
for (let i = 0; i < submenu2.length; i++) {
if ($(".sidebar-submenu-2").eq(i).children('li').length > 10) {
$(".sidebar-submenu-2").eq(i).addClass('ul-flex');
$(".sidebar-submenu-2").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-2").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
$(".sidebar-submenu-2").eq(i).children('li').slice(0, 10).wrapAll("<ul></ul>");
}
}
}
$(".dropdown-toggle").mouseover(function() {
$(this).parent("li.expanded.dropdown").addClass("open");
})
$(".dropdown-menu").mouseover(function() {
$(this).parent("li.expanded.dropdown").addClass("open");
})
$(".dropdown-menu").mouseleave(function() {
$(this).parent("li.expanded.dropdown").removeClass("open");
})
$(".dropdown-toggle").mouseleave(function() {
$(this).parent("li.expanded.dropdown").removeClass("open");
})
}
}
$(".dropdown-toggle").mouseover(function() {
$(this).parent("li.expanded.dropdown").addClass("open");
})
$(".dropdown-menu").mouseover(function() {
$(this).parent("li.expanded.dropdown").addClass("open");
})
$(".dropdown-menu").mouseleave(function() {
$(this).parent("li.expanded.dropdown").removeClass("open");
})
$(".dropdown-toggle").mouseleave(function() {
$(this).parent("li.expanded.dropdown").removeClass("open");
})
}
menuSidebar();
// console.log($(".sidebar-submenu-3").children('li'));
if ($(window).width() <= 991) {
$(".view-manufacturer-list .view-content").children().slice(0, 5).wrapAll("<div class = 'menu-wrap'></div>");
$(".view-manufacturer-list .view-content").children().slice(1, 6).wrapAll("<div class = 'menu-wrap'></div>");
......@@ -169,3 +175,4 @@ for (i = 0; i < acc.length; i++) {
$(".mobile-modal").hide();
})
})(window.jQuery, window.Drupal);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment