mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-30 23:16:52 +00:00
async theme
This commit is contained in:
@@ -14,7 +14,11 @@ export default function Live2D() {
|
||||
]).then((e) => {
|
||||
if (typeof window?.loadlive2d !== 'undefined') {
|
||||
// https://github.com/xiazeyu/live2d-widget-models
|
||||
loadlive2d('live2d', BLOG.WIDGET_PET_LINK)
|
||||
try {
|
||||
loadlive2d('live2d', BLOG.WIDGET_PET_LINK)
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
|
||||
/**
|
||||
* 主题文件被加载出之前的占位符
|
||||
* @returns
|
||||
*/
|
||||
const Loading = () => {
|
||||
return <div className="w-screen h-screen flex justify-center items-center">
|
||||
<h1>Loading... <i className='ml-2 fas fa-spinner animate-spin' /></h1>
|
||||
</div>
|
||||
const Loading = (props) => {
|
||||
const { current } = props
|
||||
|
||||
return <>
|
||||
{current || <div className="w-screen h-screen flex justify-center items-center">
|
||||
<h1>Loading... <i className='ml-2 fas fa-spinner animate-spin' /></h1>
|
||||
</div>}
|
||||
</>
|
||||
}
|
||||
export default Loading
|
||||
|
||||
@@ -25,7 +25,7 @@ const PrismMac = () => {
|
||||
}
|
||||
loadExternalResource(BLOG.PRISM_THEME_PATH, 'css')
|
||||
loadExternalResource(BLOG.PRISM_JS_AUTO_LOADER, 'js').then((url) => {
|
||||
console.log('渲染公式图表')
|
||||
// console.log('渲染公式图表')
|
||||
if (window?.Prism?.plugins?.autoloader) {
|
||||
window.Prism.plugins.autoloader.languages_path = BLOG.PRISM_JS_PATH
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user