Skip to content

Commit

Permalink
🚨 fix linter issue, and merge with offcanvas
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamed committed Feb 23, 2021
2 parents d4f5f22 + 07b1346 commit d8c587e
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 32 deletions.
2 changes: 1 addition & 1 deletion templates/shaper_helixultimate/features/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function renderFeature()

if ($offcanvas_position === 'right')
{
$output .= '<a id="offcanvas-toggler" aria-label="' . JText::_('HELIX_ULTIMATE_NAVIGATION') . '" class="offcanvas-toggler-right d-block d-lg-none" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>';
$output .= '<a id="offcanvas-toggler" aria-label="' . JText::_('HELIX_ULTIMATE_NAVIGATION') . '" class="offcanvas-toggler-right d-flex d-lg-none" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>';
}

$menu = new HelixultimateMenu('d-none d-lg-block', '');
Expand Down
4 changes: 2 additions & 2 deletions templates/shaper_helixultimate/headers/style-1/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
</div>

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<div class="burger-icon"><span></span><span></span><span></span></div>
</a>
<?php endif; ?>
Expand Down
4 changes: 2 additions & 2 deletions templates/shaper_helixultimate/headers/style-2/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
</div>

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<div class="burger-icon"><span></span><span></span><span></span></div>
</a>
<?php endif; ?>
Expand Down
8 changes: 4 additions & 4 deletions templates/shaper_helixultimate/headers/style-3/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<?php if( $displayData->params->get('sticky_header')) { ?>
<div class="sticky-header-placeholder"></div>
<?php } ?>
<header id="sp-header">
<header id="sp-header" class="header-with-social">
<div class="container">
<div class="container-inner">
<div class="row flex-nowrap">
Expand All @@ -62,7 +62,7 @@
<!-- Menu -->
<div id="sp-menu" class="menu-with-social col-auto flex-auto">
<div class="sp-column d-flex justify-content-between align-items-center">
<div class="d-flex menu-wrap justify-content-between align-items-center flex-auto">
<div class="d-flex menu-wrap menu-with-offcanvas justify-content-between align-items-center flex-auto">
<?php echo $menu->renderFeature(); ?>
<jdoc:include type="modules" name="menu" style="sp_xhtml" />
</div>
Expand All @@ -84,8 +84,8 @@
</div>

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<div class="burger-icon"><span></span><span></span><span></span></div>
</a>
<?php endif; ?>
Expand Down
8 changes: 4 additions & 4 deletions templates/shaper_helixultimate/headers/style-4/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<?php if( $displayData->params->get('sticky_header')) { ?>
<div class="sticky-header-placeholder"></div>
<?php } ?>
<header id="sp-header" class="full-header">
<header id="sp-header" class="full-header full-header-center">
<div class="container-fluid">
<div class="container-inner">
<div class="row flex-nowrap align-items-center">
Expand All @@ -63,7 +63,7 @@
<!-- Menu -->
<div id="sp-menu" class="menu-with-social menu-center col-auto flex-auto">
<div class="sp-column d-flex justify-content-between align-items-center">
<div class="d-flex justify-content-between align-items-center flex-auto">
<div class="menu-with-offcanvas d-flex justify-content-between align-items-center flex-auto">
<?php echo $menu->renderFeature(); ?>
<jdoc:include type="modules" name="menu" style="sp_xhtml" />
</div>
Expand All @@ -85,8 +85,8 @@
</div>

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#">
<div class="burger-icon"><span></span><span></span><span></span></div>
</a>
<?php endif; ?>
Expand Down
11 changes: 8 additions & 3 deletions templates/shaper_helixultimate/headers/style-5/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

?>

<?php if($displayData->params->get('sticky_header')): ?>
<?php if ($displayData->params->get('sticky_header')): ?>
<div class="sticky-header-placeholder"></div>
<?php endif ?>
<header id="sp-header" class="full-header header-has-modules">
<header id="sp-header" class="full-header full-header-left header-has-modules">
<div class="container-fluid">
<div class="container-inner">
<div class="row flex-nowrap align-items-center">
Expand All @@ -60,7 +60,7 @@
<!-- Menu -->
<div id="sp-menu" class="col-auto flex-auto">
<div class="sp-column d-flex justify-content-between">
<div class="d-flex justify-content-between flex-auto">
<div class="menu-with-offcanvas d-flex justify-content-between flex-auto">
<?php echo $menu->renderFeature(); ?>
</div>
</div>
Expand All @@ -82,8 +82,13 @@
<jdoc:include type="modules" name="menu" style="sp_xhtml" />

