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
41b5ccf2
Commit
41b5ccf2
authored
Jul 20, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix]Add header to product page
parent
624e01a0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
153 additions
and
146 deletions
+153
-146
.DS_Store
...ntent/plugins/advanced-custom-fields-pro/assets/.DS_Store
+0
-0
.DS_Store
...t/plugins/advanced-custom-fields-pro/pro/assets/.DS_Store
+0
-0
main.css
wp-content/themes/nap/assets/css/main.css
+1
-0
product.js
wp-content/themes/nap/assets/js/product.js
+142
-140
footer-shop.php
wp-content/themes/nap/footer-shop.php
+1
-0
footer.php
wp-content/themes/nap/footer.php
+1
-1
header-shop.php
wp-content/themes/nap/header-shop.php
+1
-0
single-product.php
wp-content/themes/nap/woocommerce/single-product.php
+7
-5
No files found.
wp-content/plugins/advanced-custom-fields-pro/assets/.DS_Store
deleted
100644 → 0
View file @
624e01a0
File deleted
wp-content/plugins/advanced-custom-fields-pro/pro/assets/.DS_Store
deleted
100644 → 0
View file @
624e01a0
File deleted
wp-content/themes/nap/assets/css/main.css
View file @
41b5ccf2
...
@@ -1068,6 +1068,7 @@ aside.news-wrapper {
...
@@ -1068,6 +1068,7 @@ aside.news-wrapper {
display
:
block
;
display
:
block
;
border-radius
:
50%
;
border-radius
:
50%
;
margin
:
0
auto
;
margin
:
0
auto
;
position
:
relative
;
}
}
.list-format
ul
li
{
.list-format
ul
li
{
text-align
:
center
;
text-align
:
center
;
...
...
wp-content/themes/nap/assets/js/product.js
View file @
41b5ccf2
...
@@ -3,151 +3,153 @@ $(function(){
...
@@ -3,151 +3,153 @@ $(function(){
$
(
'a[href^="#"], .easyzoom img'
).
click
(
function
(
e
){
$
(
'a[href^="#"], .easyzoom img'
).
click
(
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
});
});
};
//END init Function
};
//END init Function
$
.
fn
.
zoom
=
function
(){
//Zoom on Image
$
.
fn
.
zoom
=
function
(){
//Zoom on Image
$
(
this
).
on
(
'click'
,
function
()
{
$
(
this
).
on
(
'click'
,
function
()
{
var
zoom
=
$
(
this
);
var
zoom
=
$
(
this
);
$
(
".easyzoom"
).
each
(
function
(
i
)
{
$
(
".easyzoom"
).
each
(
function
(
i
)
{
var
$easyzoom
=
$
(
this
).
easyZoom
();
var
$easyzoom
=
$
(
this
).
easyZoom
();
var
api
=
$easyzoom
.
filter
(
'.easyzoom--with-toggle'
).
data
(
'easyZoom'
);
var
api
=
$easyzoom
.
filter
(
'.easyzoom--with-toggle'
).
data
(
'easyZoom'
);
api
.
teardown
();
var
$this
=
$
(
this
);
if
(
$this
.
data
(
"active"
)
===
true
)
{
$this
.
data
(
"active"
,
false
);
zoom
.
removeClass
(
"active"
);
api
.
teardown
();
api
.
teardown
();
}
else
{
var
$this
=
$
(
this
);
$this
.
data
(
"active"
,
true
);
if
(
$this
.
data
(
"active"
)
===
true
)
{
zoom
.
addClass
(
"active"
);
$this
.
data
(
"active"
,
false
);
api
.
_init
();
zoom
.
removeClass
(
"active"
);
}
api
.
teardown
();
}
else
{
$this
.
data
(
"active"
,
true
);
zoom
.
addClass
(
"active"
);
api
.
_init
();
}
});
});
});
});
}
//END Zoom On Image
}
//END Zoom On Image
$
.
fn
.
getListColors
=
function
(){
$
.
fn
.
getListColors
=
function
(){
$
(
this
).
each
(
function
(){
$
(
this
).
each
(
function
(){
var
colorWrapper
=
$
(
this
).
find
(
'>span'
),
var
colorWrapper
=
$
(
this
).
find
(
'>span'
),
color
=
colorWrapper
.
data
(
'color'
);
color
=
colorWrapper
.
data
(
'color'
);
colorWrapper
.
css
(
'background'
,
color
);
colorWrapper
.
css
(
'background'
,
color
);
})
})
}
}
$
.
fn
.
getListFormat
=
function
(){
$
.
fn
.
getListFormat
=
function
(){
$
(
this
).
each
(
function
(){
$
(
this
).
each
(
function
(){
var
formatWrapper
=
$
(
this
).
find
(
'>span'
),
var
formatWrapper
=
$
(
this
).
find
(
'>span'
),
formatW
=
formatWrapper
.
data
(
'width'
),
formatW
=
formatWrapper
.
data
(
'width'
),
formatH
=
formatWrapper
.
data
(
'height'
);
formatH
=
formatWrapper
.
data
(
'height'
);
formatWrapper
.
css
({
'height'
:
formatH
,
'width'
:
formatW
});
formatWrapper
.
css
({
'height'
:
formatH
,
'width'
:
formatW
});
})
}
$
.
fn
.
selectColor
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
this
).
parent
().
parent
().
find
(
'li'
).
removeClass
(
'selected'
);
if
(
!
(
$
(
this
).
hasClass
(
'disabled'
))){
$
(
this
).
toggleClass
(
'selected'
);
}
})
}
$
.
fn
.
selectFormat
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
var
actifImage
=
$
(
this
).
find
(
'img'
).
data
(
'img-active'
),
initialImage
=
$
(
this
).
find
(
'img'
).
data
(
'img'
);
$
(
this
).
parent
().
parent
().
find
(
'li'
).
each
(
function
(){
img
=
$
(
this
).
find
(
'img'
);
img
.
attr
(
'src'
,
img
.
data
(
'img'
));
})
})
$
(
this
).
parent
().
parent
().
find
(
'li'
).
removeClass
(
'selected'
);
}
if
(
!
(
$
(
this
).
hasClass
(
'disabled'
))){
$
.
fn
.
selectColor
=
function
(){
$
(
this
).
toggleClass
(
'selected'
);
$
(
this
).
on
(
'click'
,
function
(){
}
$
(
this
).
parent
().
parent
().
find
(
'li'
).
removeClass
(
'selected'
);
if
(
$
(
this
).
hasClass
(
'selected'
)){
if
(
!
(
$
(
this
).
hasClass
(
'disabled'
))){
$
(
this
).
find
(
'img'
).
attr
(
'src'
,
actifImage
);
$
(
this
).
toggleClass
(
'selected'
);
}
else
{
}
$
(
this
).
find
(
'img'
).
attr
(
'src'
,
initialImage
);
})
}
}
})
$
.
fn
.
selectFormat
=
function
(){
}
$
(
this
).
on
(
'click'
,
function
(){
$
.
fn
.
slider_product
=
function
(){
var
actifImage
=
$
(
this
).
find
(
'img'
).
data
(
'img-active'
),
$
(
'#slides'
).
not
(
'.slick-initialized'
).
slick
({
initialImage
=
$
(
this
).
find
(
'img'
).
data
(
'img'
);
autoplay
:
false
,
$
(
this
).
parent
().
parent
().
find
(
'li'
).
each
(
function
(){
arrows
:
true
,
img
=
$
(
this
).
find
(
'img'
);
dots
:
true
,
img
.
attr
(
'src'
,
img
.
data
(
'img'
));
slidesToShow
:
1
,
})
adaptiveHeight
:
true
,
$
(
this
).
parent
().
parent
().
find
(
'li'
).
removeClass
(
'selected'
);
if
(
!
(
$
(
this
).
hasClass
(
'disabled'
))){
$
(
this
).
toggleClass
(
'selected'
);
}
if
(
$
(
this
).
hasClass
(
'selected'
)){
$
(
this
).
find
(
'img'
).
attr
(
'src'
,
actifImage
);
}
else
{
$
(
this
).
find
(
'img'
).
attr
(
'src'
,
initialImage
);
}
})
}
$
.
fn
.
slider_product
=
function
(){
$
(
'#slides'
).
not
(
'.slick-initialized'
).
slick
({
autoplay
:
false
,
arrows
:
true
,
dots
:
true
,
slidesToShow
:
1
,
adaptiveHeight
:
true
,
//centerMode: true,
//centerMode: true,
centerPadding
:
'0px'
,
centerPadding
:
'0px'
,
});
});
}
}
$
.
fn
.
selectSlide
=
function
(
slide
){
$
.
fn
.
selectSlide
=
function
(
slide
){
$
(
this
).
click
(
function
(
e
)
{
$
(
this
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
var
data
=
$
(
this
).
data
(
"color"
),
var
data
=
$
(
this
).
data
(
"color"
),
dataIndex
=
slide
.
find
(
"[data-color="
+
data
+
"]"
).
data
(
"slick-index"
),
dataIndex
=
slide
.
find
(
"[data-color="
+
data
+
"]"
).
data
(
"slick-index"
),
slideno
=
$
(
this
).
data
(
'color'
);
slideno
=
$
(
this
).
data
(
'color'
);
slide
.
slick
(
'slickGoTo'
,
dataIndex
);
slide
.
slick
(
'slickGoTo'
,
dataIndex
);
});
});
}
}
$
.
fn
.
open_gallery
=
function
(){
$
.
fn
.
open_gallery
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
this
).
on
(
'click'
,
function
(){
tl
=
new
TimelineMax
()
tl
=
new
TimelineMax
()
tl
.
staggerFromTo
(
'.slides-wrapper .gallery article'
,
0.5
,{
opacity
:
0
,
y
:
100
},{
opacity
:
1
,
y
:
0
},
0.1
,
0
);
tl
.
staggerFromTo
(
'.slides-wrapper .gallery article'
,
0.5
,{
opacity
:
0
,
y
:
100
},{
opacity
:
1
,
y
:
0
},
0.1
,
0
);
tl
.
fromTo
(
'.gallery'
,
0.5
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
tl
.
fromTo
(
'.gallery'
,
0.5
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
tl
.
fromTo
(
'#slides'
,
0.5
,{
opacity
:
1
},{
opacity
:
0
},
0
);
tl
.
fromTo
(
'#slides'
,
0.5
,{
opacity
:
1
},{
opacity
:
0
},
0
);
tl
.
fromTo
(
'.nav-slider'
,
0.5
,{
opacity
:
1
},{
opacity
:
0
},
0
);
tl
.
fromTo
(
'.nav-slider'
,
0.5
,{
opacity
:
1
},{
opacity
:
0
},
0
);
});
});
$
(
'.gallery'
).
on
(
'click'
,
'.close-btn,article'
,
function
(){
$
(
'.gallery'
).
on
(
'click'
,
'.close-btn,article'
,
function
(){
tl
.
reverse
();
tl
.
reverse
();
})
})
}
}
$
.
fn
.
showRightPanelAnimation
=
function
(
removeClass
,
addClass
){
$
.
fn
.
showRightPanelAnimation
=
function
(
removeClass
,
addClass
){
$
(
this
).
each
(
function
(
i
)
{
$
(
this
).
each
(
function
(
i
)
{
var
$li
=
$
(
this
);
var
$li
=
$
(
this
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$li
.
removeClass
(
removeClass
).
addClass
(
addClass
);
$li
.
removeClass
(
removeClass
).
addClass
(
addClass
);
},
i
*
100
);
// delay 100 ms
},
i
*
100
);
// delay 100 ms
});
}
$
.
fn
.
showRightPanel
=
function
(){
var
wrapper
=
$
(
this
),
widthPanel
=
wrapper
.
outerWidth
();
wrapper
.
css
(
'right'
,
-
widthPanel
)
$
(
'.show-product'
).
on
(
'click'
,
function
(){
$
(
'.product-details'
).
css
(
'right'
,
widthPanel
);
wrapper
.
css
({
'right'
:
0
,
'opacity'
:
1
});
$
(
'#product .product-list article'
).
showRightPanelAnimation
(
'fadeOutUp'
,
'hidden-elem visible-elem animated fadeInDown'
);
})
$
(
this
).
on
(
'click'
,
'.close-btn'
,
function
(){
wrapper
.
css
(
'right'
,
-
widthPanel
);
$
(
'#product .product-list article'
).
showRightPanelAnimation
(
'fadeInDown'
,
'fadeOutUp'
);
$
(
'.product-details'
).
css
(
'right'
,
0
);
})
}
$
.
fn
.
productAnimation
=
function
(){
tlProduct
=
new
TimelineMax
();
tlProduct
.
fromTo
(
'.product-images'
,
1
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
0
);
tlProduct
.
staggerFromTo
(
'.product-details .list'
,
0.7
,{
opacity
:
0
,
marginLeft
:
"-10%"
},{
opacity
:
1
,
marginLeft
:
"0"
},
0.4
,
0.5
);
tlProduct
.
fromTo
(
'.product-info'
,
1
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
1.2
);
}
$
(
'.product-list article img, .product-list article ul li'
).
on
(
'click'
,
function
()
{
var
toLink
=
$
(
this
).
data
(
'link'
);
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
$
(
'.load-page'
).
load
(
toLink
,
function
(){
$
(
'.list-color li'
).
getListColors
();
//$('.list-format li').getListFormat();
$
(
'.list-color li'
).
selectColor
();
$
(
'.list-format li'
).
selectFormat
();
$
(
'#zoom'
).
zoom
();
$
(
'article[data-color], .list-color li span'
).
selectSlide
(
$
(
'#slides'
));
$
(
'#mozaique'
).
open_gallery
();
initFunction
();
$
(
'html'
).
css
(
'overflow'
,
'hidden'
);
setTimeout
(
function
(){
$
.
fn
.
productAnimation
();
$
(
'#product .product-list'
).
showRightPanel
();
$
.
fn
.
slider_product
();
},
800
)
$
(
'.download-btn'
).
click
(
function
(
e
){
e
.
stopPropagation
();
});
});
});
}
})
$
.
fn
.
showRightPanel
=
function
(){
});
var
wrapper
=
$
(
this
),
widthPanel
=
wrapper
.
outerWidth
();
wrapper
.
css
(
'right'
,
-
widthPanel
)
$
(
'.show-product'
).
on
(
'click'
,
function
(){
$
(
'.product-details'
).
css
(
'right'
,
widthPanel
);
wrapper
.
css
({
'right'
:
0
,
'opacity'
:
1
});
$
(
'#product .product-list article'
).
showRightPanelAnimation
(
'fadeOutUp'
,
'hidden-elem visible-elem animated fadeInDown'
);
})
$
(
this
).
on
(
'click'
,
'.close-btn'
,
function
(){
wrapper
.
css
(
'right'
,
-
widthPanel
);
$
(
'#product .product-list article'
).
showRightPanelAnimation
(
'fadeInDown'
,
'fadeOutUp'
);
$
(
'.product-details'
).
css
(
'right'
,
0
);
})
}
$
.
fn
.
productAnimation
=
function
(){
tlProduct
=
new
TimelineMax
();
tlProduct
.
fromTo
(
'.product-images'
,
1
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
0
);
tlProduct
.
staggerFromTo
(
'.product-details .list'
,
0.7
,{
opacity
:
0
,
marginLeft
:
"-10%"
},{
opacity
:
1
,
marginLeft
:
"0"
},
0.4
,
0.5
);
tlProduct
.
fromTo
(
'.product-info'
,
1
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
1.2
);
}
$
(
'.product-list article img, .product-list article ul li'
).
on
(
'click'
,
function
()
{
$
(
'head'
).
append
(
$
(
'.header-shop'
));
var
toLink
=
$
(
this
).
data
(
'link'
);
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
$
(
'.load-page'
).
load
(
toLink
,
function
(){
$
(
'.list-color li'
).
getListColors
();
$
(
'.list-color li'
).
selectColor
();
$
(
'.list-format li'
).
selectFormat
();
$
(
'#zoom'
).
zoom
();
$
(
'article[data-color], .list-color li span'
).
selectSlide
(
$
(
'#slides'
));
$
(
'#mozaique'
).
open_gallery
();
initFunction
();
$
(
'html'
).
css
(
'overflow'
,
'hidden'
);
setTimeout
(
function
(){
$
.
fn
.
productAnimation
();
$
(
'#product .product-list'
).
showRightPanel
();
$
.
fn
.
slider_product
();
$
(
'.list-color li'
).
selectColor
();
$
(
'.list-format li'
).
selectFormat
();
},
500
)
$
(
'.download-btn'
).
click
(
function
(
e
){
e
.
stopPropagation
();
});
});
})
});
\ No newline at end of file
wp-content/themes/nap/footer-shop.php
0 → 100755
View file @
41b5ccf2
<?php
wp_footer
();
?>
wp-content/themes/nap/footer.php
View file @
41b5ccf2
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</div>
</div>
<div
class=
"row right"
>
<div
class=
"row right"
>
<ul>
<ul>
<li><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>
<li><a
href=
"phototheque.php"
>
phototèque
</a></li>
<li><a
href=
"phototheque.php"
>
phototèque
</a></li>
<li><a
href=
"
<?php
echo
get_permalink
(
171
)
?>
"
>
mentions légales
</a></li>
<li><a
href=
"
<?php
echo
get_permalink
(
171
)
?>
"
>
mentions légales
</a></li>
...
...
wp-content/themes/nap/header-shop.php
0 → 100755
View file @
41b5ccf2
<?php
wp_head
();
//get_header( 'shop' );?>
wp-content/themes/nap/woocommerce/single-product.php
View file @
41b5ccf2
<?php
while
(
have_posts
())
:
the_post
();
?>
<?php
get_header
(
'shop'
);
?>
<?php
<?php
wc_get_template_part
(
'content'
,
'single-product'
);
?>
while
(
have_posts
())
:
the_post
();
wc_get_template_part
(
'content'
,
'single-product'
);
<?php
endwhile
;
// end of the loop. ?>
endwhile
;
// end of the loop.
?>
<?php
get_footer
(
'shop'
);
?>
\ No newline at end of file
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