generated from COPS-IITBHU/ubiquitous_template
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add animation on scroll in about-us page. #66
Open
somesh202
wants to merge
3
commits into
COPS-IITBHU:main
Choose a base branch
from
somesh202:anim-about-us
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
</h1> | ||
<section class="w-9/10 mx-auto"> | ||
<figure v-for="(con, idx) in content" :key="con.heading"> | ||
<about-us-card :index="idx" :heading="con.heading" :image="con.image" :text="con.text" /> | ||
<about-us-card :class="con.class" :index="idx" :heading="con.heading" :image="con.image" :text="con.text" /> | ||
<nuxt-img | ||
v-if="!(idx & 1) && (idx != content.length - 1)" | ||
src="/aboutus/4.webp" | ||
|
@@ -66,14 +66,14 @@ | |
|
||
<script lang="ts"> | ||
import { defineComponent } from '@nuxtjs/composition-api' | ||
import { gsap } from 'gsap' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gsap isn't there in package.json |
||
import AboutUsCard from '~/components/about-us/aboutuscard.vue' | ||
import aboutuslogo from '~/components/about-us/aboutuslogo.vue' | ||
import achievementslogo from '~/components/about-us/achievementslogo.vue' | ||
import carousel3d from '~/components/about-us/carousel/carousel-3d.vue' | ||
import slide from '~/components/about-us/carousel/carousel-slide.vue' | ||
import youtube from '~/components/about-us/youtube.vue' | ||
import LoadingSpinner from '~/components/LoadingSpinner.vue' | ||
|
||
export default defineComponent({ | ||
components: { | ||
aboutuslogo, | ||
|
@@ -89,6 +89,7 @@ export default defineComponent({ | |
slides: [] as any, | ||
content: [ | ||
{ | ||
class: 'text1', | ||
heading: 'WHAT IS SDG?', | ||
image: '/aboutus/1.webp', | ||
text: `One of the prominent pillars of COPS, IIT (BHU) is SDG. With the | ||
|
@@ -102,6 +103,7 @@ export default defineComponent({ | |
a fully functional mobile application.` | ||
}, | ||
{ | ||
class: 'text2', | ||
heading: 'WHAT WE DO?', | ||
image: '/aboutus/2.webp', | ||
text: `Whether Mobile Development, Desktop Development, Web Development, Game | ||
|
@@ -114,6 +116,7 @@ export default defineComponent({ | |
of our sought-after workshops.` | ||
}, | ||
{ | ||
class: 'text3', | ||
heading: 'OUR AREAS OF INTEREST', | ||
image: '/aboutus/3.webp', | ||
text: `Our motto is constantly learning and revamping. Hackalog, our very own | ||
|
@@ -143,6 +146,26 @@ export default defineComponent({ | |
'One of the most prominent pillars of COPS, IIT (BHU) is SDG. We at Software Development Group are here to unravel all these mysteries for you to perceive, prepare and produce. We got you taken care of, from displaying Hello World on your Local Host to developing a fully functional mobile application. Whether Mobile Development, Desktop Development, Web Development, Game Development, or Cloud Development, we manufacture all units here.' | ||
} | ||
] | ||
}, | ||
mounted () { | ||
this.content.forEach((idx) => { | ||
gsap.timeline({ | ||
scrollTrigger: { | ||
trigger: '.' + idx.class, | ||
start: 'center center', | ||
end: 'bottom top', | ||
scrub: true, | ||
pin: true | ||
} | ||
}) | ||
.from('.' + idx.class, { | ||
opacity: 0, | ||
y: 50 | ||
}) | ||
.to('.' + idx.class, { | ||
opacity: 1 | ||
}) | ||
}) | ||
} | ||
}) | ||
</script> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove nuxt-gsap-module