diff --git a/astro.config.mjs b/astro.config.mjs index e5a3666..22d5a0b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -25,6 +25,7 @@ export default defineConfig({ icon({ iconDir: 'src/img/icons' }), react() ], + image: { domains: ['cdn.sittingonclouds.net'] }, output: 'server', adapter: node({ mode: 'standalone' }) }) diff --git a/src/components/Sidebar.astro b/src/components/Sidebar.astro index eca8131..79f34a8 100644 --- a/src/components/Sidebar.astro +++ b/src/components/Sidebar.astro @@ -7,7 +7,7 @@ import yt from 'img/socials/yt.png' import twitter from 'img/socials/twitter.png' import SidebarSection from './sidebar/SidebarSection.astro' -// import Highlight from './sidebar/Highlight.astro' +import Highlight from './sidebar/Highlight.astro' const listClass = 'uppercase text-3xl font-semibold w-full text-center py-3 hover:bg-dark-hover hover:text-cyan-400 hover:underline' @@ -39,6 +39,6 @@ const listClass = - + diff --git a/src/components/sidebar/Highlight.astro b/src/components/sidebar/Highlight.astro new file mode 100644 index 0000000..4259b0b --- /dev/null +++ b/src/components/sidebar/Highlight.astro @@ -0,0 +1,8 @@ +--- +import Content from './highlight/content.astro' +import Loading from './highlight/loading.astro' +--- + + + + diff --git a/src/components/sidebar/SidebarSection.astro b/src/components/sidebar/SidebarSection.astro new file mode 100644 index 0000000..fa4d265 --- /dev/null +++ b/src/components/sidebar/SidebarSection.astro @@ -0,0 +1,10 @@ +--- +interface Props { + class?: string +} +const { class: className } = Astro.props +--- + +
+ +
diff --git a/src/components/sidebar/highlight/content.astro b/src/components/sidebar/highlight/content.astro new file mode 100644 index 0000000..bae5d4b --- /dev/null +++ b/src/components/sidebar/highlight/content.astro @@ -0,0 +1,27 @@ +--- +import prismaClient from 'utils/prisma-client' + +import AlbumBox from 'components/AlbumBox.astro' +import SidebarSection from '../SidebarSection.astro' + +const highlightConfig = await prismaClient.config.findUnique({ + where: { name: 'highlight' }, + select: { value: true } +}) + +const album = highlightConfig?.value + ? await prismaClient.albums.findUnique({ + where: { id: parseInt(highlightConfig.value) }, + select: { title: true, id: true } + }) + : null +--- + +{ + album ? ( + +
Highlight Soundtrack
+ +
+ ) : null +} diff --git a/src/components/sidebar/highlight/loading.astro b/src/components/sidebar/highlight/loading.astro new file mode 100644 index 0000000..a614529 --- /dev/null +++ b/src/components/sidebar/highlight/loading.astro @@ -0,0 +1,9 @@ +--- +import AlbumBox from 'components/AlbumBox.astro' +import SidebarSection from '../SidebarSection.astro' +--- + + +
Highlight Soundtrack
+ +
diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 314315d..9975c3e 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -11,7 +11,8 @@ export default { 'dark-hover': '#2b3035', gray: '#3f3f3f', 'gray-hover': '#4f4f4f', - 'soc-green': '#4b7667' + 'soc-green': '#4b7667', + 'hover-link': '#00d4ff' } } },