Skip to content

Commit

Permalink
Merge branch 'update_vers'
Browse files Browse the repository at this point in the history
  • Loading branch information
kellytr committed May 1, 2024
2 parents a82e8c8 + 540d945 commit 0a3b943
Show file tree
Hide file tree
Showing 90 changed files with 657 additions and 38 deletions.
17 changes: 17 additions & 0 deletions src/components/Card.js
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;
44 changes: 44 additions & 0 deletions src/components/Card.module.css
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;
}
2 changes: 2 additions & 0 deletions src/components/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ export const magenta = 'rgb(220, 84, 183)';
export const green = 'rgb(19, 173, 102)';
export const orange = 'rgb(255, 144, 36)';
export const teal = 'rgb(0,139,139)';
export const purple = 'rgb(111,7,111)';
export const brown = '#6C4F24';
8 changes: 7 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #25c2a0;
--ifm-color-primary: #5835D4;
--ifm-color-primary-dark: rgb(33, 175, 144);
--ifm-color-primary-darker: rgb(31, 165, 136);
--ifm-color-primary-darkest: rgb(26, 136, 112);
Expand Down Expand Up @@ -86,4 +86,10 @@ h1 {

.hidden {
display: none !important;
}

.cardGrid {
display: grid;
grid-template-columns: repeat(3, 1fr); /* Creates three columns */
gap: 20px; /* Space between the cards */
}
Loading

0 comments on commit 0a3b943

Please sign in to comment.