-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
117 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { getMetadata } from '@/utils/getMetadata' | ||
|
||
export async function generateMetadata({ params: { slug }}) { | ||
return getMetadata(slug, 'article') | ||
} | ||
|
||
export default function Layout({ children }) { | ||
return <> | ||
{ children } | ||
</> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Header from "@/components/Header/Header"; | ||
import Post from "@/components/Post/Post"; | ||
import TarotGrid from "@/components/TarotGrid/TarotGrid"; | ||
|
||
export default async function TarotGridPage() { | ||
const slug = 'tarot-grid' | ||
const meta = { title: 'Tarot Decks - Grid', tags: [ 'personal', 'occult' ] } | ||
const info = { | ||
inode: 0, | ||
} | ||
|
||
return <> | ||
<Header slug={ slug } /> | ||
|
||
<Post slug={ slug } meta={ meta } info={ info }> | ||
<TarotGrid /> | ||
</Post> | ||
</> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import styles from './TarotGrid.module.scss' | ||
|
||
import data from '@/data/tarotDecks' | ||
|
||
function Image({ caption, src }) { | ||
return <figure className={ styles.imageContainer }> | ||
<img className={ styles.image } src={ src } /> | ||
|
||
<figcaption className={ styles.caption }>{ caption }</figcaption> | ||
</figure> | ||
} | ||
|
||
export default function TarotGrid() { | ||
return <div className={ styles.grid }> | ||
{ data.map(deck => <Image caption={ deck.name } src={ deck.landscapeCardImage ?? deck.cardImage } />) } | ||
</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@import '@/styles/breakpoints.scss'; | ||
|
||
.grid { | ||
max-width: var(--width-full); | ||
padding: var(--spacing-medium); | ||
|
||
display: grid; | ||
grid-template-columns: repeat(2, 1fr); | ||
gap: var(--spacing-small); | ||
|
||
@media (min-width: $breakpoint-medium) { | ||
grid-template-columns: repeat(3, 1fr); | ||
} | ||
|
||
@media (min-width: $breakpoint-large) { | ||
grid-template-columns: repeat(4, 1fr); | ||
} | ||
} | ||
|
||
.imageContainer { | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
margin: 0; | ||
} | ||
|
||
.caption { | ||
opacity: 0; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
padding: var(--spacing-xsmall) var(--spacing-small); | ||
font-size: 0.8rem; | ||
font-weight: bold; | ||
background: var(--color-background); | ||
color: var(--color-foreground); | ||
border: 2px solid var(--color-foreground); | ||
|
||
.imageContainer:hover & { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
.image { | ||
width: 100%; | ||
max-height: 100%; | ||
height: auto; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
$breakpoint-small: 600px; | ||
$breakpoint-medium: 900px; | ||
$breakpoint-medium: 900px; | ||
$breakpoint-large: 1200px; |