RM AOS
This commit is contained in:
parent
4b99bbfcba
commit
47dfdcca4d
5 changed files with 3 additions and 64 deletions
|
|
@ -31,7 +31,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@researchgate/react-intersection-observer": "^0.7.0",
|
||||
"aos": "^2.2.0",
|
||||
"core-js": "^2.5.3",
|
||||
"date-fns": "^1.29.0",
|
||||
"dom-form-serializer": "^1.0.7",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import Nav from './components/Nav'
|
|||
import Footer from './components/Footer'
|
||||
import GithubCorner from './components/GithubCorner'
|
||||
import ServiceWorkerNotifications from './components/ServiceWorkerNotifications'
|
||||
import AOS from './components/AOS'
|
||||
import data from './data.json'
|
||||
import { slugify } from './util/url'
|
||||
import { documentHasTerm, getCollectionTerms } from './util/collection'
|
||||
|
|
@ -52,7 +51,6 @@ class App extends Component {
|
|||
return (
|
||||
<Router>
|
||||
<div className='React-Wrap'>
|
||||
<AOS options={{ duration: 250 }} />
|
||||
<ScrollToTop />
|
||||
<ServiceWorkerNotifications reloadOnUpdate />
|
||||
<GithubCorner url='https://github.com/Jinksi/netlify-cms-react-starter' />
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
import React from 'react'
|
||||
import AOS from 'aos'
|
||||
import Helmet from 'react-helmet'
|
||||
import 'aos/dist/aos.css'
|
||||
|
||||
export default ({ options }) => {
|
||||
// See more: https://github.com/michalsnik/aos
|
||||
const defaultOptions = {
|
||||
offset: 300,
|
||||
duration: 300,
|
||||
easing: 'ease-out-sine',
|
||||
delay: 0,
|
||||
once: true
|
||||
}
|
||||
|
||||
AOS.init({ ...defaultOptions, ...options })
|
||||
|
||||
return (
|
||||
<Helmet>
|
||||
<noscript>{`
|
||||
<style>
|
||||
/* override AOS css if no JS */
|
||||
[data-aos] {
|
||||
opacity: 1 !important;
|
||||
transform: translate(0) scale(1) !important;
|
||||
}
|
||||
</style>
|
||||
`}</noscript>
|
||||
</Helmet>
|
||||
)
|
||||
}
|
||||
|
|
@ -19,16 +19,9 @@ const PageHeader = ({
|
|||
<BackgroundImage src={backgroundImage} opacity={0.4} />
|
||||
)}
|
||||
<div className='container relative'>
|
||||
<h1 className='PageHeader--Title' data-aos='fade'>
|
||||
{title}
|
||||
</h1>
|
||||
<h1 className='PageHeader--Title'>{title}</h1>
|
||||
{subtitle && (
|
||||
<Content
|
||||
className='PageHeader--Subtitle'
|
||||
data-aos='fade'
|
||||
data-aos-duration='400'
|
||||
src={subtitle}
|
||||
/>
|
||||
<Content className='PageHeader--Subtitle' src={subtitle} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
22
yarn.lock
22
yarn.lock
|
|
@ -316,14 +316,6 @@ anymatch@^2.0.0:
|
|||
micromatch "^3.1.4"
|
||||
normalize-path "^2.1.1"
|
||||
|
||||
aos@^2.2.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/aos/-/aos-2.3.0.tgz#f56821f0508ca9f48210e25401ba8373ffdacda3"
|
||||
dependencies:
|
||||
classlist-polyfill "^1.0.3"
|
||||
lodash.debounce "^4.0.6"
|
||||
lodash.throttle "^4.0.1"
|
||||
|
||||
append-transform@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"
|
||||
|
|
@ -1745,10 +1737,6 @@ 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"
|
||||
|
||||
clean-css@4.1.x:
|
||||
version "4.1.11"
|
||||
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a"
|
||||
|
|
@ -5236,10 +5224,6 @@ lodash.cond@^4.3.0:
|
|||
version "4.5.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5"
|
||||
|
||||
lodash.debounce@^4.0.6:
|
||||
version "4.0.8"
|
||||
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
|
||||
|
||||
lodash.defaults@^4.0.1, lodash.defaults@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
|
||||
|
|
@ -5297,10 +5281,6 @@ 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"
|
||||
|
||||
lodash.unescape@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
|
||||
|
|
@ -7942,7 +7922,7 @@ set-value@^2.0.0:
|
|||
is-plain-object "^2.0.3"
|
||||
split-string "^3.0.1"
|
||||
|
||||
setimmediate@^1.0.4, setimmediate@^1.0.5:
|
||||
setimmediate@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue