mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 23:16:51 +00:00
内置AOS和TypedJS,避免CDN网络问题
This commit is contained in:
@@ -26,10 +26,7 @@ const Hero = props => {
|
||||
updateHeaderHeight()
|
||||
|
||||
if (!typed && window && document.getElementById('typed')) {
|
||||
loadExternalResource(
|
||||
'https://cdn.bootcdn.net/ajax/libs/typed.js/2.0.12/typed.min.js',
|
||||
'js'
|
||||
).then(() => {
|
||||
loadExternalResource('/js/typed.min.js', 'js').then(() => {
|
||||
if (window.Typed) {
|
||||
changeType(
|
||||
new window.Typed('#typed', {
|
||||
|
||||
@@ -21,10 +21,7 @@ const Hero = props => {
|
||||
useEffect(() => {
|
||||
updateHeaderHeight()
|
||||
if (!typed && window && document.getElementById('typed')) {
|
||||
loadExternalResource(
|
||||
'https://cdn.bootcdn.net/ajax/libs/typed.js/2.0.12/typed.min.js',
|
||||
'js'
|
||||
).then(() => {
|
||||
loadExternalResource('/js/typed.min.js', 'js').then(() => {
|
||||
if (window.Typed) {
|
||||
changeType(
|
||||
new window.Typed('#typed', {
|
||||
|
||||
Reference in New Issue
Block a user