-
Notifications
You must be signed in to change notification settings - Fork 1
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
90 changed files
with
657 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// src/components/Card.jsx | ||
import React from 'react'; | ||
import styles from './Card.module.css'; // Import the corresponding CSS | ||
import Link from '@docusaurus/Link'; // Import Link component for internal navigation | ||
|
||
|
||
const Card = ({ imageUrl, headerText, linkUrl, isNew }) => ( | ||
<Link to={linkUrl} className={styles.cardLink}> | ||
<div className={styles.card}> | ||
{isNew && <div className={styles.newLabel}>✨New</div>} | ||
<img src={require(`/static/img/${imageUrl}`).default} alt={headerText} className={styles.cardImage} /> | ||
<h3 className={styles.cardHeader}>{headerText}</h3> | ||
</div> | ||
</Link> | ||
); | ||
|
||
export default Card; |
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,44 @@ | ||
.cardLink { | ||
text-decoration: none; | ||
color: inherit; | ||
display: block; | ||
position: relative; /* Ensures that positioning is relative to the card */ | ||
} | ||
|
||
.card { | ||
position: relative; /* Needed for absolute positioning of the label */ | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
border-radius: 10px; | ||
box-shadow: 0 4px 8px rgba(0,0,0,0.1); | ||
overflow: hidden; | ||
margin: 10px; | ||
} | ||
|
||
.newLabel { | ||
position: absolute; | ||
top: 10px; /* Adjust as necessary */ | ||
right: 10px; /* Adjust as necessary */ | ||
background-color: #5332CD; /* Choose color based on your design */ | ||
color: white; | ||
padding: 5px 10px; | ||
border-radius: 5px; /* Rounded corners */ | ||
font-size: 0.9em; | ||
font-weight: bold; | ||
} | ||
|
||
.cardImage { | ||
width: 100%; | ||
height: 200px; | ||
object-fit: cover; | ||
} | ||
|
||
.card:hover { | ||
transform: scale(1.05); /* Optional: scale up on hover */ | ||
} | ||
|
||
.cardHeader { | ||
padding: 10px; | ||
text-align: center; | ||
} |
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
Oops, something went wrong.