Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
3ec7ffcb
Commit
3ec7ffcb
authored
Sep 19, 2022
by
lmf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.99.244.21:9999/root/joshine
parents
b7d64c51
f9e53aae
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
5 deletions
+107
-5
app/code/Magento/Theme/Block/Html/Topmenu.php
+79
-3
app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml
+1
-1
app/design/frontend/Joshine/breeze/web/css/_custom.less
+27
-1
No files found.
app/code/Magento/Theme/Block/Html/Topmenu.php
View file @
3ec7ffcb
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* See COPYING.txt for license details.
*/
*/
namespace
Magento\Theme\Block\Html
;
namespace
Magento\Theme\Block\Html
;
use
Magento\Backend\Model\Menu
;
use
Magento\Backend\Model\Menu
;
...
@@ -57,7 +58,8 @@ class Topmenu extends Template implements IdentityInterface
...
@@ -57,7 +58,8 @@ class Topmenu extends Template implements IdentityInterface
NodeFactory
$nodeFactory
,
NodeFactory
$nodeFactory
,
TreeFactory
$treeFactory
,
TreeFactory
$treeFactory
,
array
$data
=
[]
array
$data
=
[]
)
{
)
{
parent
::
__construct
(
$context
,
$data
);
parent
::
__construct
(
$context
,
$data
);
$this
->
nodeFactory
=
$nodeFactory
;
$this
->
nodeFactory
=
$nodeFactory
;
$this
->
treeFactory
=
$treeFactory
;
$this
->
treeFactory
=
$treeFactory
;
...
@@ -192,9 +194,82 @@ class Topmenu extends Template implements IdentityInterface
...
@@ -192,9 +194,82 @@ class Topmenu extends Template implements IdentityInterface
$colStops
=
$this
->
_columnBrake
(
$child
->
getChildren
(),
$limit
);
$colStops
=
$this
->
_columnBrake
(
$child
->
getChildren
(),
$limit
);
}
}
if
(
$child
->
getData
(
'name'
)
==
'TOPS'
)
{
$html
.=
'<div class="level'
.
$childLevel
.
' '
.
$childrenWrapClass
.
'">'
;
// $html .= $this->_getHtml($child, $childrenWrapClass, $limit, $colStops);
$html
.=
'1222'
;
$html
.=
'</div>'
;
}
elseif
(
$child
->
getData
(
'name'
)
==
'BODYSUITS'
)
{
$html
.=
'<div class="level'
.
$childLevel
.
' '
.
$childrenWrapClass
.
'">'
;
$html
.=
'<div class="row">'
;
$html
.=
'<ul class="subchildmenu col-sm-12 mega-columns columns4">'
;
$html
.=
$this
->
_getHtmlStyle1
(
$child
,
$childrenWrapClass
,
$limit
,
$colStops
);
$html
.=
'</ul>'
;
$html
.=
'</div>'
;
$html
.=
'</div>'
;
}
else
{
$html
.=
'<ul class="level'
.
$childLevel
.
' '
.
$childrenWrapClass
.
'">'
;
$html
.=
'<ul class="level'
.
$childLevel
.
' '
.
$childrenWrapClass
.
'">'
;
$html
.=
$this
->
_getHtml
(
$child
,
$childrenWrapClass
,
$limit
,
$colStops
);
// $html .= $this->_getHtml($child, $childrenWrapClass, $limit, $colStops);
$html
.=
'33333'
;
$html
.=
'</ul>'
;
$html
.=
'</ul>'
;
}
return
$html
;
}
protected
function
_getHtmlStyle1
(
Node
$menuTree
,
$childrenWrapClass
,
$limit
,
array
$colBrakes
=
[]
)
{
$html
=
''
;
$children
=
$menuTree
->
getChildren
();
$childLevel
=
$this
->
getChildLevel
(
$menuTree
->
getLevel
());
$this
->
removeChildrenWithoutActiveParent
(
$children
,
$childLevel
);
$counter
=
1
;
$childrenCount
=
$children
->
count
();
$parentPositionClass
=
$menuTree
->
getPositionClass
();
$itemPositionClassPrefix
=
$parentPositionClass
?
$parentPositionClass
.
'-'
:
'nav-'
;
/** @var Node $child */
foreach
(
$children
as
$child
)
{
$child
->
setLevel
(
$childLevel
);
$child
->
setIsFirst
(
$counter
===
1
);
$child
->
setIsLast
(
$counter
===
$childrenCount
);
$child
->
setPositionClass
(
$itemPositionClassPrefix
.
$counter
);
$outermostClassCode
=
''
;
$outermostClass
=
$menuTree
->
getOutermostClass
();
if
(
$childLevel
===
0
&&
$outermostClass
)
{
$outermostClassCode
=
' class="'
.
$outermostClass
.
'" '
;
$this
->
setCurrentClass
(
$child
,
$outermostClass
);
}
if
(
$this
->
shouldAddNewColumn
(
$colBrakes
,
$counter
))
{
$html
.=
'</ul></li><li class="column"><ul>'
;
}
$html
.=
'<li '
.
$this
->
_getRenderedMenuItemAttributes
(
$child
)
.
'>'
;
$html
.=
'<a href="'
.
$child
->
getUrl
()
.
'" '
.
$outermostClassCode
.
'><span>'
.
$this
->
escapeHtml
(
$child
->
getName
()
)
.
'</span></a>'
.
$this
->
_addSubMenu
(
$child
,
$childLevel
,
$childrenWrapClass
,
$limit
)
.
'</li>'
;
$counter
++
;
}
if
(
is_array
(
$colBrakes
)
&&
!
empty
(
$colBrakes
)
&&
$limit
)
{
$html
=
'<li class="column"><ul>'
.
$html
.
'</ul></li>'
;
}
return
$html
;
return
$html
;
}
}
...
@@ -213,7 +288,8 @@ class Topmenu extends Template implements IdentityInterface
...
@@ -213,7 +288,8 @@ class Topmenu extends Template implements IdentityInterface
$childrenWrapClass
,
$childrenWrapClass
,
$limit
,
$limit
,
array
$colBrakes
=
[]
array
$colBrakes
=
[]
)
{
)
{
$html
=
''
;
$html
=
''
;
$children
=
$menuTree
->
getChildren
();
$children
=
$menuTree
->
getChildren
();
...
...
app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml
View file @
3ec7ffcb
...
@@ -15,7 +15,7 @@ $_menuHtml = $block->getHtml('level-top', 'submenu', $columnsLimit)
...
@@ -15,7 +15,7 @@ $_menuHtml = $block->getHtml('level-top', 'submenu', $columnsLimit)
?>
?>
<div
class=
"nav-sections"
>
<div
class=
"nav-sections"
>
<nav
class=
"navigation"
data-action=
"navigation"
>
<nav
class=
"navigation"
data-action=
"navigation"
>
<ul
data-mage-init=
'{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'
>
<ul
data-mage-init=
'{"menu":{"responsive":true,
"dropdown":"div",
"expanded":true, "position":{"my":"left top","at":"left bottom"}}}'
>
<?=
/* @noEscape */
$_menuHtml
?>
<?=
/* @noEscape */
$_menuHtml
?>
<?=
$block
->
getChildHtml
()
?>
<?=
$block
->
getChildHtml
()
?>
</ul>
</ul>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
3ec7ffcb
...
@@ -942,9 +942,35 @@ footer{
...
@@ -942,9 +942,35 @@ footer{
background:none;
background:none;
}
}
.submenu{
.submenu{
//
width: 100%;
width: 100%;
margin-top: 16px;
margin-top: 16px;
padding: 60px 30px 60px 20px;
}
.subchildmenu.mega-columns > li{
float: left;
}
.navigation li.level0 .submenu .level1{
border-right: 1px solid #e1e1e1;
}
.navigation .subchildmenu.mega-columns.columns4 > li{
width: 25%;
}
.navigation .subchildmenu.mega-columns.columns4 > li:nth-child(4n+1){
clear: both;
}
}
.navigation .submenu li.level1 > a{
font-size: 14px;
font-weight: 500;
text-transform: uppercase;
}
.navigation .submenu li.level1 > a > span{
font-family: 'Outfit-Regular', sans-serif;
position: relative;
font-weight: 500;
color: #292929;
text-transform: none;
}
}
}
}
}
...
...
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