Coloring of stuff
All checks were successful
/ checking (push) Successful in 13s
/ build-site (push) Successful in 1m46s
/ publish (push) Successful in 7s
/ unlighthouse (push) Successful in 54s
/ deploy-unlighthouse-files (push) Successful in 9s
/ deploy-unlighthouse-site (push) Successful in 6s

This commit is contained in:
Firq 2024-07-15 15:28:08 +02:00
parent 9c2c7f7818
commit 9e61582456
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
6 changed files with 15 additions and 10 deletions

View file

@ -1,7 +1,7 @@
{
"name": "fgo-ta-com-website",
"type": "module",
"version": "0.2.2-pre.3",
"version": "0.2.2-pre.4",
"scripts": {
"dev": "astro dev",
"start": "astro dev",

View file

@ -3,7 +3,8 @@ export interface Props {
title: string
releaseDate: Date
shortdescription: string
link: string
link: string,
hlcolor: string,
}
const options_date: Intl.DateTimeFormatOptions = {
@ -12,7 +13,7 @@ const options_date: Intl.DateTimeFormatOptions = {
day: '2-digit',
}
const { shortdescription, releaseDate, title, link } = Astro.props
const { shortdescription, releaseDate, title, link, hlcolor } = Astro.props
const render_date = releaseDate.toLocaleDateString('en-GB', options_date)
---
@ -25,7 +26,7 @@ const render_date = releaseDate.toLocaleDateString('en-GB', options_date)
</article>
</a>
<style>
<style define:vars={{ hlcolor }}>
.circle {
display: none;
}
@ -47,7 +48,7 @@ const render_date = releaseDate.toLocaleDateString('en-GB', options_date)
}
article > h2 {
margin: 0px 0.5rem;
color: var(--c-darkpurple);
color: var(--hlcolor);
font-size: 1.2rem;
line-height: normal;
text-decoration: none;
@ -67,7 +68,7 @@ const render_date = releaseDate.toLocaleDateString('en-GB', options_date)
align-items: center;
align-content: center;
justify-content: center;
background-color: var(--c-duskgray);
background: var(--c-duskgray); /* linear-gradient(175deg, var(--c-duskgray), var(--c-duskgray), var(--c-duskgray), var(--hlcolor)); */
padding: 10px;
text-align: center;
transition: transform var(--speed) var(--ease);
@ -104,7 +105,7 @@ const render_date = releaseDate.toLocaleDateString('en-GB', options_date)
}
a:hover article {
border-color: var(--c-darkpurple);
border-color: var(--hlcolor);
}
article {

View file

@ -6,5 +6,6 @@
"releaseNumber": 1,
"type": "event"
},
"link": "https://apps.atlasacademy.io/db/NA/servant/314/"
"link": "https://apps.atlasacademy.io/db/NA/servant/314/",
"color": "#f7281f"
}

View file

@ -6,5 +6,6 @@
"releaseNumber": 1,
"type": "event"
},
"link": "https://apps.atlasacademy.io/db/NA/servant/215/"
"link": "https://apps.atlasacademy.io/db/NA/servant/215/",
"color": "#0eb31d"
}

View file

@ -44,7 +44,8 @@ const changes = defineCollection({
type: 'data',
schema: z.object({
info: info,
link: z.string().url()
link: z.string().url(),
color: z.string(),
}),
})

View file

@ -49,6 +49,7 @@ combined.sort(
<EventListing
{...{ ...quest.data.info, slug: quest.id }}
link={(quest.data as any).link}
hlcolor={(quest.data as any).color}
/>
)
}