Skip to content

Commit

Permalink
Merge pull request #253 from rupeshv2121/rupesh10
Browse files Browse the repository at this point in the history
Added Animation
  • Loading branch information
Ojas-Arora authored Feb 9, 2025
2 parents 8c08e0f + 2bce6ef commit 88a021f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 36 deletions.
17 changes: 16 additions & 1 deletion contributors/contributor.css
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ body.dark p {
backdrop-filter: blur(5px);
width: 270px;
margin-bottom: 40px;
z-index: 1;
border: 1px white solid;
}

Expand Down Expand Up @@ -760,6 +759,22 @@ body.dark p {
}

/* Contributor Name */

@keyframes scaleAnimation {
from {
transform: scale(0.5);
}
to {
transform: scale(1.3);
}
}

.contributor-card {
animation: scaleAnimation linear;
animation-timeline: view();
animation-range: entry 30% cover 70%;
}

.contributor-card h3 {
margin: 15px 0;
font-size: 1.6rem;
Expand Down
59 changes: 25 additions & 34 deletions contributors/contributor.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,38 +105,6 @@ <h1 class="title">Contributors of Ajivika</h1>
<!-- Dynamic contributors will be added here -->
</div>
</div>

<script src="contributor.js"></script>


<script>
// hamburger menu js
function toggleMenu() {
const navLinks = document.querySelector('.nav-links');
navLinks.classList.toggle('active');
}
</script>



<section class="section home-section">
<div id="google_element"></div>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=loadGoogleTranslate" onerror="handleError(this)"></script>
<script type="text/javascript">
function loadGoogleTranslate() {
new google.translate.TranslateElement({
pageLanguage: "en",
includedLanguages: "en,hi,pa,sa,mr,ur,bn,es,fr,de,it",
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, "google_element");
}
function handleError(e) {
console.error("Error loading Google Translate script:", e);
}
</script>



<!-- Footer -->
<footer style="background-color: #222; color: #fff; padding: 20px 10px;">
<div class="footer-container" style="display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; max-width: 1200px; margin: auto;">
Expand Down Expand Up @@ -229,9 +197,32 @@ <h3 style="color: #d6a52b;">Subscribe to Our Newsletter</h3>
<button class="image-button">
<img src="image.png" alt="Image Button" class="image-icon">
</button>

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js" integrity="sha512-7eHRwcbYkK4d9g/6tD/mhkf++eoTHwpNM9woBxtPUBWm67zeAfFC+HrdoE2GanKeocly/VxeLvIqwvCdk7qScg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="../index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js" integrity="sha512-onMTRKJBKz8M1TnqqDuGBlowlH0ohFzMXYRNebz+yOcc5TQr/zAKsthzhuv0hiyUKEiQEQXEynnXCvNTOk50dg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="contributor.js"></script>
<script>
// hamburger menu js
function toggleMenu() {
const navLinks = document.querySelector('.nav-links');
navLinks.classList.toggle('active');
}
</script>
<section class="section home-section">
<div id="google_element"></div>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=loadGoogleTranslate" onerror="handleError(this)"></script>
<script type="text/javascript">
function loadGoogleTranslate() {
new google.translate.TranslateElement({
pageLanguage: "en",
includedLanguages: "en,hi,pa,sa,mr,ur,bn,es,fr,de,it",
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, "google_element");
}
function handleError(e) {
console.error("Error loading Google Translate script:", e);
}
</script>

<script>
let slideIndex = 0;
showSlides();
Expand Down
22 changes: 22 additions & 0 deletions contributors/contributor.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,25 @@ for your future endeavors.`;

// Fetch and render contributors on page load
fetchContributors();

gsap.from(".logo", {
opacity: 0,
y: -30,
delay: 0.5,
duration: 1
})

const tl = gsap.timeline();
tl.from(".nav-links li", {
delay: 1,
opacity: 0,
stagger: 0.25,
duration: 1,
y: -30
})

gsap.from("#contributors .contributor-card button", {
opacity: 0,
duration: 1,
y: -200,
})
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gsap.from(".options-container .option-card", {
trigger: ".options-container",
scroller: "body",
scrub: 2,
start: "top 50%",
start: "top 70%",
end: "top 70%",
pin: true
}
Expand Down

0 comments on commit 88a021f

Please sign in to comment.