Add reveal in project section
This commit is contained in:
parent
c003ab8c96
commit
f79bee54c4
|
@ -3,7 +3,7 @@
|
||||||
class="js-parallax"
|
class="js-parallax"
|
||||||
data-rellax-speed="{{ternary rellax-speed rellax-speed 0}}"
|
data-rellax-speed="{{ternary rellax-speed rellax-speed 0}}"
|
||||||
>
|
>
|
||||||
<span class="js-reveal-block {{ternary orangeReveal "js-reveal-orange" ""}}">
|
<span class="js-reveal-block {{ternary orangeReveal "js-reveal-orange" ""}} {{ternary lightReveal "js-reveal-light" ""}}">
|
||||||
<span>{{text}}</span>
|
<span>{{text}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
{{> components/heading
|
{{> components/heading
|
||||||
text=project.header
|
text=project.header
|
||||||
|
lightReveal=true
|
||||||
class="project__header"
|
class="project__header"
|
||||||
rellax-speed="-0.2"
|
rellax-speed="-0.2"
|
||||||
}}
|
}}
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
class="project__button"
|
class="project__button"
|
||||||
backgroundColor="#ff5301"
|
backgroundColor="#ff5301"
|
||||||
blackBgHover="true"
|
blackBgHover="true"
|
||||||
|
orangeReveal=true
|
||||||
label=project.button.label
|
label=project.button.label
|
||||||
href=project.button.href
|
href=project.button.href
|
||||||
rellax-speed="0.8"
|
rellax-speed="0.8"
|
||||||
|
@ -29,12 +31,12 @@
|
||||||
|
|
||||||
<div class="project__images">
|
<div class="project__images">
|
||||||
{{#each project.images as |image|}}
|
{{#each project.images as |image|}}
|
||||||
<img
|
<div
|
||||||
src={{image.src}}
|
class="js-reveal-block project__image project__image--{{@index}} js-parallax"
|
||||||
class="project__image project__image--{{@index}} js-parallax"
|
|
||||||
alt=""
|
|
||||||
data-rellax-speed="{{ image.parallax }}"
|
data-rellax-speed="{{ image.parallax }}"
|
||||||
/>
|
>
|
||||||
|
<img src={{image.src}} alt="" />
|
||||||
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Reveal {
|
||||||
inView(REVEAL_BLOCK_SELECTOR)
|
inView(REVEAL_BLOCK_SELECTOR)
|
||||||
.on('enter', (el) => {
|
.on('enter', (el) => {
|
||||||
const randNum = Math.floor(Math.random() * 30) + 1;
|
const randNum = Math.floor(Math.random() * 30) + 1;
|
||||||
const timeout = 20 * randNum;
|
const timeout = 10 * randNum;
|
||||||
setTimeout(() => el.classList.add(ACTIVE_CLASS), timeout);
|
setTimeout(() => el.classList.add(ACTIVE_CLASS), timeout);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.js-reveal-light::before {
|
&.js-reveal-light::before {
|
||||||
background-color: $color-tangerine;
|
background-color: $color-white;
|
||||||
}
|
}
|
||||||
|
|
||||||
> * {
|
> * {
|
||||||
|
|
|
@ -77,6 +77,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
@media #{$screen-sm} {
|
@media #{$screen-sm} {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
max-width: 250px;
|
max-width: 250px;
|
||||||
|
|
Loading…
Reference in New Issue