mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Compare commits
3 commits
ba1ba7a286
...
88ef4c7060
| Author | SHA1 | Date | |
|---|---|---|---|
| 88ef4c7060 | |||
| eb17632154 | |||
| ae7605ad4a |
8 changed files with 10 additions and 12 deletions
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `albums` MODIFY `createdAt` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP(0);
|
||||||
|
|
@ -130,7 +130,7 @@ model albums {
|
||||||
releaseDate DateTime? @db.Date
|
releaseDate DateTime? @db.Date
|
||||||
label String? @db.VarChar(255)
|
label String? @db.VarChar(255)
|
||||||
vgmdb String? @db.VarChar(255)
|
vgmdb String? @db.VarChar(255)
|
||||||
createdAt DateTime @default(now()) @db.DateTime(0)
|
createdAt DateTime? @default(now()) @db.DateTime(0)
|
||||||
updatedAt DateTime @default(now()) @db.DateTime(0)
|
updatedAt DateTime @default(now()) @db.DateTime(0)
|
||||||
publishedAt DateTime @default(now())
|
publishedAt DateTime @default(now())
|
||||||
description String? @db.VarChar(255)
|
description String? @db.VarChar(255)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ fullPageList.forEach((n) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const currentListIndex = pageList.findIndex((l) => l.includes(page))
|
const currentListIndex = pageList.findIndex((l) => l.includes(page))
|
||||||
const currentList = pageList[currentListIndex]
|
const currentList = pageList[currentListIndex] ?? []
|
||||||
---
|
---
|
||||||
|
|
||||||
<ul class:list={[className, 'bg-dark mb-0 py-2 justify-center']}>
|
<ul class:list={[className, 'bg-dark mb-0 py-2 justify-center']}>
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,12 @@ import DefaultSEO from 'components/DefaultSEO.astro'
|
||||||
import FooterNav from 'components/lastAdded/FooterNav.astro'
|
import FooterNav from 'components/lastAdded/FooterNav.astro'
|
||||||
|
|
||||||
const { albums, limitMD, limitXS, ...listProps } = Astro.props
|
const { albums, limitMD, limitXS, ...listProps } = Astro.props
|
||||||
|
|
||||||
if (albums.length === 0) {
|
|
||||||
Astro.redirect('/404')
|
|
||||||
}
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<DefaultSEO />
|
<DefaultSEO />
|
||||||
<Base>
|
<Base>
|
||||||
<div class='flex flex-col w-full'>
|
<div class='flex flex-col w-full'>
|
||||||
<div class='w-full min-h-100vh mx-auto max-w-[1140px]'>
|
<div class='w-full mx-auto max-w-[1140px] grow-1'>
|
||||||
<div class='px-2 mb-2'>
|
<div class='px-2 mb-2'>
|
||||||
<h1 class='uppercase font-medium tracking-wide text-5xl drop-shadow-2xl mt-5 mb-2 text-center'>
|
<h1 class='uppercase font-medium tracking-wide text-5xl drop-shadow-2xl mt-5 mb-2 text-center'>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ import GuraGif from '../img/assets/doggo-thumbs-up.gif'
|
||||||
<BaseLayout>
|
<BaseLayout>
|
||||||
<div class='flex flex-1 flex-col bg-soc-green-dark py-6'>
|
<div class='flex flex-1 flex-col bg-soc-green-dark py-6'>
|
||||||
<div class='text-md` text-center'>Something went wrong.... yubi yubi</div>
|
<div class='text-md` text-center'>Something went wrong.... yubi yubi</div>
|
||||||
<Image src={GuraGif} alt='Gawr Gura roomba' class='size-80 mx-auto mt-4' />
|
<Image src={GuraGif} alt='' class='size-80 mx-auto mt-4' />
|
||||||
</div>
|
</div>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ const coverImage = await getImage({
|
||||||
width={130}
|
width={130}
|
||||||
height={50}
|
height={50}
|
||||||
style={{ height: 'auto', width: '130px' }}
|
style={{ height: 'auto', width: '130px' }}
|
||||||
alt={provider}
|
alt={provider ?? 'Store icon'}
|
||||||
src={`/img/provider/${provider}.jpg`}
|
src={`/img/provider/${provider}.jpg`}
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -317,7 +317,7 @@ const coverImage = await getImage({
|
||||||
class='rounded-md'
|
class='rounded-md'
|
||||||
width={30}
|
width={30}
|
||||||
height={30}
|
height={30}
|
||||||
alt={provider}
|
alt={provider ?? 'Provider'}
|
||||||
src={`/img/provider/${provider}.png`}
|
src={`/img/provider/${provider}.png`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ export const POST: APIRoute = async ({ request, locals }) => {
|
||||||
|
|
||||||
let body
|
let body
|
||||||
try {
|
try {
|
||||||
const formData = await parseForm(request)
|
const formData = await parseForm(await request.formData())
|
||||||
body = s.create(formData, DeleteAlbum)
|
body = s.create(formData, DeleteAlbum)
|
||||||
await prismaClient.albums.findUniqueOrThrow({ where: { id: body.albumId }, select: { id: true } })
|
await prismaClient.albums.findUniqueOrThrow({ where: { id: body.albumId }, select: { id: true } })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@ import GuraGif from '../img/assets/doggo-thumbs-up.gif'
|
||||||
>our Discord Server</a
|
>our Discord Server</a
|
||||||
> for updates
|
> for updates
|
||||||
</div>
|
</div>
|
||||||
<Image src={GuraGif} alt='Gawr Gura roomba' class='size-80 mx-auto mt-4' />
|
<Image src={GuraGif} alt='' class='size-80 mx-auto mt-4' />
|
||||||
</div>
|
</div>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue