Skip to content

Commit

Permalink
内置AOS和TypedJS,避免CDN网络问题
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Jul 12, 2024
1 parent 50c687f commit d4c9f2c
Show file tree
Hide file tree
Showing 6 changed files with 2,218 additions and 16 deletions.
10 changes: 2 additions & 8 deletions components/AOSAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ import { useEffect } from 'react'
export default function AOSAnimation() {
const initAOS = async () => {
Promise.all([
loadExternalResource(
'https://cdn.bootcdn.net/ajax/libs/aos/2.3.4/aos.js',
'js'
),
loadExternalResource(
'https://cdn.bootcdn.net/ajax/libs/aos/2.3.4/aos.css',
'css'
)
loadExternalResource('/js/aos.js', 'js'),
loadExternalResource('/css/aos.css', 'css')
]).then(() => {
if (window.AOS) {
window.AOS.init()
Expand Down
Loading

0 comments on commit d4c9f2c

Please sign in to comment.