Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
NAP-wordpress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marwa Sfari
NAP-wordpress
Commits
344a84b7
Commit
344a84b7
authored
Aug 08, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Responsive]Add footer to menu
parent
30b55acf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
3 deletions
+58
-3
main.css
wp-content/themes/nap/assets/css/main.css
+39
-0
main.js
wp-content/themes/nap/assets/js/main.js
+18
-2
footer.php
wp-content/themes/nap/footer.php
+1
-1
No files found.
wp-content/themes/nap/assets/css/main.css
View file @
344a84b7
...
@@ -734,6 +734,38 @@ nav ul ul{
...
@@ -734,6 +734,38 @@ nav ul ul{
.nav-content
ul
ul
li
.active
{
.nav-content
ul
ul
li
.active
{
opacity
:
1
!important
;
opacity
:
1
!important
;
}
}
.header
.nav-content
.footer
.row
{
float
:
none
;
}
.header
.nav-content
.footer
{
padding
:
0
;
position
:
absolute
;
bottom
:
40px
;
}
.header
.nav-content
.footer.relative
{
position
:
relative
;
bottom
:
initial
;
}
.header
.nav-content
.footer
ul
{
display
:
table
;
}
.header
.nav-content
.footer-links
{
display
:
block
;
}
.header
.nav-content
.footer-links
li
{
width
:
50%
;
}
.header
.nav-content
.footer
li
{
display
:
inline-block
;
padding-bottom
:
15px
;
}
.header
.footer
.acces
li
:after
,
.header
.footer
.acces
li
:before
{
margin-left
:
0px
;
}
.header
.footer
.acces
li
{
padding-left
:
8px
;
}
/* ==========================================================================
/* ==========================================================================
VI/ FOOTER...............footer
VI/ FOOTER...............footer
========================================================================== */
========================================================================== */
...
@@ -754,6 +786,7 @@ footer{
...
@@ -754,6 +786,7 @@ footer{
}
}
.footer
.acces
li
:after
,
.footer
.acces
li
:after
,
.footer
.acces
li
:before
,
.footer
.acces
li
:before
,
.header
.nav-content
.footer
.right
li
a
:before
,
.footer
.right
li
a
:after
{
.footer
.right
li
a
:after
{
height
:
8px
;
height
:
8px
;
width
:
1px
;
width
:
1px
;
...
@@ -764,6 +797,12 @@ footer{
...
@@ -764,6 +797,12 @@ footer{
vertical-align
:
middle
;
vertical-align
:
middle
;
margin
:
0px
6px
0px
9px
;
margin
:
0px
6px
0px
9px
;
}
}
.header
.nav-content
.footer
.right
li
a
:after
{
display
:
none
}
.header
.nav-content
.footer
.right
li
a
:before
{
margin-left
:
0px
;
}
.footer
.right
li
:last-child
a
:after
{
.footer
.right
li
:last-child
a
:after
{
display
:
none
;
display
:
none
;
}
}
...
...
wp-content/themes/nap/assets/js/main.js
View file @
344a84b7
...
@@ -20,12 +20,16 @@ $(function(){
...
@@ -20,12 +20,16 @@ $(function(){
if
(
$
(
".c-hamburger"
).
hasClass
(
'is-active'
))
{
//Open menu
if
(
$
(
".c-hamburger"
).
hasClass
(
'is-active'
))
{
//Open menu
nav
.
removeClass
(
'OFF'
).
addClass
(
"ON"
);
nav
.
removeClass
(
'OFF'
).
addClass
(
"ON"
);
nav
.
parent
().
addClass
(
"show-nav transition"
);
nav
.
parent
().
addClass
(
"show-nav transition"
);
if
(
!
(
$
(
'.main-nav .nav-content .footer'
).
length
)){
$
(
'.main-nav .nav-content'
).
append
(
$
(
'.footer'
).
clone
());
}
}
}
else
{
//Close menu
else
{
//Close menu
nav
.
removeClass
(
'ON'
).
addClass
(
"OFF"
);
nav
.
removeClass
(
'ON'
).
addClass
(
"OFF"
);
nav
.
parent
().
removeClass
(
"show-nav"
);
nav
.
parent
().
removeClass
(
"show-nav"
);
}
}
nav
.
stop
().
slideToggle
();
nav
.
stop
().
slideToggle
();
checkFooterNavPosition
();
});
});
}
}
//load content page on left Panel
//load content page on left Panel
...
@@ -345,6 +349,7 @@ $.fn.getMenuBg = function(){
...
@@ -345,6 +349,7 @@ $.fn.getMenuBg = function(){
$
(
'.contact-form .inner-form'
).
outerHeight
(
windowHeight
-
footerContact
);
$
(
'.contact-form .inner-form'
).
outerHeight
(
windowHeight
-
footerContact
);
if
(
lastSectionHeight
<
windowHeight
-
footerHeight
)
if
(
lastSectionHeight
<
windowHeight
-
footerHeight
)
$
(
'#catalogue .panel-content section'
).
last
().
height
(
2
*
windowHeight
/
3
-
footerHeight
);
$
(
'#catalogue .panel-content section'
).
last
().
height
(
2
*
windowHeight
/
3
-
footerHeight
);
checkFooterNavPosition
();
}
}
//Wordpress js login
//Wordpress js login
$
(
'#user_login'
).
attr
(
'placeholder'
,
'Identifiant'
);
$
(
'#user_login'
).
attr
(
'placeholder'
,
'Identifiant'
);
...
@@ -462,14 +467,25 @@ function scrollAnchor(elemId, skipZero){
...
@@ -462,14 +467,25 @@ function scrollAnchor(elemId, skipZero){
});
});
});
});
}
}
function
checkFooterNavPosition
(){
var
mainHeight
=
$
(
'.main-nav .nav-content'
).
height
(),
nav
=
$
(
'.main-nav .nav-content .arrow-white'
).
height
()
+
$
(
'.main-nav .nav-content .arrow-pink'
).
height
(),
footerNav
=
$
(
'.header .nav-content .footer'
).
outerHeight
();
footerSpace
=
mainHeight
-
(
nav
+
40
)
;
if
(
footerSpace
<=
footerNav
){
$
(
'.header .nav-content .footer'
).
addClass
(
'relative'
);
}
else
{
$
(
'.header .nav-content .footer'
).
removeClass
(
'relative'
);
}
}
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
initFunction
();
initFunction
();
});
//END document load
});
//END document load
var
timer
;
var
timer
;
$
(
window
).
scroll
(
function
(
e
)
{
$
(
window
).
scroll
(
function
(
e
)
{
onScroll
(
e
);
onScroll
(
e
);
var
stickySidebar
=
$
(
'.home-down-wrapper'
).
offset
().
top
;
var
downBTN
=
$
(
'.home-down-wrapper'
).
offset
().
top
;
if
(
$
(
window
).
scrollTop
()
>
stickySidebar
-
$
(
'.nav-header'
).
outerHeight
())
{
if
(
$
(
window
).
scrollTop
()
>
downBTN
-
$
(
'.nav-header'
).
outerHeight
())
{
$
(
'.home-footer-nav .nav-wrapper'
).
addClass
(
'fixed'
);
$
(
'.home-footer-nav .nav-wrapper'
).
addClass
(
'fixed'
);
}
}
else
{
else
{
...
...
wp-content/themes/nap/footer.php
View file @
344a84b7
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<li><a
href=
"#"
>
accès pro
</a></li>
<li><a
href=
"#"
>
accès pro
</a></li>
</ul>
</ul>
</div>
</div>
<div
class=
"row right"
>
<div
class=
"row right
footer-links
"
>
<ul>
<ul>
<li
class=
'nl'
><a
href=
"#"
>
newsletter
</a></li>
<li
class=
'nl'
><a
href=
"#"
>
newsletter
</a></li>
<li><a
href=
"
<?php
echo
get_permalink
(
260
)
?>
"
>
téléchargements
</a></li>
<li><a
href=
"
<?php
echo
get_permalink
(
260
)
?>
"
>
téléchargements
</a></li>
...
...
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