Skip to content

Commit

Permalink
feat: add plugin aos
Browse files Browse the repository at this point in the history
  • Loading branch information
RSurya99 committed Jan 30, 2022
1 parent c79a612 commit 820f45a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 4 deletions.
9 changes: 9 additions & 0 deletions mixins/aos.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// mixins/aos.js
import AOS from 'aos'
import 'aos/dist/aos.css'

export default {
mounted() {
AOS.init({ disable: 'phone' })
},
}
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
},
],
},
css: ['@/assets/css/main.css'],
css: ['@/assets/css/main.css', 'aos/dist/aos.css'],
plugins: ['~/plugins/smooth-scroll.js', '~/plugins/mdi.js'],
components: true,
buildModules: ['@nuxtjs/eslint-module', '@nuxt/postcss8'],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"dependencies": {
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.4.0",
"aos": "^2.3.4",
"chart.js": "2.9.4",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
Expand Down
10 changes: 8 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<template>
<div class="w-full">
<!-- Hero section -->
<section id="hero" class="w-full pb-24">
<section id="hero" class="w-full pb-24" data-aos="fade-down">
<BaseSection>
<div class="col-span-12 lg:col-span-6 mt-12 xl:mt-20 space-y-4 sm:space-y-6 px-6 text-center sm:text-left">
<span class="text-base text-gradient font-semibold uppercase">Sign Up Today</span>
<h1 class="text-[2.5rem] sm:text-5xl xl:text-6xl font-bold leading-tight capitalize sm:pr-8 xl:pr-10">
<h1
data-aos="fade-right"
data-aos-once="true"
class="text-[2.5rem] sm:text-5xl xl:text-6xl font-bold leading-tight capitalize sm:pr-8 xl:pr-10"
>
The World's <span class="text-header-gradient">Fastest Growing</span> Crypto Web App
</h1>
<p class="paragraph hidden sm:block">
Expand Down Expand Up @@ -254,8 +258,10 @@
</template>

<script>
import aosMixin from '@/mixins/aos'
export default {
name: 'IndexPage',
mixins: [aosMixin],
data() {
return {
selected: 0,
Expand Down
21 changes: 20 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,15 @@ anymatch@^3.0.0, anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"

aos@^2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/aos/-/aos-2.3.4.tgz#eb1c29f5c1806a197cf6323080747547edd3db8e"
integrity sha512-zh/ahtR2yME4I51z8IttIt4lC1Nw0ktsFtmeDzID1m9naJnWXhCoARaCgNOGXb5CLy3zm+wqmRAEgMYB5E2HUw==
dependencies:
classlist-polyfill "^1.0.3"
lodash.debounce "^4.0.6"
lodash.throttle "^4.0.1"

aproba@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
Expand Down Expand Up @@ -2608,6 +2617,11 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

classlist-polyfill@^1.0.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz#935bc2dfd9458a876b279617514638bcaa964a2e"
integrity sha1-k1vC39lFiodrJ5YXUUY4vKqWSi4=

clean-css@^4.2.1, clean-css@^4.2.3:
version "4.2.4"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.4.tgz#733bf46eba4e607c6891ea57c24a989356831178"
Expand Down Expand Up @@ -5285,7 +5299,7 @@ lodash._reinterpolate@^3.0.0:
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=

lodash.debounce@^4.0.8:
lodash.debounce@^4.0.6, lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
Expand Down Expand Up @@ -5320,6 +5334,11 @@ lodash.templatesettings@^4.0.0:
dependencies:
lodash._reinterpolate "^3.0.0"

lodash.throttle@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=

lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
Expand Down

0 comments on commit 820f45a

Please sign in to comment.