mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-28 15:10:04 +00:00
🐻 取消defer❌
This commit is contained in:
@@ -38,7 +38,7 @@ const RightAside = ({ toc, post }) => {
|
|||||||
|
|
||||||
{/* 下方菜单组 */}
|
{/* 下方菜单组 */}
|
||||||
<div
|
<div
|
||||||
className={(hideAside ? 'right-0' : 'right-48') + ' space-x-2 fixed flex bottom-20 px-4 py-1 duration-500'}>
|
className={(hideAside ? 'right-0' : 'right-48') + ' space-x-2 fixed flex bottom-24 px-4 py-1 duration-500'}>
|
||||||
<div className='flex-wrap'>
|
<div className='flex-wrap'>
|
||||||
{/* 分享按钮 */}
|
{/* 分享按钮 */}
|
||||||
<ShareButton post={post} />
|
<ShareButton post={post} />
|
||||||
|
|||||||
@@ -37,26 +37,12 @@ const SideBar = ({ tags, currentTag, toc }) => {
|
|||||||
changeCollapse(true)
|
changeCollapse(true)
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
const [collapse, changeCollapse] = useState(false)
|
const [collapse, changeCollapse] = useState(true)
|
||||||
|
|
||||||
return <aside className='z-10'>
|
return <aside className='z-10'>
|
||||||
|
|
||||||
<div className={(collapse ? '-ml-80 ' : 'shadow-2xl xl:shadow-none') + ' dark:bg-gray-800 bg-white sidebar h-full w-72 duration-500 ease-in-out'}>
|
<div className={(collapse ? '-ml-80 ' : 'shadow-2xl xl:shadow-none') + ' dark:bg-gray-800 bg-white sidebar h-full w-72 duration-500 ease-in-out'}>
|
||||||
|
|
||||||
{/* Logo */}
|
|
||||||
<section className='mx-5 pt-6 pb-2'>
|
|
||||||
<Link href='/'>
|
|
||||||
<a
|
|
||||||
className='text-3xl hover:shadow-2xl text-black dark:bg-gray-900 dark:text-gray-300 font-semibold dark:hover:bg-gray-600 hover:bg-gray-800 hover:text-white p-2 duration-200'>{BLOG.title}</a>
|
|
||||||
</Link>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{/* 地理标志 */}
|
|
||||||
<section className='text-gray-500 text-sm px-7 pt-3 pb-5 dark:text-gray-300'>
|
|
||||||
<i className='fa fa-map-marker mr-1' />
|
|
||||||
Fuzhou, China
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{/* 搜索框 */}
|
{/* 搜索框 */}
|
||||||
<section className='sticky top-0 flex justify-center items-center py-5 pr-5 pl-2 bg-gray-100 dark:bg-black'>
|
<section className='sticky top-0 flex justify-center items-center py-5 pr-5 pl-2 bg-gray-100 dark:bg-black'>
|
||||||
<input
|
<input
|
||||||
@@ -72,11 +58,24 @@ const SideBar = ({ tags, currentTag, toc }) => {
|
|||||||
<i className='fa fa-search text-gray-400 -ml-8' />
|
<i className='fa fa-search text-gray-400 -ml-8' />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{/* Logo */}
|
||||||
|
<section className='mx-5 pt-6 pb-2'>
|
||||||
|
<Link href='/'>
|
||||||
|
<a className='text-3xl hover:shadow-2xl text-black dark:bg-gray-900 dark:text-gray-300 font-semibold dark:hover:bg-gray-600 hover:bg-gray-800 hover:text-white p-2 duration-200'>{BLOG.title}</a>
|
||||||
|
</Link>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* 地理标志 */}
|
||||||
|
<section className='text-gray-500 text-sm px-7 pt-3 pb-5 dark:text-gray-300'>
|
||||||
|
<i className='fa fa-map-marker mr-1' />
|
||||||
|
Fuzhou, China
|
||||||
|
</section>
|
||||||
|
|
||||||
{/* wrapper */}
|
{/* wrapper */}
|
||||||
<div className='p-6'>
|
<div className='p-6'>
|
||||||
|
|
||||||
{/* 菜单 */}
|
{/* 菜单 */}
|
||||||
<nav className='py-4'>
|
<nav>
|
||||||
<div>
|
<div>
|
||||||
<strong className='text-xl text-gray-600 dark:text-gray-400'>菜单</strong>
|
<strong className='text-xl text-gray-600 dark:text-gray-400'>菜单</strong>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,7 +108,7 @@ const SideBar = ({ tags, currentTag, toc }) => {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className='sticky top-0'>
|
<div className='sticky top-20'>
|
||||||
<TocBar toc={toc} />
|
<TocBar toc={toc} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ const ThirdPartyScript = () => {
|
|||||||
return (<>
|
return (<>
|
||||||
{BLOG.DaoVoiceId && (<>
|
{BLOG.DaoVoiceId && (<>
|
||||||
{/* DaoVoice 反馈 */}
|
{/* DaoVoice 反馈 */}
|
||||||
<script defer dangerouslySetInnerHTML={{
|
<script async dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
(function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/daf1a94b.js","daovoice")
|
(function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/daf1a94b.js","daovoice")
|
||||||
`
|
`
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<script defer dangerouslySetInnerHTML={{
|
<script async dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
daovoice('init', {
|
daovoice('init', {
|
||||||
app_id: "${BLOG.DaoVoiceId}"
|
app_id: "${BLOG.DaoVoiceId}"
|
||||||
@@ -21,23 +21,23 @@ const ThirdPartyScript = () => {
|
|||||||
/>
|
/>
|
||||||
</>)}
|
</>)}
|
||||||
{/* 代码统计 */}
|
{/* 代码统计 */}
|
||||||
{true && (<>
|
{BLOG.isProd && (<>
|
||||||
{/* GoogleAdsense */}
|
{/* GoogleAdsense */}
|
||||||
{BLOG.googleAdsenseId && (
|
{BLOG.googleAdsenseId && (
|
||||||
<script data-ad-client={BLOG.googleAdsenseId} defer
|
<script data-ad-client={BLOG.googleAdsenseId} async
|
||||||
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' />
|
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ackee统计脚本 */}
|
{/* ackee统计脚本 */}
|
||||||
{BLOG.analytics.provider === 'ackee' && (
|
{BLOG.analytics.provider === 'ackee' && (
|
||||||
<script defer src={BLOG.analytics.ackeeConfig.tracker}
|
<script async src={BLOG.analytics.ackeeConfig.tracker}
|
||||||
data-ackee-server={BLOG.analytics.ackeeConfig.dataAckeeServer}
|
data-ackee-server={BLOG.analytics.ackeeConfig.dataAckeeServer}
|
||||||
data-ackee-domain-id={BLOG.analytics.ackeeConfig.domainId}
|
data-ackee-domain-id={BLOG.analytics.ackeeConfig.domainId}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{/* 百度统计 */}
|
{/* 百度统计 */}
|
||||||
{BLOG.analytics.baidyAnalytics && (
|
{BLOG.analytics.baidyAnalytics && (
|
||||||
<script defer
|
<script async
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
var _hmt = _hmt || [];
|
var _hmt = _hmt || [];
|
||||||
@@ -53,14 +53,14 @@ const ThirdPartyScript = () => {
|
|||||||
)}
|
)}
|
||||||
{/* 不蒜子 */}
|
{/* 不蒜子 */}
|
||||||
{BLOG.analytics.busuanzi && (
|
{BLOG.analytics.busuanzi && (
|
||||||
<script defer
|
<script async
|
||||||
src={'//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js'}
|
src={'//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js'}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* 站长统计 */}
|
{/* 站长统计 */}
|
||||||
{BLOG.isProd && (
|
{BLOG.isProd && (
|
||||||
<script defer
|
<script async
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
document.write(unescape("%3Cspan style='display:none' id='cnzz_stat_icon_1279970751'%3E%3C/span%3E%3Cscript src='https://s9.cnzz.com/z_stat.php%3Fid%3D1279970751' type='text/javascript'%3E%3C/script%3E"));
|
document.write(unescape("%3Cspan style='display:none' id='cnzz_stat_icon_1279970751'%3E%3C/span%3E%3Cscript src='https://s9.cnzz.com/z_stat.php%3Fid%3D1279970751' type='text/javascript'%3E%3C/script%3E"));
|
||||||
@@ -71,10 +71,10 @@ const ThirdPartyScript = () => {
|
|||||||
|
|
||||||
{/* 谷歌统计 */}
|
{/* 谷歌统计 */}
|
||||||
{BLOG.analytics.provider === 'ga' && (<>
|
{BLOG.analytics.provider === 'ga' && (<>
|
||||||
<script defer
|
<script async
|
||||||
src={`https://www.googletagmanager.com/gtag/js?id=${BLOG.analytics.gaConfig.measurementId}`}
|
src={`https://www.googletagmanager.com/gtag/js?id=${BLOG.analytics.gaConfig.measurementId}`}
|
||||||
/>
|
/>
|
||||||
<script defer
|
<script async
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ const ArticleLayout = ({
|
|||||||
|
|
||||||
{/* 下方菜单组 */}
|
{/* 下方菜单组 */}
|
||||||
<div
|
<div
|
||||||
className='right-0 space-x-2 fixed flex bottom-20 px-5 py-1 duration-500'>
|
className='right-0 space-x-2 fixed flex bottom-24 px-5 py-1 duration-500'>
|
||||||
<div className='flex-wrap'>
|
<div className='flex-wrap'>
|
||||||
{/* 分享按钮 */}
|
{/* 分享按钮 */}
|
||||||
<ShareButton post={frontMatter} />
|
<ShareButton post={frontMatter} />
|
||||||
|
|||||||
Reference in New Issue
Block a user