fix: Fix static files.

This commit is contained in:
Sam Tolmay 2021-11-29 13:16:33 +02:00
parent 62a752d66c
commit d2e343eb8b
No known key found for this signature in database
GPG Key ID: D004126FCD1A6DF0
14 changed files with 17 additions and 13 deletions

View File

@ -115,21 +115,23 @@ const PageHeaderMenu = ({
properties.header,
])}
content={{
// TODO: use next/image
// TODO: Link to home=true
content: () => (
<>
<Link href={`${basePath}/${homePageId}`}>
<Link href={`${homePageId}`}>
<img
src={
(properties.logo && properties.logo.src) ||
(get(properties, 'header.theme') === 'light'
? `${basePath}/public/logo-light-theme.png`
: `${basePath}/public/logo-dark-theme.png`)
? `${basePath}/logo-light-theme.png`
: `${basePath}/logo-dark-theme.png`)
}
srcSet={
(properties.logo && (properties.logo.srcSet || properties.logo.src)) ||
(get(properties, 'header.theme') === 'light'
? `${basePath}/public/logo-square-light-theme.png 40w, ${basePath}/public/logo-light-theme.png 577w`
: `${basePath}/public/logo-square-dark-theme.png 40w, ${basePath}/public/logo-dark-theme.png 577w`)
? `${basePath}/logo-square-light-theme.png 40w, ${basePath}/logo-light-theme.png 577w`
: `${basePath}/logo-square-dark-theme.png 40w, ${basePath}/logo-dark-theme.png 577w`)
}
sizes={
(properties.logo && properties.logo.sizes) ||

View File

@ -116,6 +116,8 @@ const PageSiderMenu = ({
events={events}
properties={{ style: mergeObjects([{ minHeight: '100vh' }, properties.style]) }}
content={{
// TODO: use next/image
// TODO: Link to home=true
content: () => (
<>
<Header
@ -170,14 +172,14 @@ const PageSiderMenu = ({
src={
(properties.logo && properties.logo.src) ||
(get(properties, 'header.theme') === 'light'
? `${basePath}/public/logo-light-theme.png`
: `${basePath}/public/logo-dark-theme.png`)
? `${basePath}/logo-light-theme.png`
: `${basePath}/logo-dark-theme.png`)
}
srcSet={
(properties.logo && (properties.logo.srcSet || properties.logo.src)) ||
(get(properties, 'header.theme') === 'light'
? `${basePath}/public/logo-square-light-theme.png 40w, ${basePath}/public/logo-light-theme.png 577w`
: `${basePath}/public/logo-square-dark-theme.png 40w, ${basePath}/public/logo-dark-theme.png 577w`)
? `${basePath}/logo-square-light-theme.png 40w, ${basePath}/logo-light-theme.png 577w`
: `${basePath}/logo-square-dark-theme.png 40w, ${basePath}/logo-dark-theme.png 577w`)
}
sizes={
(properties.logo && properties.logo.sizes) ||

View File

Before

Width:  |  Height:  |  Size: 949 B

After

Width:  |  Height:  |  Size: 949 B

View File

Before

Width:  |  Height:  |  Size: 734 B

After

Width:  |  Height:  |  Size: 734 B

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -69,7 +69,7 @@ const CategorySwitch = ({ block, Blocks, context, lowdefy }) => {
blockId={block.blockId}
components={lowdefy._internal.components}
events={block.eval.events}
homePageId={lowdefy.homePageId}
homePageId={lowdefy.home.pageId}
key={block.blockId}
loading={block.loading}
menus={lowdefy.menus}
@ -102,7 +102,7 @@ const CategorySwitch = ({ block, Blocks, context, lowdefy }) => {
blockId={block.blockId}
components={lowdefy._internal.components}
events={block.eval.events}
homePageId={lowdefy.homePageId}
homePageId={lowdefy.home.pageId}
key={block.blockId}
loading={block.loading}
menus={lowdefy.menus}

View File

@ -70,7 +70,7 @@ const Container = ({ block, Blocks, Component, context, lowdefy }) => {
components={lowdefy._internal.components}
content={content}
events={block.eval.events}
homePageId={lowdefy.homePageId}
homePageId={lowdefy.home.pageId}
key={block.blockId}
loading={block.loading}
menus={lowdefy.menus}

View File

@ -76,7 +76,7 @@ const List = ({ block, Blocks, Component, context, lowdefy }) => {
blockId={block.blockId}
components={lowdefy._internal.components}
events={block.eval.events}
homePageId={lowdefy.homePageId}
homePageId={lowdefy.home.pageId}
key={block.blockId}
list={contentList}
loading={block.loading}