Skip to content
8 changes: 8 additions & 0 deletions __tests__/lib/db/notion/convertInnerUrl.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { convertInnerUrl } from '@/lib/db/notion/convertInnerUrl'

jest.mock('notion-utils', () => ({
idToUuid: id =>
id.replace(
/^(.{8})(.{4})(.{4})(.{4})(.{12})$/,
'$1-$2-$3-$4-$5'
)
}))

describe('convertInnerUrl', () => {
beforeEach(() => {
document.body.innerHTML = ''
Expand Down
18 changes: 10 additions & 8 deletions components/ExternalPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ const ExternalPlugin = props => {
const taskId = window.requestIdleCallback(callback)
return () => window.cancelIdleCallback(taskId)
}
const timeoutId = window.setTimeout(callback, 0)
const timeoutId = window.setTimeout(() => {
callback()
}, 0)
return () => window.clearTimeout(timeoutId)
}

Expand Down Expand Up @@ -203,7 +205,7 @@ const ExternalPlugin = props => {
lang: lang
})
}, 500)
}, [router])
}, [router, ADSENSE_GOOGLE_ID, lang, props?.allLinkPages, props?.allNavPages])

useEffect(() => {
if (!isBrowser || !GLOBAL_JS || GLOBAL_JS.trim() === '') {
Expand Down Expand Up @@ -343,11 +345,11 @@ const ExternalPlugin = props => {
async
dangerouslySetInnerHTML={{
__html: `
daovoice('init', {
app_id: "${COMMENT_DAO_VOICE_ID}"
});
daovoice('update');
`
daovoice('init', {
app_id: "${COMMENT_DAO_VOICE_ID}"
});
daovoice('update');
`
}}
/>
</>
Expand Down Expand Up @@ -426,7 +428,7 @@ const ExternalPlugin = props => {
async
dangerouslySetInnerHTML={{
__html: `
document.write(unescape("%3Cspan style='display:none' id='cnzz_stat_icon_${ANALYTICS_CNZZ_ID}'%3E%3C/span%3E%3Cscript src='https://s9.cnzz.com/z_stat.php%3Fid%3D${ANALYTICS_CNZZ_ID}' type='text/javascript'%3E%3C/script%3E"));
document.write(unescape("%3Cspan style='display:none' id='cnzz_stat_icon_${ANALYTICS_CNZZ_ID}'%3E%3C/span%3E%3Cscript src='https://s9.cnzz.com/z_stat.php%3Fid%3D${ANALYTICS_CNZZ_ID}' ty[...]
`
}}
/>
Expand Down
6 changes: 5 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ const customJestConfig = {

// Transform files
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }]
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', {
presets: ['next/babel'],
babelrc: false,
configFile: false
}]
},

// Transform ignore patterns
Expand Down
14 changes: 4 additions & 10 deletions themes/endspace/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ export const Style = () => {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
overflow-x: hidden;
/* Custom Tech Cursor - Sharp Spearhead with Heavy Shadow */
cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M2 2 L12 28 L16 18 L26 14 L2 2 Z' fill='%2318181b' stroke='%23ffffff' stroke-width='1.5' style='filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.3));'/%3E%3C/svg%3E") 2 2, auto;
cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M2 2 L12 28 L16 18 L26 14 L2 2 Z' fill='%2318181b' stroke='%2318181b' stroke-width='0.5'/%3E%3C/svg%3E") 2 2, auto;
}

#theme-endspace a, #theme-endspace button, #theme-endspace [role="button"], #theme-endspace .cursor-pointer {
/* Pointer Cursor - Target Reticle Style */
cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M2 2 L12 28 L16 18 L26 14 L2 2 Z' fill='%2362F0F5' stroke='%23000000' stroke-width='1.5' style='filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.3));'/%3E%3Ccircle cx='24' cy='24' r='4' fill='none' stroke='%2362F0F5' stroke-width='2'/%3E%3C/svg%3E") 2 2, pointer;
cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%2362F0F5' stroke-width='1'/%3E%3Cline x1='16' y1='8' x2='16' y2='4' stroke='%2362F0F5' stroke-width='1'/%3E%3Cline x1='16' y1='24' x2='16' y2='28' stroke='%2362F0F5' stroke-width='1'/%3E%3Cline x1='8' y1='16' x2='4' y2='16' stroke='%2362F0F5' stroke-width='1'/%3E%3Cline x1='24' y1='16' x2='28' y2='16' stroke='%2362F0F5' stroke-width='1'/%3E%3C/svg%3E") 16 16, auto;
}

/* Technical Grid Background */
Expand Down Expand Up @@ -747,9 +747,7 @@ export const Style = () => {
4px 0 8px rgba(0, 0, 0, 0.3),
8px 0 16px rgba(0, 0, 0, 0.2);
}
/* ============================================
NieR: Automata Style Navigation Transition
============================================ */

/* ============================================
NieR: Automata Style Navigation Transition
============================================ */
Expand Down Expand Up @@ -798,11 +796,7 @@ export const Style = () => {
transition: color 0.3s ease;
z-index: 2;
}

/* Removed specific active override to keep consistent grey background */

/* Also update the base hover/active shared rule to use this darker grey */


.dark .nier-nav-item::before {
background: #f4f4f5; /* Light bg in dark mode */
}
Expand Down
Loading