Skip to content

Commit

Permalink
add tarot card page
Browse files Browse the repository at this point in the history
  • Loading branch information
cesque committed Mar 5, 2024
1 parent fa5d528 commit 815f5a1
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/Image/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Image({ src, caption, wide, full }) {

return <a href={ src } target="_blank" className={ classes }>
<figure className={ styles.figure }>
<img src={ src } title={ caption } alt={ caption } loading="lazy" />
<img loading="lazy" src={ src } title={ caption } alt={ caption } />
{ caption && <figcaption className={ styles.caption }>{ caption }</figcaption> }
</figure>
</a>
Expand Down
15 changes: 15 additions & 0 deletions components/TarotDeck/TarotDeck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styles from './TarotDeck.module.scss'

export default function TarotDeck({ deck: { name, type, deckImage, cardImage } }) {
if (deckImage == cardImage) {
console.log({ name })
}
return <div className={ styles.deck }>
<h3 className={ styles.name }>{ name }</h3>

<div className={ styles.images }>
{ deckImage ? <img className={ styles.image } src={ deckImage } /> : <p>(no deck box)</p> }
<img className={ styles.image } src={ cardImage } />
</div>
</div>
}
39 changes: 39 additions & 0 deletions components/TarotDeck/TarotDeck.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@import '@/styles/breakpoints.scss';

.deck {
margin: 0 var(--spacing-medium);

display: flex;
flex-direction: column;
gap: var(--spacing-small);

max-width: var(--width-wide);
}

.name {
margin: 0;
}

.images {
display: flex;
flex-direction: column;
gap: var(--spacing-small);
height: auto;

@media (min-width: $breakpoint-medium) {
flex-direction: row;
height: 400px;
}
}

.image {
height: 100%;
width: auto;
}

/* .type {
font-weight: bold;
background: var(--color-foreground);
color: var(--color-background);
padding: 0 8px;
} */
Loading

0 comments on commit 815f5a1

Please sign in to comment.