Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
ptd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quan Nguyen
ptd
Commits
b81523e0
Commit
b81523e0
authored
Aug 20, 2020
by
Chi Bui
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
4ba4cbdd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
59 deletions
+95
-59
styles.css
themes/contrib/estore/css/styles.css
+40
-11
custom.js
themes/contrib/estore/js/custom.js
+55
-48
No files found.
themes/contrib/estore/css/styles.css
View file @
b81523e0
...
...
@@ -375,7 +375,7 @@ padding: 20px 20px 14px !important;
.menu--category-menu
.open
ul
.sidebar-submenu-2
li
{
width
:
251px
!important
;
padding
:
1
0
px
7px
!important
;
padding
:
1
1
px
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
:
10
px
5px
!important
;
min-height
:
45
6
px
;
padding
:
9
px
5px
!important
;
min-height
:
45
8
px
;
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
:
15
px
;
bottom
:
10
px
;
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
:
1
0
px
;
padding-left
:
1
0
px
;
padding-right
:
1
5
px
;
padding-left
:
1
5
px
;
}
.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
:
1
5px
;
padding
:
5px
0
5px
;
}
.block-webform
{
...
...
themes/contrib/estore/js/custom.js
View file @
b81523e0
...
...
@@ -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
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment