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
a98abdde
Commit
a98abdde
authored
May 07, 2020
by
Chi Bui
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit menu to 1 level
parent
a410a535
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
248 additions
and
12 deletions
+248
-12
fb.png
sites/default/files/inline-images/fb.png
+98
-0
zalo.png
sites/default/files/inline-images/zalo.png
+65
-0
settings.php
sites/default/settings.php
+7
-3
test.twig
themes/contrib/bootstrap/templates/menu/test.twig
+67
-0
styles.css
themes/contrib/estore/css/styles.css
+10
-7
custom.js
themes/contrib/estore/js/custom.js
+1
-2
No files found.
sites/default/files/inline-images/fb.png
0 → 100644
View file @
a98abdde
25.4 KB
sites/default/files/inline-images/zalo.png
0 → 100644
View file @
a98abdde
13.2 KB
sites/default/settings.php
View file @
a98abdde
...
@@ -767,9 +767,13 @@
...
@@ -767,9 +767,13 @@
include
$app_root
.
'/'
.
$site_path
.
'/settings.local.php'
;
include
$app_root
.
'/'
.
$site_path
.
'/settings.local.php'
;
}
}
$databases
[
'default'
][
'default'
]
=
array
(
$databases
[
'default'
][
'default'
]
=
array
(
'database'
=>
'invi_ptd'
,
// 'database' => 'estore',
'username'
=>
'invi_dev'
,
// 'username' => 'root',
'password'
=>
'Invi@123456789a@A'
,
// 'password' => 'root',
'database'
=>
'invi_estorequ2'
,
'username'
=>
'user'
,
'password'
=>
'12345'
,
'prefix'
=>
''
,
'prefix'
=>
''
,
'host'
=>
'localhost'
,
'host'
=>
'localhost'
,
'port'
=>
'3306'
,
'port'
=>
'3306'
,
...
...
themes/contrib/bootstrap/templates/menu/test.twig
0 → 100644
View file @
a98abdde
{#
/**
* @file
* Default theme implementation to display a menu.
*
* Available variables:
* - classes: A list of classes to apply to the top level <ul> element.
* - dropdown_classes: A list of classes to apply to the dropdown <ul> element.
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
* - title: The menu link title.
* - url: The menu link url, instance of \Drupal\Core\Url
* - localized_options: Menu link localized options.
*
* @ingroup templates
*
* Define a custom macro that will render all menu trees.
*/
#}
{%
macro
menu_links
(
items
,
attributes
,
menu_level
,
classes
,
dropdown_classes
)
%}
{%
if
items
%}
{%
set
menu_classes
=
[
'sidebar__menu'
~
menu_name
|
clean_class
]
%}
{%
set
submenu_classes
=
[
'sidebar__menu'
~
menu_name
|
clean_class
~
'--submenu'
,
'sidebar__menu--submenu-'
~
(
menu_level
+
1
),]
%}
{%
if
menu_level
==
0
%}
<ul
{{
attributes.addClass
(
classes
)
}}
>
{%
else
%}
<ul
{{
attributes.removeClass
(
menu_classes
,
'sidebar__menu--submenu-'
~
(
menu_level
))
.
addClass
(
submenu_classes
,
classes
,
"dropdown-menu"
)
}}
>
{%
endif
%}
{%
for
item
in
items
%}
{%
set
item_classes
=
item.url.getOption
(
'container_attributes'
)
.
class
|
split
(
" "
)
%}
{%
set
item_classes
=
[
item.is_expanded
and
item.below
?
'expanded dropdown'
,
item.in_active_trail
?
'active active-trail'
,
loop.first
?
'first'
,
loop.last
?
'last'
,
]
%}
<li
{{
item.attributes.addClass
(
item_classes
)
}}
>
{%
set
link_title
=
item.title
%}
{%
set
link_attributes
=
item.link_attributes
%}
{%
if
menu_level
==
0
and
item.is_expanded
and
item.below
%}
{%
set
link_title
%}{{
link_title
}}
<i
class=
"fa fa-chevron-right"
aria-hidden=
"true"
></i>
{%
endset
%}
{%
set
link_attributes
=
link_attributes.addClass
(
'dropdown-toggle'
)
.
setAttribute
(
'data-toggle'
,
'dropdown'
)
%}
{%
endif
%}
{# Must use link() here so it triggers hook_link_alter(). #}
{{
link
(
link_title
,
item.url
,
link_attributes.addClass
(
item.in_active_trail
?
'active-trail'
))
}}
{%
if
item.below
%}
{{
_self.menu_links
(
item.below
,
attributes.removeClass
(
classes
),
menu_level
+
1
,
classes
,
dropdown_classes
)
}}
{%
endif
%}
</li>
{%
endfor
%}
</ul>
{%
endif
%}
{%
endmacro
%}
{#
Invoke the custom macro defined above. If classes were provided, use them.
This allows the template to be extended without having to also duplicate the
code above. @see http://twig.sensiolabs.org/doc/tags/macro.html
#}
{{
_self.menu_links
(
items
,
attributes
,
0
,
classes
?:
[
'menu'
,
'menu--'
~
menu_name
|
clean_class
,
'nav'
],
dropdown_classes
?:
[
'dropdown-menu'
])
}}
themes/contrib/estore/css/styles.css
View file @
a98abdde
...
@@ -22,24 +22,27 @@ body {
...
@@ -22,24 +22,27 @@ body {
/* invi custom */
/* invi custom */
header
.navbar
.category-menu
ul
.menu
ul
.dropdown-menu
li
:hover
{
header
.navbar
.category-menu
ul
.menu
ul
.dropdown-menu
li
:hover
{
background
:
white
;
background
:
white
;
margin-left
:
0
;
}
}
header
.navbar
.category-menu
ul
.menu
ul
.dropdown-menu
li
{
header
.navbar
.category-menu
ul
.menu
ul
.dropdown-menu
li
{
border
:
none
;
/* border: none; */
font-weight
:
200
!important
;
padding
:
5px
0px
;
}
}
.menu--category-menu
.open
.dropdown-menu
{
/* menu lv2 */
.menu--category-menu
.open
.dropdown-menu
{
/* menu lv2 */
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
column
;
justify-content
:
space-around
;
justify-content
:
flex-start
;
top
:
0
;
top
:
0
;
left
:
97%
;
left
:
97%
;
/* width:
100
%; */
/* width:
73
%; */
text-align
:
center
;
/* text-align: center; */
background
:
white
!important
;
background
:
white
!important
;
/* height: 169%; */
/* height: 169%; */
}
}
.menu--category-menu
.open
.dropdown-menu
li
{
.menu--category-menu
.open
.dropdown-menu
li
{
width
:
1
50px
;
width
:
1
00%
;
}
}
.menu--category-menu
.open
.dropdown-menu
li
a
{
.menu--category-menu
.open
.dropdown-menu
li
a
{
font-weight
:
600
;
font-weight
:
600
;
...
...
themes/contrib/estore/js/custom.js
View file @
a98abdde
...
@@ -59,8 +59,8 @@
...
@@ -59,8 +59,8 @@
}
}
// Custom menu
$
(
".dropdown-toggle"
).
mouseover
(
function
(){
$
(
".dropdown-toggle"
).
mouseover
(
function
(){
// $(this).parent("li.expanded.dropdown").click();
$
(
this
).
parent
(
"li.expanded.dropdown"
).
addClass
(
"open"
);
$
(
this
).
parent
(
"li.expanded.dropdown"
).
addClass
(
"open"
);
})
})
$
(
".dropdown-menu"
).
mouseover
(
function
(){
$
(
".dropdown-menu"
).
mouseover
(
function
(){
...
@@ -70,7 +70,6 @@
...
@@ -70,7 +70,6 @@
$
(
this
).
parent
(
"li.expanded.dropdown"
).
removeClass
(
"open"
);
$
(
this
).
parent
(
"li.expanded.dropdown"
).
removeClass
(
"open"
);
})
})
$
(
".dropdown-toggle"
).
mouseleave
(
function
(){
$
(
".dropdown-toggle"
).
mouseleave
(
function
(){
// $(this).parent("li.expanded.dropdown").click();
$
(
this
).
parent
(
"li.expanded.dropdown"
).
removeClass
(
"open"
);
$
(
this
).
parent
(
"li.expanded.dropdown"
).
removeClass
(
"open"
);
})
})
...
...
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