Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dic-global-dev
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Manzar Hussain
dic-global-dev
Commits
52c587fa
Commit
52c587fa
authored
Dec 17, 2020
by
Manzar Hussain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix js issue
parent
f0029a60
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
85 deletions
+134
-85
envigo.libraries.yml
themes/custom/envigo/envigo.libraries.yml
+1
-0
custom.js
themes/custom/envigo/js/custom.js
+77
-0
page--front.html.twig
themes/custom/envigo/templates/layout/page--front.html.twig
+28
-42
page.html.twig
themes/custom/envigo/templates/layout/page.html.twig
+28
-43
No files found.
themes/custom/envigo/envigo.libraries.yml
View file @
52c587fa
...
...
@@ -15,6 +15,7 @@ global-style:
css/videos.css
:
{}
css/leadership.css
:
{}
css/product-main.css
:
{}
js
:
theme
:
js/jquery.min.js
:
{}
...
...
themes/custom/envigo/js/custom.js
View file @
52c587fa
(
function
(
$
)
{
alert
(
'test'
);
var
includes
=
$
(
"[data-include]"
);
jQuery
.
each
(
includes
,
function
()
{
var
file
=
/* 'views/' + */
$
(
this
).
data
(
"include"
)
+
".html"
;
...
...
@@ -1888,8 +1889,84 @@
$
(
"html, body"
).
animate
({
scrollTop
:
a
},
700
);
});
console
.
log
(
"header"
);
// search button function start
$
(
'.h_search_dta'
).
on
(
'click'
,
function
(){
$
(
this
).
parents
(
'body'
).
addClass
(
'h_scrollNone'
).
find
(
'.h_site_search'
).
show
();
});
$
(
document
).
click
(
function
(
e
)
{
if
(
!
$
(
e
.
target
).
is
(
'.hh_site_search_box *, .hh_site_search_box, .h_search_dta, .h_search_dta *'
))
{
$
(
'body'
).
removeClass
(
'h_scrollNone'
).
find
(
'.h_site_search'
).
hide
();
}
});
// search button function end
// change region button function start
$
(
'.h_cr_b a'
).
on
(
'click'
,
function
(
e
){
e
.
preventDefault
();
$
(
this
).
parents
(
'body'
).
addClass
(
'h_scrollNone'
).
find
(
'.h_header_langBox'
).
show
();
});
$
(
document
).
click
(
function
(
e
)
{
if
(
!
$
(
e
.
target
).
is
(
'.h_cr_b *, .h_cr_b, .h_header_langBox_box, .h_header_langBox_box *'
))
{
$
(
'body'
).
removeClass
(
'h_scrollNone'
).
find
(
'.h_header_langBox'
).
hide
();
}
});
// change region button function end
$
(
'.h_menu_btn'
).
on
(
'click'
,
function
(
e
){
var
a
=
$
(
this
);
if
(
a
.
hasClass
(
"open"
))
{
a
.
parents
(
'body'
).
removeClass
(
'menu_body_scrollNone'
);
$
(
this
).
removeClass
(
'open'
).
parents
(
'.h_rc_b'
).
removeClass
(
'activeMenucon'
);
}
else
{
a
.
parents
(
'body'
).
addClass
(
'menu_body_scrollNone'
);
$
(
this
).
addClass
(
'open'
).
parents
(
'.h_rc_b'
).
addClass
(
'activeMenucon'
);
}
});
$
(
'.h_nav_main li em'
).
on
(
'click'
,
function
(
e
){
$
(
this
).
parents
(
'li'
).
toggleClass
(
'activeSM'
).
siblings
().
removeClass
(
'activeSM'
);
});
// menu container code start
//activeSM
/* const $menuBtn = document.querySelector(".menu-btn");
let isMenuOpen = false;
$menuBtn.addEventListener("click", () => {
if (!isMenuOpen) {
$menuBtn.classList.add("open");
} else {
$menuBtn.classList.remove("open");
}
isMenuOpen = !isMenuOpen;
}); */
$
(
'.f_l_cb .h6_h_c'
).
on
(
'click'
,
function
(){
var
a
=
$
(
this
).
parent
().
find
(
"ul"
);
$
(
this
).
parents
(
'.f_cb_m'
).
siblings
(
'.f_cb_m'
).
find
(
'.f_l_cb'
).
removeClass
(
'activeMenu'
).
find
(
'ul'
).
slideUp
();
$
(
this
).
parent
().
siblings
(
'.f_l_cb'
).
removeClass
(
'activeMenu'
).
find
(
'ul'
).
slideUp
();
if
(
a
.
is
(
":visible"
))
{
$
(
this
).
parent
().
find
(
'ul'
).
slideUp
();
$
(
this
).
parent
().
removeClass
(
'activeMenu'
);
}
else
{
$
(
this
).
parent
().
find
(
'ul'
).
slideDown
();
$
(
this
).
parent
().
addClass
(
'activeMenu'
);
}
});
})(
jQuery
);
function
isNumberKey
(
evt
)
{
...
...
themes/custom/envigo/templates/layout/page--front.html.twig
View file @
52c587fa
...
...
@@ -53,6 +53,7 @@
</div>
</div>
</div>
<div
class=
"layout-container"
>
<div
class=
"layout-content"
>
...
...
@@ -60,35 +61,38 @@
</div>
{# /.layout-content #}
</div>
{%
if
page.footer
%}
<div
class=
"container-fluid f_l_c_b"
>
<div
class=
"row"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-9"
>
<div
class=
"row"
>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_first
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_second
}}
</div>
{%
if
page.footer
%}
<div
class=
"container-fluid f_l_c_b"
>
<div
class=
"row"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-9"
>
<div
class=
"row"
>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_first
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_second
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_third
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_fourth
}}
</div>
</div>
</div>
</div>
</div>
</div>
{%
endif
%}
</div>
{%
endif
%}
...
...
@@ -115,22 +119,4 @@
</div>
<!-- footer copyright strip end -->
<script>
(
function
(
$
)
{
console
.
log
(
"footer"
);
$
(
'.f_l_cb .h6_h_c'
).
on
(
'click'
,
function
(){
var
a
=
$
(
this
).
parent
().
find
(
"ul"
);
$
(
this
).
parents
(
'.f_cb_m'
).
siblings
(
'.f_cb_m'
).
find
(
'.f_l_cb'
).
removeClass
(
'activeMenu'
).
find
(
'ul'
).
slideUp
();
$
(
this
).
parent
().
siblings
(
'.f_l_cb'
).
removeClass
(
'activeMenu'
).
find
(
'ul'
).
slideUp
();
if
(
a
.
is
(
":visible"
))
{
$
(
this
).
parent
().
find
(
'ul'
).
slideUp
();
$
(
this
).
parent
().
removeClass
(
'activeMenu'
);
}
else
{
$
(
this
).
parent
().
find
(
'ul'
).
slideDown
();
$
(
this
).
parent
().
addClass
(
'activeMenu'
);
}
});
})(
jQuery
);
</script>
themes/custom/envigo/templates/layout/page.html.twig
View file @
52c587fa
...
...
@@ -53,42 +53,45 @@
</div>
</div>
</div>
<div
class=
"layout-container"
>
<div
class=
"layout-container"
>
<div
class=
"layout-content"
>
{{
page.content
}}
</div>
{# /.layout-content #}
</div>
{%
if
page.footer
%}
<div
class=
"container-fluid f_l_c_b"
>
<div
class=
"row"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-9"
>
<div
class=
"row"
>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_first
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_second
}}
</div>
{%
if
page.footer
%}
<div
class=
"container-fluid f_l_c_b"
>
<div
class=
"row"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-9"
>
<div
class=
"row"
>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_first
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_second
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_third
}}
</div>
<div
class=
"col-lg-3 col-12 f_cb_m"
>
{{
page.footer_fourth
}}
</div>
</div>
</div>
</div>
</div>
</div>
{%
endif
%}
</div>
{%
endif
%}
...
...
@@ -115,22 +118,4 @@
</div>
<!-- footer copyright strip end -->
<script>
(
function
(
$
)
{
console
.
log
(
"footer"
);
$
(
'.f_l_cb .h6_h_c'
).
on
(
'click'
,
function
(){
var
a
=
$
(
this
).
parent
().
find
(
"ul"
);
$
(
this
).
parents
(
'.f_cb_m'
).
siblings
(
'.f_cb_m'
).
find
(
'.f_l_cb'
).
removeClass
(
'activeMenu'
).
find
(
'ul'
).
slideUp
();
$
(
this
).
parent
().
siblings
(
'.f_l_cb'
).
removeClass
(
'activeMenu'
).
find
(
'ul'
).
slideUp
();
if
(
a
.
is
(
":visible"
))
{
$
(
this
).
parent
().
find
(
'ul'
).
slideUp
();
$
(
this
).
parent
().
removeClass
(
'activeMenu'
);
}
else
{
$
(
this
).
parent
().
find
(
'ul'
).
slideDown
();
$
(
this
).
parent
().
addClass
(
'activeMenu'
);
}
});
})(
jQuery
);
</script>
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