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
4ac0e8a6
Commit
4ac0e8a6
authored
Sep 19, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]Fixed menu
parent
a174e96c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
67 deletions
+98
-67
main.css
wp-content/themes/nap/assets/css/main.css
+5
-2
main.js
wp-content/themes/nap/assets/js/main.js
+32
-11
functions.php
wp-content/themes/nap/functions.php
+23
-23
nav-list.php
wp-content/themes/nap/nav-list.php
+8
-8
archive-product.php
wp-content/themes/nap/woocommerce/archive-product.php
+30
-23
No files found.
wp-content/themes/nap/assets/css/main.css
View file @
4ac0e8a6
...
...
@@ -810,6 +810,9 @@ nav ul ul{
display
:
none
;
width
:
190px
;
}
.header
.nav-wrapper
ul
li
.current
ul
{
display
:
block
;
}
/*nav ul ul li:before{
content: "•";
padding-right: 5px;
...
...
@@ -2682,7 +2685,7 @@ div.wpcf7-mail-sent-ok{
top
:
0
;
left
:
0
;
right
:
0
;
/*margin:0 -4px -5px -2px;*/
transition
:
all
.2s
ease
;
z-index
:
999999
9999999999
;
z-index
:
999999
;
}
#loading-container-subpage
{
display
:
none
;
...
...
wp-content/themes/nap/assets/js/main.js
View file @
4ac0e8a6
...
...
@@ -72,13 +72,13 @@ var initFunction=function(){
elemToScroll
=
$
(
document
).
find
(
".main"
);
scrollAnchor
(
'body'
,
true
);
}
elemToScroll
.
on
(
"scroll"
,
{
items
:
"ul.phototheque li .subcat a"
},
onScroll
);
elemToScroll
.
on
(
"scroll"
,
onScroll
);
document
.
getElementById
(
'load-page'
).
addEventListener
(
'scroll'
,
window
.
scrollAnimation
.
throttledEvent
,
false
);
$
(
document
).
find
(
'ul.
phototheque
'
).
on
(
'click'
,
' li.parent-cat>a'
,
function
(
e
){
$
(
document
).
find
(
'ul.
main-list-nav
'
).
on
(
'click'
,
' li.parent-cat>a'
,
function
(
e
){
var
windowWidth
=
$
(
window
).
width
();
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'.
phototheque
>li'
).
removeClass
(
'current'
);
$
(
'.
main-list-nav
>li'
).
removeClass
(
'current'
);
$
(
this
).
parent
().
addClass
(
'current'
);
//if (windowWidth < 860){
//$('.nav-phototeque .nav-content>ul>li').addClass('animated fadeOutLeft');
...
...
@@ -87,9 +87,9 @@ var initFunction=function(){
//$('.nav-phototeque .nav-content li.current ul').css('display','inline-block !important');
//.phototheque-content nav li
//}else{
$
(
'.
phototheque .subcat'
).
slideUp
(
'slow'
);
$
(
'.phototheque
.off .subcat'
).
slideUp
();
$
(
this
).
parent
().
find
(
'.subcat'
).
slideDown
(
'slow'
);
$
(
'.
main-list-nav .subcat'
).
stop
(
).
slideUp
(
'slow'
);
// $('.main-list-nav
.off .subcat').slideUp();
$
(
this
).
parent
().
find
(
'.subcat'
).
s
top
().
s
lideDown
(
'slow'
);
//}
...
...
@@ -97,7 +97,7 @@ var initFunction=function(){
setTimeout
(
function
(){
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
$
.
fn
.
responsive
();
},
50
)
},
100
);
}
function
appendLoading
()
{
$
(
'.load-page'
).
append
(
$
(
'#loading-container-subpage'
).
clone
());
...
...
@@ -110,11 +110,30 @@ var initFunction=function(){
e
.
preventDefault
();
var
link
=
$
(
this
).
attr
(
"href"
),
windowWidth
=
$
(
window
).
width
();
if
(
$
(
this
).
parent
().
parent
().
hasClass
(
'nav-page'
)){
$
(
document
).
find
(
'.right-container'
).
first
().
remove
();
$
(
'.load-page'
).
parent
().
css
({
'left'
:
$
(
'.nav-wrapper'
).
outerWidth
()
});
$
(
'.load-page'
).
css
(
'opacity'
,
1
);
$
(
document
).
find
(
'#loading-container-subpage'
).
css
({
'left'
:
$
(
'.nav-wrapper'
).
outerWidth
(),
'width'
:
'calc(100% - '
+
$
(
'.nav-wrapper'
).
outerWidth
()
+
'px)'
,
})
/**/
$
(
'nav ul li'
).
removeClass
(
'current'
).
addClass
(
'off'
);
$
(
this
).
parent
().
addClass
(
'current'
);
$
(
window
)
/**/
}
else
{
$
(
'.load-page'
).
parent
().
css
({
'left'
:
0
,
});
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
}
history
.
pushState
(
null
,
null
,
link
);
$
(
'.load-page'
).
load
(
link
,
function
(){
$
(
'.load-page'
).
load
(
link
,
{
'ajax'
:
1
},
function
(){
$
.
fn
.
loadPageContent
();
$
(
'#loading-container-subpage'
).
hide
();
});
if
(
windowWidth
<
860
){
$
(
".c-hamburger"
).
trigger
(
"click"
);
...
...
@@ -161,6 +180,7 @@ $('#file-p').on('change',function(e){
$
(
document
).
on
(
'click'
,
'.int-link'
,
function
(
e
){
e
.
preventDefault
();
$
(
'.load-page'
).
parent
().
removeClass
(
'active'
);
$
(
'.load-page'
).
parent
().
css
(
'left'
,
'100%'
);
history
.
pushState
(
null
,
null
,
$
(
this
).
find
(
'a'
).
attr
(
'href'
));
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
tlProduct
.
reverse
();
...
...
@@ -634,6 +654,7 @@ function scrollAnchor(elemId, skipZero){
$
(
'.subcat'
).
each
(
function
(){
$
(
this
).
find
(
'a[href^="#"]'
).
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'a'
).
each
(
function
()
{
$
(
this
).
removeClass
(
'active'
);
})
...
...
wp-content/themes/nap/functions.php
View file @
4ac0e8a6
...
...
@@ -310,7 +310,7 @@ function nap_menu() {
}
else
{
$nappe_sets
=
false
;
}
$menu
.=
'<li class ="parent-cat" data-page = "'
.
$category_id
.
'" data-img = "'
.
nap_category_image
(
$category_id
)
.
'"><a href="'
.
get_term_link
(
$cat
->
slug
,
'product_cat'
)
.
'">'
.
$cat
->
name
.
'</a>'
;
$menu
.=
'<li class ="parent-cat
to-slide
" data-page = "'
.
$category_id
.
'" data-img = "'
.
nap_category_image
(
$category_id
)
.
'"><a href="'
.
get_term_link
(
$cat
->
slug
,
'product_cat'
)
.
'">'
.
$cat
->
name
.
'</a>'
;
$args2
=
array
(
'taxonomy'
=>
$taxonomy
,
...
...
wp-content/themes/nap/nav-list.php
View file @
4ac0e8a6
<div
class=
"nav-content font-big"
>
<?php
$arrow
=
'arrow-white'
;
$arrow
=
'arrow-white
nav-page
'
;
if
(
isset
(
$current_page
)
and
$current_page
==
'phototheque'
)
{
$arrow
=
'arrow-blue phototheque'
;
}
?>
<ul
class =
"
<?php
echo
$arrow
?>
"
>
<ul
class =
"
main-list-nav
<?php
echo
$arrow
?>
"
>
<?php
echo
nap_menu
();
?>
<li
data-page =
"uniqpaper"
data-img =
"
<?php
echo
nap_attachment_image
(
151
);
?>
"
><a
href=
"
<?php
echo
get_permalink
(
151
);
?>
"
>
Personnalisation
</a></li>
<li
class=
"to-slide"
data-page =
"uniqpaper"
data-img =
"
<?php
echo
nap_attachment_image
(
151
);
?>
"
><a
href=
"
<?php
echo
get_permalink
(
151
);
?>
"
>
Personnalisation
</a></li>
</ul>
<?php
if
(
!
(
isset
(
$current_page
)
and
$current_page
==
'phototheque'
))
{
?>
<ul
class=
"font-medium arrow-pink pink-list"
>
<li
data-page =
"stories"
data-img =
"
<?php
echo
nap_attachment_image
(
154
);
?>
"
><a
href=
"
<?php
echo
get_permalink
(
154
);
?>
"
>
Stories
</a></li>
<li
data-page =
"contact"
data-img =
"
<?php
echo
nap_attachment_image
(
157
);
?>
"
><a
href=
"
<?php
echo
get_permalink
(
157
);
?>
"
>
Contact
</a></li>
<li
class=
"to-slide"
data-page =
"stories"
data-img =
"
<?php
echo
nap_attachment_image
(
154
);
?>
"
><a
href=
"
<?php
echo
get_permalink
(
154
);
?>
"
>
Stories
</a></li>
<li
class=
"to-slide"
data-page =
"contact"
data-img =
"
<?php
echo
nap_attachment_image
(
157
);
?>
"
><a
href=
"
<?php
echo
get_permalink
(
157
);
?>
"
>
Contact
</a></li>
</ul>
<?php
}
?>
</div>
wp-content/themes/nap/woocommerce/archive-product.php
View file @
4ac0e8a6
...
...
@@ -20,7 +20,10 @@ if (!defined('ABSPATH')) {
exit
;
// Exit if accessed directly
}
$current_page
=
'catalogue'
;
get_header
();
if
(
!
(
isset
(
$_POST
[
'ajax'
])))
{
get_header
();
}
$product
;
$cate
=
get_queried_object
();
$cateID
=
$cate
->
term_id
;
...
...
@@ -33,8 +36,9 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
?>
<div
class=
"container clearfix"
id=
"catalogue"
data-page =
"
<?php
echo
$cateID
;
?>
"
>
<?php
if
(
!
(
isset
(
$_POST
[
'ajax'
])))
{
?>
<div
class=
"container-bg abs-full"
></div>
<?php
get_sidebar
()
?>
<?php
get_sidebar
();
}
?>
<div
class=
"header mobile-nav display--only-mobile blue-bg fixed"
>
<div
class=
"nav-wrapper blue-bg"
>
<ul></ul>
...
...
@@ -245,4 +249,7 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
</div>
</div>
</div>
<?php
get_footer
();
?>
<?php
if
(
!
(
isset
(
$_POST
[
'ajax'
])))
{
get_footer
();
}
?>
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