<!-- if offcanvas position right -->
<<<<<<< HEAD
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="offcanvas-toggler-secondary offcanvas-toggler-right" href="#"><i class="fas fa-bars" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>"></i></a>
=======
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
>>>>>>> 07b1346195838114b5578d66438438338e19a0e0
<?php endif; ?>
</div>
</div>
Expand Down
14 changes: 8 additions & 6 deletions templates/shaper_helixultimate/headers/style-6/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<div class="row">
<div class="col-6 d-block d-xl-none">
<div class="sp-column d-flex justify-content-between align-items-center">
<div id="sp-logo">
<div id="sp-logo" class="menu-with-offcanvas">
<jdoc:include type="modules" name="logo" style="sp_xhtml" />
<?php echo $logo->renderFeature(); ?>
</div>
Expand All @@ -109,16 +109,18 @@
<div class="col-6 col-xl-12">
<div class="d-flex justify-content-end justify-content-xl-center align-items-center">
<!-- if offcanvas position left -->
<?php if($offcanvas_position === 'left' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php if($offcanvas_position === 'left') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> offcanvas-toggler-secondary offcanvas-toggler-left d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php endif; ?>

<?php echo $menu->renderFeature(); ?>
<jdoc:include type="modules" name="menu" style="sp_xhtml" />
<div class="menu-with-offcanvas">
<jdoc:include type="modules" name="menu" style="sp_xhtml" />
</div>

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php endif; ?>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions templates/shaper_helixultimate/headers/style-7/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
<jdoc:include type="modules" name="menu" style="sp_xhtml" />

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php endif; ?>

<!-- Modal menu toggler -->
<a id="modal-menu-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="ml-3" href="#">
<a id="modal-menu-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> ml-3" href="#">
<div class="burger-icon">
<span></span>
<span></span>
Expand Down
4 changes: 2 additions & 2 deletions templates/shaper_helixultimate/headers/style-8/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
<jdoc:include type="modules" name="menu" style="sp_xhtml" />

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php endif; ?>

<!-- Modal menu toggler -->
Expand Down
4 changes: 2 additions & 2 deletions templates/shaper_helixultimate/headers/style-9/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
<jdoc:include type="modules" name="menu" style="sp_xhtml" />

<!-- if offcanvas position right -->
<?php if($offcanvas_position === 'right' && $menu_type === 'mega_offcanvas') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php if($offcanvas_position === 'right') : ?>
<a id="offcanvas-toggler" aria-label="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" aria-hidden="true" title="<?php echo Text::_('HELIX_ULTIMATE_NAVIGATION'); ?>" class="<?php echo $menu_type; ?> ml-3 offcanvas-toggler-secondary offcanvas-toggler-right d-flex align-items-center" href="#"><div class="burger-icon"><span></span><span></span><span></span></div></a>
<?php endif; ?>

<!-- Modal menu toggler -->
Expand Down
23 changes: 21 additions & 2 deletions templates/shaper_helixultimate/scss/responsive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
}
}

@media(min-width: 992px) {
#sp-header.header-with-modal-menu #offcanvas-toggler.offcanvas{
display: none !important;
}
}
@media(max-width: 992px) {
:root{
--header_height: $header_height_sm;
Expand All @@ -30,11 +35,25 @@
display: none;
}
}
&.full-header-center,
&.header-with-modal-menu,
&.full-header-left,
&.lg-header,
&.header-with-social{
#offcanvas-toggler.mega{
display: flex !important;
}
}
&.lg-header{
.offcanvas-toggler-left.offcanvas{
display: flex !important;
}
}
}
#sp-header-topbar{
.container-inner{
>.row{
height: $header_height_sm;
min-height: $header_height_sm;
}
}
}
Expand Down Expand Up @@ -103,7 +122,7 @@
#sp-header-topbar{
.container-inner{
>.row{
height: $header_height_xs;
min-height: $header_height_xs;
}
}
}
Expand Down
21 changes: 20 additions & 1 deletion templates/shaper_helixultimate/scss/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,22 @@ ul.social-icons {
z-index: 99;
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);
animation: spFadeIn .5s;
#offcanvas-toggler.offcanvas,
#offcanvas-toggler.mega{
display: none !important;
}
&.full-header-left,
&.full-header-center,
&.header-with-modal-menu,
&.lg-header,
&.header-with-social{
#offcanvas-toggler.offcanvas{
display: flex !important;
}
.menu-with-offcanvas #offcanvas-toggler{
display: none !important;
}
}
&.full-header {
padding-left: 45px;
padding-right: 45px;
Expand All @@ -230,6 +246,9 @@ ul.social-icons {
#offcanvas-toggler {
margin-right: 20px;
margin-left: 0px;
&.offcanvas-toggler-right.offcanvas{
display: none !important;
}
}
.sp-column {
height: 100%;
Expand Down Expand Up @@ -423,7 +442,7 @@ ul.social-icons {
.container-inner {
border-bottom: 1px solid #e5e5e5;
> .row {
height: $header_height;
min-height: $header_height;
}
}
a {
Expand Down

0 comments on commit d8c587e

Please sign in to comment.