Skip to content

Commit a5d3e10

Browse files
authored
Restore default index card wallpapers to work alongside custom basePath images (#47)
1 parent 42990bd commit a5d3e10

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/theme/components/layout/index-cards/IndexCards.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ export function IndexCards({route, folderData}: IndexCardsProps) {
8888

8989
const thumbnailUrl =
9090
colorMode === 'dark'
91-
? `${basePath ? basePath : ''}${item.frontMatter.thumbnail_darkMode}` ||
92-
getNextPlaceholderIndex(darkModePlaceholderThumbs).src
93-
: `${basePath ? basePath : ''}${item.frontMatter.thumbnail}` ||
91+
? (item.frontMatter.thumbnail_darkMode
92+
? `${basePath || ''}${item.frontMatter.thumbnail_darkMode}`
93+
: null) || getNextPlaceholderIndex(darkModePlaceholderThumbs).src
94+
: (item.frontMatter.thumbnail ? `${basePath || ''}${item.frontMatter.thumbnail}` : null) ||
9495
getNextPlaceholderIndex(lightModePlaceholderThumbs).src
9596

9697
return (

0 commit comments

Comments
 (0)