Redesign Part 2
This commit is contained in:
parent
f1bb9b80ca
commit
9c2c7f7818
18 changed files with 332 additions and 28 deletions
src/components/listings
116
src/components/listings/eventListingLine.astro
Normal file
116
src/components/listings/eventListingLine.astro
Normal file
|
@ -0,0 +1,116 @@
|
|||
---
|
||||
export interface Props {
|
||||
title: string
|
||||
releaseDate: Date
|
||||
shortdescription: string
|
||||
link: string
|
||||
}
|
||||
|
||||
const options_date: Intl.DateTimeFormatOptions = {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: '2-digit',
|
||||
}
|
||||
|
||||
const { shortdescription, releaseDate, title, link } = Astro.props
|
||||
const render_date = releaseDate.toLocaleDateString('en-GB', options_date)
|
||||
---
|
||||
|
||||
<a href={link} target="_blank" rel="noopener noreferrer">
|
||||
<div class="circle"></div>
|
||||
<article>
|
||||
<h2>{title}</h2>
|
||||
<h3>{render_date}</h3>
|
||||
<p>{shortdescription}</p>
|
||||
</article>
|
||||
</a>
|
||||
|
||||
<style>
|
||||
.circle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
text-decoration: none;
|
||||
height: fit-content;
|
||||
margin: 0px 0.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
p {
|
||||
color: white;
|
||||
text-align: left;
|
||||
font-size: 1em;
|
||||
margin: 0px 0.5em;
|
||||
}
|
||||
article > h2 {
|
||||
margin: 0px 0.5rem;
|
||||
color: var(--c-darkpurple);
|
||||
font-size: 1.2rem;
|
||||
line-height: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
article > h3 {
|
||||
margin: 0px 0.5rem;
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
line-height: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
article {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
background-color: var(--c-duskgray);
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
transition: transform var(--speed) var(--ease);
|
||||
min-height: 100%;
|
||||
border-radius: 1.25rem;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: var(--c-darkergray);
|
||||
}
|
||||
|
||||
a:hover > article {
|
||||
transform: scaleY(102.5%) scaleX(101%);
|
||||
transition: transform var(--speed) var(--ease);
|
||||
}
|
||||
|
||||
@media (min-width: 900px) {
|
||||
.circle {
|
||||
margin: 1rem 0.5rem 1rem 0.5rem;
|
||||
position: relative;
|
||||
display: flex;
|
||||
visibility: visible;
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
border-radius: 40%;
|
||||
background-color: var(--c-darkpurple);
|
||||
transition: transform var(--speed) var(--ease);
|
||||
}
|
||||
|
||||
a:hover > .circle {
|
||||
height: 1.75rem;
|
||||
width: 1.75rem;
|
||||
translate: -0.125rem;
|
||||
margin-right: 0.825rem;
|
||||
}
|
||||
|
||||
a:hover article {
|
||||
border-color: var(--c-darkpurple);
|
||||
}
|
||||
|
||||
article {
|
||||
align-items: flex-start;
|
||||
align-content: flex-start;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
121
src/components/listings/questListingLine.astro
Normal file
121
src/components/listings/questListingLine.astro
Normal file
|
@ -0,0 +1,121 @@
|
|||
---
|
||||
export interface Props {
|
||||
baseurl: string
|
||||
slug: string
|
||||
title: string
|
||||
releaseDate: Date
|
||||
shortdescription: string
|
||||
}
|
||||
|
||||
const options_date: Intl.DateTimeFormatOptions = {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: '2-digit',
|
||||
}
|
||||
|
||||
const { shortdescription, releaseDate, slug, title, baseurl } = Astro.props
|
||||
const url = `/${baseurl}/${slug}`
|
||||
const render_date = releaseDate.toLocaleDateString(
|
||||
'en-GB',
|
||||
options_date
|
||||
)
|
||||
---
|
||||
|
||||
<a href={url} rel="noopener noreferrer">
|
||||
<div class="circle"></div>
|
||||
<article>
|
||||
<h2>{title}</h2>
|
||||
<h3>{render_date}</h3>
|
||||
<p>{shortdescription}</p>
|
||||
</article>
|
||||
</a>
|
||||
|
||||
<style>
|
||||
.circle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
text-decoration: none;
|
||||
height: auto;
|
||||
margin: 0.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
p {
|
||||
color: white;
|
||||
text-align: left;
|
||||
font-size: 1.1em;
|
||||
margin: 0.5em;
|
||||
}
|
||||
article > h2 {
|
||||
margin: 0.3rem 0.5rem;
|
||||
color: var(--c-darkpurple);
|
||||
font-size: 1.5rem;
|
||||
line-height: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
article > h3 {
|
||||
margin: 0.2em 0.5rem;
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
line-height: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
article {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
background-color: var(--c-darkergray);
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
transition: transform var(--speed) var(--ease);
|
||||
min-height: 100%;
|
||||
border-radius: 1.25rem;
|
||||
}
|
||||
|
||||
a:hover > article {
|
||||
transform: scaleY(102.5%) scaleX(101%);
|
||||
transition: transform var(--speed) var(--ease);
|
||||
}
|
||||
|
||||
@media (min-width: 900px) {
|
||||
.circle {
|
||||
margin: 1rem 0.5rem 1rem 0.5rem;
|
||||
position: relative;
|
||||
display: flex;
|
||||
visibility: visible;
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
border-radius: 40%;
|
||||
background-color: var(--c-darkpurple);
|
||||
transition: transform var(--speed) var(--ease);
|
||||
}
|
||||
|
||||
a:hover > .circle {
|
||||
height: 1.75rem;
|
||||
width: 1.75rem;
|
||||
translate: -0.125rem;
|
||||
margin-right: 0.825rem;
|
||||
}
|
||||
|
||||
a:hover article {
|
||||
border-color: var(--c-darkpurple);
|
||||
}
|
||||
|
||||
article {
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: var(--c-darkergray);
|
||||
align-items: flex-start;
|
||||
align-content: flex-start;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue