Added scroll animations for all pages
This commit is contained in:
1 parent
2d758be092
commit
da2a1f9519
6 files changed
+88
-40
No files matched your search
+9
-9
@@ -136,11 +136,11 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="meet-the-team-section">
|
<section class="meet-the-team-section">
|
||||||
<div class="heading">
|
<div class="heading animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Meet our Team</h2>
|
<h2>Meet our Team</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="meet-the-team">
|
<div class="meet-the-team animate-on-scroll">
|
||||||
<img
|
<img
|
||||||
class="group-photo"
|
class="group-photo"
|
||||||
src="img/group.PNG"
|
src="img/group.PNG"
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mission-grid">
|
<div class="mission-grid">
|
||||||
<div class="mission">
|
<div class="mission animate-on-scroll">
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<img
|
<img
|
||||||
class="sunburst"
|
class="sunburst"
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
neighbor in Sioux County goes hungry.
|
neighbor in Sioux County goes hungry.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mission">
|
<div class="mission animate-on-scroll-delay">
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<img
|
<img
|
||||||
class="sunburst"
|
class="sunburst"
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="about-cta">
|
<div class="about-cta animate-on-scroll">
|
||||||
<h3>We Need Your Help!</h3>
|
<h3>We Need Your Help!</h3>
|
||||||
<p>
|
<p>
|
||||||
Volunteers are primarily needed on Wedesdays for 2 shifts (1:30 -
|
Volunteers are primarily needed on Wedesdays for 2 shifts (1:30 -
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
>Volunteer Today</a
|
>Volunteer Today</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<p class="equal-text">
|
<p class="equal-text animate-on-scroll">
|
||||||
Hope Food Pantry is an equal opportunity provider.
|
Hope Food Pantry is an equal opportunity provider.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
@@ -305,15 +305,15 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="visit-section">
|
<section class="visit-section">
|
||||||
<div class="heading">
|
<div class="heading animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Visit Us</h2>
|
<h2>Visit Us</h2>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p class="animate-on-scroll">
|
||||||
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
||||||
Talitha Koum Campus in Sioux Center, IA.
|
Talitha Koum Campus in Sioux Center, IA.
|
||||||
</p>
|
</p>
|
||||||
<div class="visit-maps">
|
<div class="visit-maps animate-on-scroll">
|
||||||
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
||||||
<img
|
<img
|
||||||
src="/img/directions.jpg"
|
src="/img/directions.jpg"
|
||||||
|
|||||||
@@ -1112,3 +1112,33 @@ address {
|
|||||||
padding: 5rem;
|
padding: 5rem;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Animations */
|
||||||
|
|
||||||
|
.animate-on-scroll {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(3rem);
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
transition-duration: 0.5s;
|
||||||
|
transition-timing-function: ease;
|
||||||
|
transition-delay: 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-on-scroll.visible {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-on-scroll-delay {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(3rem);
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
transition-duration: 0.5s;
|
||||||
|
transition-timing-function: ease;
|
||||||
|
transition-delay: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-on-scroll-delay.visible {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
@@ -239,15 +239,15 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="visit-section">
|
<section class="visit-section">
|
||||||
<div class="heading">
|
<div class="heading animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Visit Us</h2>
|
<h2>Visit Us</h2>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p class="animate-on-scroll">
|
||||||
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
||||||
Talitha Koum Campus in Sioux Center, IA.
|
Talitha Koum Campus in Sioux Center, IA.
|
||||||
</p>
|
</p>
|
||||||
<div class="visit-maps">
|
<div class="visit-maps animate-on-scroll">
|
||||||
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
||||||
<img
|
<img
|
||||||
src="/img/directions.jpg"
|
src="/img/directions.jpg"
|
||||||
|
|||||||
+15
-15
@@ -90,17 +90,17 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="how-to-help-section">
|
<section class="how-to-help-section">
|
||||||
<div class="heading left-align">
|
<div class="heading left-align animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>How to Help</h2>
|
<h2>How to Help</h2>
|
||||||
</div>
|
</div>
|
||||||
<p class="header-sub-text left-align">
|
<p class="header-sub-text left-align animate-on-scroll">
|
||||||
Contributing to this ministry strengthens our shared purpose and
|
Contributing to this ministry strengthens our shared purpose and
|
||||||
amplifies the positive impact we can achieve in our community. Your
|
amplifies the positive impact we can achieve in our community. Your
|
||||||
involvement helps sustain our pantry and reach those who need them
|
involvement helps sustain our pantry and reach those who need them
|
||||||
most.
|
most.
|
||||||
</p>
|
</p>
|
||||||
<div class="how-to-help-grid">
|
<div class="how-to-help-grid animate-on-scroll">
|
||||||
<article class="how-to-help-card">
|
<article class="how-to-help-card">
|
||||||
<div class="sub-heading sub-heading-yellow">
|
<div class="sub-heading sub-heading-yellow">
|
||||||
<img
|
<img
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<p class="verse">
|
<p class="verse animate-on-scroll">
|
||||||
And as for you, brothers and sisters, never tire of doing what is
|
And as for you, brothers and sisters, never tire of doing what is
|
||||||
good. <br />- 2 Thessalonians 3:13 -
|
good. <br />- 2 Thessalonians 3:13 -
|
||||||
</p>
|
</p>
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
<h2>Guest Guidelines</h2>
|
<h2>Guest Guidelines</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="guest-grid">
|
<div class="guest-grid">
|
||||||
<article class="guest-text">
|
<article class="guest-text animate-on-scroll">
|
||||||
<div class="sub-heading">
|
<div class="sub-heading">
|
||||||
<img class="icon" src="/img/icons/shop.svg" alt="shop icon" />
|
<img class="icon" src="/img/icons/shop.svg" alt="shop icon" />
|
||||||
<h3>Visit Frequency</h3>
|
<h3>Visit Frequency</h3>
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
very helpful to our volunteers.
|
very helpful to our volunteers.
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
<div class="guest-img-wrapper">
|
<div class="guest-img-wrapper animate-on-scroll-delay">
|
||||||
<img
|
<img
|
||||||
class="guest-img"
|
class="guest-img"
|
||||||
src="/img/gallery/drivethru.jpg"
|
src="/img/gallery/drivethru.jpg"
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
<span class="step-number">1</span>
|
<span class="step-number">1</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="guest-img-wrapper">
|
<div class="guest-img-wrapper animate-on-scroll">
|
||||||
<img
|
<img
|
||||||
class="guest-img"
|
class="guest-img"
|
||||||
src="/img/gallery/clothing.jpg"
|
src="/img/gallery/clothing.jpg"
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
<span class="step-number">2</span>
|
<span class="step-number">2</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<article class="guest-text">
|
<article class="guest-text animate-on-scroll-delay">
|
||||||
<div class="sub-heading">
|
<div class="sub-heading">
|
||||||
<img
|
<img
|
||||||
class="icon"
|
class="icon"
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
your vehicle.
|
your vehicle.
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
<article class="guest-text">
|
<article class="guest-text animate-on-scroll">
|
||||||
<div class="sub-heading">
|
<div class="sub-heading">
|
||||||
<img class="icon" src="/img/icons/write.svg" alt="paper icon" />
|
<img class="icon" src="/img/icons/write.svg" alt="paper icon" />
|
||||||
<h3>Paperwork & Forms</h3>
|
<h3>Paperwork & Forms</h3>
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
paperwork for our records.
|
paperwork for our records.
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
<div class="guest-img-wrapper">
|
<div class="guest-img-wrapper animate-on-scroll-delay">
|
||||||
<img
|
<img
|
||||||
class="guest-img"
|
class="guest-img"
|
||||||
src="/img/paperwork.jpg"
|
src="/img/paperwork.jpg"
|
||||||
@@ -283,7 +283,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="testimonial-section">
|
<section class="testimonial-section">
|
||||||
<div class="testimonials">
|
<div class="testimonials animate-on-scroll">
|
||||||
<div class="heading left-align">
|
<div class="heading left-align">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Testimonials</h2>
|
<h2>Testimonials</h2>
|
||||||
@@ -334,7 +334,7 @@
|
|||||||
/>
|
/>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
<div class="testimonial-image-wrapper">
|
<div class="testimonial-image-wrapper animate-on-scroll-delay">
|
||||||
<div class="testimonial-img">
|
<div class="testimonial-img">
|
||||||
<img
|
<img
|
||||||
src="/img/testimonial.jpg"
|
src="/img/testimonial.jpg"
|
||||||
@@ -498,15 +498,15 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="visit-section">
|
<section class="visit-section">
|
||||||
<div class="heading">
|
<div class="heading animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Visit Us</h2>
|
<h2>Visit Us</h2>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p class="animate-on-scroll">
|
||||||
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
||||||
Talitha Koum Campus in Sioux Center, IA.
|
Talitha Koum Campus in Sioux Center, IA.
|
||||||
</p>
|
</p>
|
||||||
<div class="visit-maps">
|
<div class="visit-maps animate-on-scroll">
|
||||||
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
||||||
<img
|
<img
|
||||||
src="/img/directions.jpg"
|
src="/img/directions.jpg"
|
||||||
|
|||||||
@@ -33,3 +33,21 @@ const headerEl = document.querySelector(".header");
|
|||||||
btnNavEl.addEventListener("click", function () {
|
btnNavEl.addEventListener("click", function () {
|
||||||
headerEl.classList.toggle("nav-open");
|
headerEl.classList.toggle("nav-open");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Scroll Animations
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
const observerOptions = { root: null, rootMargin: "0px", threshold: 0.75 };
|
||||||
|
const onIntersection = (entries, observer) => {
|
||||||
|
entries.forEach((entry) => {
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
entry.target.classList.add("visible");
|
||||||
|
observer.unobserve(entry.target);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const observer = new IntersectionObserver(onIntersection, observerOptions);
|
||||||
|
const elementsToAnimate = document.querySelectorAll(
|
||||||
|
".animate-on-scroll, .animate-on-scroll-delay"
|
||||||
|
);
|
||||||
|
elementsToAnimate.forEach((el) => observer.observe(el));
|
||||||
|
});
|
||||||
+13
-13
@@ -79,15 +79,15 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="volunteer-roles-section">
|
<section class="volunteer-roles-section">
|
||||||
<div class="heading left-align">
|
<div class="heading left-align animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Roles & Opportunities</h2>
|
<h2>Roles & Opportunities</h2>
|
||||||
</div>
|
</div>
|
||||||
<p class="header-sub-text left-align">
|
<p class="header-sub-text left-align animate-on-scroll">
|
||||||
When you arrive, staff will tell you the tasks you will be doing based
|
When you arrive, staff will tell you the tasks you will be doing based
|
||||||
on the need for that day. <br />Assigned roles might include:
|
on the need for that day. <br />Assigned roles might include:
|
||||||
</p>
|
</p>
|
||||||
<ul class="volunteer-roles">
|
<ul class="volunteer-roles animate-on-scroll">
|
||||||
<div class="role-box left-align">
|
<div class="role-box left-align">
|
||||||
<img
|
<img
|
||||||
class="sunburst-small"
|
class="sunburst-small"
|
||||||
@@ -132,12 +132,12 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="volunteer-reasons-section">
|
<section class="volunteer-reasons-section">
|
||||||
<div class="heading">
|
<div class="heading animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Why you should volunteer</h2>
|
<h2>Why you should volunteer</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="volunteer-cards">
|
<div class="volunteer-cards">
|
||||||
<article class="volunteer-card">
|
<article class="volunteer-card animate-on-scroll">
|
||||||
<h4>
|
<h4>
|
||||||
Volunteering... <br />
|
Volunteering... <br />
|
||||||
connects you to the community.
|
connects you to the community.
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
<span class="step-number">1</span>
|
<span class="step-number">1</span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<article class="volunteer-card">
|
<article class="volunteer-card animate-on-scroll-delay">
|
||||||
<h4>
|
<h4>
|
||||||
Volunteering... <br />
|
Volunteering... <br />
|
||||||
allows you to use your skills in a productive way.
|
allows you to use your skills in a productive way.
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
<span class="step-number">2</span>
|
<span class="step-number">2</span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<article class="volunteer-card">
|
<article class="volunteer-card animate-on-scroll">
|
||||||
<h4>
|
<h4>
|
||||||
Volunteering... <br />
|
Volunteering... <br />
|
||||||
provides a sense of purpose.
|
provides a sense of purpose.
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
<span class="step-number">3</span>
|
<span class="step-number">3</span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<article class="volunteer-card">
|
<article class="volunteer-card animate-on-scroll-delay">
|
||||||
<h4>
|
<h4>
|
||||||
Volunteering... <br />
|
Volunteering... <br />
|
||||||
helps you stay physically healthy.
|
helps you stay physically healthy.
|
||||||
@@ -203,7 +203,7 @@
|
|||||||
<span class="step-number">4</span>
|
<span class="step-number">4</span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<article class="volunteer-card">
|
<article class="volunteer-card animate-on-scroll">
|
||||||
<h4>
|
<h4>
|
||||||
Volunteering... <br />
|
Volunteering... <br />
|
||||||
helps counteract the effects of stress, anger, and anxiety.
|
helps counteract the effects of stress, anger, and anxiety.
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
<span class="step-number">5</span>
|
<span class="step-number">5</span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<article class="volunteer-card">
|
<article class="volunteer-card animate-on-scroll-delay">
|
||||||
<h4>
|
<h4>
|
||||||
Volunteering... <br />
|
Volunteering... <br />
|
||||||
reflects God's love and purpose for you.
|
reflects God's love and purpose for you.
|
||||||
@@ -324,15 +324,15 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="visit-section">
|
<section class="visit-section">
|
||||||
<div class="heading">
|
<div class="heading animate-on-scroll">
|
||||||
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
<img class="sunburst" src="/img/sunburst.png" alt="sunburst icon" />
|
||||||
<h2>Visit Us</h2>
|
<h2>Visit Us</h2>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p class="animate-on-scroll">
|
||||||
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
Hope Food Pantry is open every Wednesday from 1:30-5:30 located on the
|
||||||
Talitha Koum Campus in Sioux Center, IA.
|
Talitha Koum Campus in Sioux Center, IA.
|
||||||
</p>
|
</p>
|
||||||
<div class="visit-maps">
|
<div class="visit-maps animate-on-scroll">
|
||||||
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
<img src="/img/map.png" alt="Map showing directions to the pantry" />
|
||||||
<img
|
<img
|
||||||
src="/img/directions.jpg"
|
src="/img/directions.jpg"
|
||||||
|
|||||||
Reference in new issue
Block a user