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
bbd65944
Commit
bbd65944
authored
Aug 03, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix]Redmine - #641 : Image transition
parent
0f9655fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
171 deletions
+139
-171
main.css
wp-content/themes/nap/assets/css/main.css
+77
-76
main.js
wp-content/themes/nap/assets/js/main.js
+62
-95
No files found.
wp-content/themes/nap/assets/css/main.css
View file @
bbd65944
...
...
@@ -65,11 +65,11 @@
}
::-webkit-scrollbar
{
width
:
0px
;
/* remove scrollbar space */
background
:
transparent
;
/* optional: just make scrollbar invisible */
}
.product-details
.list
{
overflow
:
-moz-scrollbars-none
;}
width
:
0px
;
/* remove scrollbar space */
background
:
transparent
;
/* optional: just make scrollbar invisible */
}
.product-details
.list
{
overflow
:
-moz-scrollbars-none
;}
@keyframes
fadein
{
from
{
...
...
@@ -711,20 +711,20 @@ nav ul ul{
/*nav ul ul li:before{
content: "•";
padding-right: 5px;
}*/
nav
ul
ul
li
{
font-size
:
14px
;
font-weight
:
300
;
line-height
:
19px
;
padding-bottom
:
5px
;
}
.header
.nav-content
li
li
a
{
opacity
:
0.6
;
}
.header
.nav-content
li
a
.active
,
.nav-content
ul
ul
li
.active
{
opacity
:
1
!important
;
}
}*/
nav
ul
ul
li
{
font-size
:
14px
;
font-weight
:
300
;
line-height
:
19px
;
padding-bottom
:
5px
;
}
.header
.nav-content
li
li
a
{
opacity
:
0.6
;
}
.header
.nav-content
li
a
.active
,
.nav-content
ul
ul
li
.active
{
opacity
:
1
!important
;
}
/* ==========================================================================
VI/ FOOTER...............footer
========================================================================== */
...
...
@@ -801,7 +801,7 @@ VII/ Pages...............ALL pages
/* --------------*/
/* ---------->>> HOME <<<-----------*/
/* --------------*/
#home
{
background
:
rgba
(
7
,
17
,
48
,
0.5
);
background
:
rgba
(
7
,
17
,
48
,
0.5
);
}
.img-wrapper
{
height
:
100vh
;
...
...
@@ -880,29 +880,29 @@ aside.news-wrapper {
width
:
59%
!important
;
padding
:
39px
;
opacity
:
0
;
text-align
:
center
;
position
:
relative
;
text-align
:
center
;
position
:
relative
;
}
.product-images
.close-panel
{
position
:
absolute
;
left
:
5%
;
position
:
absolute
;
left
:
5%
;
}
.woocommerce-product-details__short-description
{
display
:
none
;
display
:
none
;
}
.product-slides
.product-header
{
text-align
:
left
;
margin-left
:
35px
;
text-align
:
left
;
margin-left
:
35px
;
}
.product-slides
{
width
:
580px
;
margin
:
0
auto
;
position
:
relative
;
padding-left
:
25px
;
width
:
580px
;
margin
:
0
auto
;
position
:
relative
;
padding-left
:
25px
;
}
.product-header
{
color
:
#182566
;
...
...
@@ -1098,9 +1098,9 @@ aside.news-wrapper {
}
.product-details
.list
ul
{
overflow-y
:
scroll
;
max-height
:
560px
;
margin-right
:
-17px
;
overflow-y
:
scroll
;
max-height
:
560px
;
margin-right
:
-17px
;
}
.border-l
:before
{
...
...
@@ -1138,32 +1138,32 @@ aside.news-wrapper {
position
:
relative
;
}
.pa_format
ul
li
{
text-align
:
center
;
color
:
#313D7A
;
max-width
:
85%
;
text-align
:
center
;
color
:
#313D7A
;
max-width
:
85%
;
}
.pa_format
ul
li
label
{
overflow
:
hidden
;
display
:
block
;
vertical-align
:
text-top
;
overflow
:
hidden
;
display
:
block
;
vertical-align
:
text-top
;
}
label
.chevron.bottom
{
display
:
block
;
width
:
120%
;
display
:
block
;
width
:
120%
;
}
label
.chevron.bottom
::first-letter
{
text-transform
:
uppercase
;
text-transform
:
uppercase
;
}
.pa_format
ul
li
img
{
vertical-align
:
top
;
margin-top
:
-50px
;
vertical-align
:
top
;
margin-top
:
-50px
;
}
.pa_format
ul
li
:last-of-type
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
.pa_format
li
.disabled
{
color
:
rgba
(
26
,
26
,
26
,
0.2
);
...
...
@@ -1246,13 +1246,14 @@ text-transform: uppercase;
}
.entry-summary
.price
{
font-size
:
0
;
font-size
:
0
;
display
:
none
;
}
.product-info
.price
{
font-size
:
20px
;
line-height
:
24px
;
letter-spacing
:
2px
;
display
:
block
;
}
.product-info
.notice
{
font-size
:
9px
;
...
...
@@ -1661,41 +1662,41 @@ text-transform: uppercase;
}
.filter-bloc
.bloc-content
ul
{
overflow-y
:
auto
;
max-height
:
300px
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
max-height
:
300px
;
overflow-x
:
hidden
;
}
.filter-bloc
.list-color-filter
li
{
display
:
inline-block
;
height
:
15px
;
width
:
15px
;
border-radius
:
50%
;
cursor
:
pointer
;
text-align
:
center
;
margin-bottom
:
4px
;
margin-right
:
3px
;
display
:
inline-block
;
height
:
15px
;
width
:
15px
;
border-radius
:
50%
;
cursor
:
pointer
;
text-align
:
center
;
margin-bottom
:
4px
;
margin-right
:
3px
;
}
.filter-bloc
.list-color-filter
li
.selected
:before
{
content
:
'\2713'
;
color
:
#fff
;
margin
:
0
auto
;
font-size
:
9px
;
margin-bottom
:
0px
;
content
:
'\2713'
;
color
:
#fff
;
margin
:
0
auto
;
font-size
:
9px
;
margin-bottom
:
0px
;
}
.filter-bloc
.list-color-filter
li
:before
{
content
:
''
;
content
:
''
;
}
.filter-bloc
.list-color-filter
li
:last-child
{
width
:
100%
;
margin-top
:
8px
;
text-align
:
center
;
font-size
:
9px
;
letter-spacing
:
0.2px
;
width
:
100%
;
margin-top
:
8px
;
text-align
:
center
;
font-size
:
9px
;
letter-spacing
:
0.2px
;
}
.filter-bloc
ul
li
{
display
:
block
;
...
...
@@ -1787,7 +1788,7 @@ text-transform: uppercase;
}
.cover-wrapper.next
{
top
:
100%
;
display
:
block
;
display
:
block
;
}
.cover-wrapper.last
{
/*z-index: 0;*/
...
...
@@ -1822,11 +1823,11 @@ text-transform: uppercase;
}
.panel
.product-list
article
{
/* height: 195px;*/
width
:
170px
;
display
:
inline-block
;
cursor
:
pointer
;
margin-bottom
:
12px
;
position
:
relative
;
width
:
170px
;
display
:
inline-block
;
cursor
:
pointer
;
margin-bottom
:
12px
;
position
:
relative
;
}
.product-list
article
.article-bg
{
opacity
:
0.1
;
...
...
wp-content/themes/nap/assets/js/main.js
View file @
bbd65944
...
...
@@ -37,7 +37,7 @@ $(function(){
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
},
0
)
});
});
});
//Get file name of uploaded file
$
(
'#file-p'
).
on
(
'change'
,
function
(
e
){
var
fileName
=
e
.
target
.
files
[
0
].
name
;
...
...
@@ -164,59 +164,58 @@ $(function(){
}
else
{
$this
.
removeClass
(
'active'
);
$this
.
find
(
'.bloc-content'
).
slideUp
(
'slow'
);
//$('.commercial').slideDown('slow');
}
}
}).
on
(
'click'
,
'.filter-bloc li:not(.disabled,.reinit)'
,
function
(
e
){
e
.
stopPropagation
();
$
(
this
).
toggleClass
(
'selected'
);
var
e
=
$
(
this
).
parent
().
find
(
'.selected'
).
length
,
parentFilter
=
$
(
this
).
parent
().
parent
().
parent
();
e
?
parentFilter
.
addClass
(
'selected-filter'
)
:
parentFilter
.
removeClass
(
'selected-filter'
)
;
}).
on
(
'click'
,
'.filter-bloc .reinit'
,
function
(){
selector
=
$
(
this
).
parent
().
parent
();
selector
.
parent
().
reinitFilter
();
selector
.
find
(
'li'
).
reinitFilter
();
}).
on
(
'click'
,
'.reinit-all'
,
function
(){
$
(
'.filter-bloc , .filter-bloc li'
).
reinitFilter
();
});
}
$
.
fn
.
changeProductImageBg
=
function
(){
var
selectedColor
=
checkWhiteColor
(
$
(
this
).
data
(
"color"
)),
selectedImage
=
$
(
this
).
data
(
"image"
),
linkProduct
=
$
(
this
).
data
(
"link"
),
tl
=
new
TimelineMax
(),
container
=
$
(
this
).
parent
().
parent
();
container
.
find
(
'.article-bg'
).
css
({
"background-color"
:
selectedColor
,
opacity
:
'0.1'
});
container
.
find
(
'img'
).
attr
({
'src'
:
selectedImage
,
'data-link'
:
linkProduct
});
tl
.
fromTo
(
container
.
find
(
'img'
),
1
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
}
$
.
fn
.
animatePageScroll
=
function
(
element
,
duration
)
{
return
$
(
this
).
fromTo
(
element
,
duration
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
0.7
);
}
$
.
fn
.
fullpageSlide
=
function
(){
var
timeout
=
1.7
,
duration
=
1.2
;
setTimeout
(
function
(){
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollIn'
);
},
2000
);
$
(
"#fullpage .section"
).
first
().
addClass
(
'first'
);
$
(
this
).
fullpage
({
verticalCentered
:
false
,
css3
:
false
,
scrollingSpeed
:
1500
,
lazyLoading
:
false
,
fixedElements
:
'footer'
,
controlArrows
:
true
,
fitToSectionDelay
:
800000
,
fadingEffect
:
true
,
afterLoad
:
function
(
anchor
,
index
){
tl1
=
new
TimelineMax
();
var
firstSection
=
$
(
"#fullpage .section.first"
);
}).
on
(
'click'
,
'.filter-bloc li:not(.disabled,.reinit)'
,
function
(
e
){
e
.
stopPropagation
();
$
(
this
).
toggleClass
(
'selected'
);
var
e
=
$
(
this
).
parent
().
find
(
'.selected'
).
length
,
parentFilter
=
$
(
this
).
parent
().
parent
().
parent
();
e
?
parentFilter
.
addClass
(
'selected-filter'
)
:
parentFilter
.
removeClass
(
'selected-filter'
)
;
}).
on
(
'click'
,
'.filter-bloc .reinit'
,
function
(){
selector
=
$
(
this
).
parent
().
parent
();
selector
.
parent
().
reinitFilter
();
selector
.
find
(
'li'
).
reinitFilter
();
}).
on
(
'click'
,
'.reinit-all'
,
function
(){
$
(
'.filter-bloc , .filter-bloc li'
).
reinitFilter
();
});
}
$
.
fn
.
changeProductImageBg
=
function
(){
var
selectedColor
=
checkWhiteColor
(
$
(
this
).
data
(
"color"
)),
selectedImage
=
$
(
this
).
data
(
"image"
),
linkProduct
=
$
(
this
).
data
(
"link"
),
tl
=
new
TimelineMax
(),
container
=
$
(
this
).
parent
().
parent
();
container
.
find
(
'.article-bg'
).
css
({
"background-color"
:
selectedColor
,
opacity
:
'0.1'
});
container
.
find
(
'img'
).
attr
({
'src'
:
selectedImage
,
'data-link'
:
linkProduct
});
tl
.
fromTo
(
container
.
find
(
'img'
),
1
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
}
$
.
fn
.
animatePageScroll
=
function
(
element
,
duration
)
{
return
$
(
this
).
fromTo
(
element
,
duration
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
0.7
);
}
$
.
fn
.
fullpageSlide
=
function
(){
var
timeout
=
1.7
,
duration
=
1.2
;
setTimeout
(
function
(){
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollIn'
);
},
2000
);
$
(
"#fullpage .section"
).
first
().
addClass
(
'first'
);
$
(
this
).
fullpage
({
verticalCentered
:
false
,
css3
:
false
,
scrollingSpeed
:
1500
,
lazyLoading
:
false
,
fixedElements
:
'footer'
,
controlArrows
:
true
,
fitToSectionDelay
:
800000
,
fadingEffect
:
true
,
afterLoad
:
function
(
anchor
,
index
){
tl1
=
new
TimelineMax
();
var
firstSection
=
$
(
"#fullpage .section.first"
);
//tl1.animatePageScroll(firstSection,duration);
//console.log(animation);
tl1
.
fromTo
(
firstSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
...
...
@@ -256,14 +255,11 @@ $(function(){
}
},
});
$
(
document
).
on
(
'click'
,
'.moveDown'
,
function
(){
$
.
fn
.
fullpage
.
moveSectionDown
();
});
}
$
.
fn
.
getMenuBg
=
function
(){
//debugger;
$
(
document
).
on
(
'click'
,
'.moveDown'
,
function
(){
$
.
fn
.
fullpage
.
moveSectionDown
();
});
}
$
.
fn
.
getMenuBg
=
function
(){
var
imgSrc
=
$
(
'header .nav-content > ul'
).
find
(
' > li.current'
).
data
(
'img'
);
navwWidth
=
$
(
'.nav-wrapper'
).
width
();
$
(
'.container-bg'
).
css
({
...
...
@@ -349,7 +345,7 @@ $.fn.animation = function(){
setTimeout
(
function
(){
$
(
'.form-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated fadeInUp'
)},
1000
)
animateOnScroll
();
}
function
onScrollCover
(
direction
){
function
onScrollCover
(){
cover
=
$
(
'.subcat a.active'
).
attr
(
"href"
);
$
(
'.cover-wrapper'
).
each
(
function
()
{
coverWrapper
=
$
(
this
).
data
(
'cat'
);
...
...
@@ -365,32 +361,20 @@ function onScrollCover(direction){
};
var
lastScrollTop
=
0
;
function
onScroll
(
event
){
var
st
=
$
(
this
).
scrollTop
();
if
(
st
>
lastScrollTop
){
var
direction
=
"down"
;
}
else
if
(
st
===
lastScrollTop
)
{
//In IE this is an important condition because there seems to be some instances where the last scrollTop is equal to the new one
}
else
{
var
direction
=
"up"
;
}
lastScrollTop
=
st
;
var
scrollPos
=
$
(
this
).
scrollTop
(),
var
scrollPos
=
$
(
this
).
scrollTop
(),
//items = event.data.items;
items
=
"li .subcat a"
;
if
(
timer
)
clearTimeout
(
timer
);
timer
=
setTimeout
(
function
(){
onScrollCover
(
direction
);
onScrollCover
();
},
330
);
$
(
items
).
each
(
function
()
{
var
currLink
=
$
(
this
);
var
refElement
=
$
(
currLink
.
attr
(
"href"
));
//console.log(currLink);
if
(
refElement
.
length
&&
refElement
.
position
().
top
-
2
0
<=
scrollPos
&&
refElement
.
position
().
top
+
refElement
.
height
()
>
scrollPos
)
{
if
(
refElement
.
length
&&
refElement
.
position
().
top
-
10
0
<=
scrollPos
&&
refElement
.
position
().
top
+
refElement
.
height
()
>
scrollPos
)
{
$
(
'.subcat a'
).
removeClass
(
"active"
);
currLink
.
addClass
(
"active"
);
if
(
$
(
'nav ul ul'
).
find
(
'li.active'
)){
...
...
@@ -407,8 +391,6 @@ $(items).each(function () {
currLink
.
removeClass
(
"active"
);
}
});
}
function
scrollAnchor
(
elemId
,
skipZero
){
$
(
'.subcat a[href^="#"]'
).
on
(
'click'
,
function
(
e
)
{
...
...
@@ -422,18 +404,11 @@ function scrollAnchor(elemId, skipZero){
temp
=
0
;
$target
=
$
(
target
);
$parent
=
$
(
'#load-page'
);
// console.log($parent.position().top);
//console.log($(this).position().top);
//console.log(target , $target.offset().top);
//console.log('parent' , $parent.offset().top);
//if (skipZero && $target.offset().top === $parent.offset().top) {return;}
$
(
elemId
).
stop
().
animate
({
'scrollTop'
:
$target
.
position
().
top
-
temp
//- $parent.offset().top
},
1000
,
'swing'
,
function
()
{
window
.
location
.
hash
=
target
;
// $(document).on("scroll", onS1croll);
});
});
});
}
$
(
window
).
load
(
function
()
{
...
...
@@ -442,10 +417,6 @@ $(window).load( function() {
var
timer
;
$
(
window
).
scroll
(
function
(
e
)
{
onScroll
(
e
)
/* clearTimeout(timer);
timer = setTimeout(function() {
$(window).trigger("scrollStop");
}, 330);*/
});
//$(window).bind("scrollStop",onScroll)
$
(
document
).
ready
(
function
(){
...
...
@@ -472,13 +443,9 @@ $(document).ready(function(){
$
.
fn
.
responsive
();
$
(
'.list-color-filter li'
).
setBgColorList
();
$
.
fn
.
animation
();
//Global animation for entire site
//TODO
$
(
'.cover-wrapper'
).
last
().
addClass
(
'last'
);
$
(
'.cover-wrapper'
).
first
().
addClass
(
'first'
);
});
//end document ready
$
(
window
).
resize
(
function
()
{
...
...
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