-
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.
adding levels based on coding and method difficulty
- Loading branch information
1 parent
d9f6d22
commit b4e7fba
Showing
21 changed files
with
275 additions
and
182 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
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
overflow: hidden; | ||
} | ||
|
||
.CollectionCard a { | ||
.SeriesCard a { | ||
text-decoration: none; | ||
} | ||
|
||
|
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
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
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,54 @@ | ||
import React from "react" | ||
import "./SeriesCard.css" | ||
import NotebookCard from "./NotebookCard.tsx" | ||
import MarkdownSnippet from "./MarkdownSnippet.tsx" | ||
import type { Series } from "../types.ts" | ||
|
||
/** | ||
* Props for the SeriesCard component. | ||
* | ||
* @interface SeriesCardProps | ||
* @extends {React.HTMLProps<HTMLDivElement>} | ||
* | ||
* @property {Series} series - The series data to be displayed in the card. | ||
*/ | ||
export interface SeriesCardProps extends React.HTMLProps<HTMLDivElement> { | ||
series: Series | ||
} | ||
|
||
const SeriesCard: React.FC<SeriesCardProps> = ({ | ||
className = "", | ||
series, | ||
children, | ||
}) => { | ||
if (!series) { | ||
console.error("[SeriesCard] - series is not defined") | ||
return null | ||
} | ||
const hasCover = series.cover?.url | ||
return ( | ||
<div className={`SeriesCard d-flex flex-column ${className}`}> | ||
<section className="p-3"> | ||
<h2>{series.title}</h2> | ||
<h3>{series.excerpt}</h3> | ||
{series.body ? <MarkdownSnippet value={series.body} /> : null} | ||
{children} | ||
</section> | ||
<ol className="mb-3 mx-3"> | ||
{series.notebooks.map((notebook) => ( | ||
<li key={notebook.href} className="mt-2"> | ||
<NotebookCard notebook={notebook} /> | ||
</li> | ||
))} | ||
</ol> | ||
{hasCover && ( | ||
<div className="map-bg"> | ||
<div className="overlay"></div> | ||
<img src={series.cover?.url} alt={series.cover?.alt} /> | ||
</div> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export default SeriesCard |
Oops, something went wrong.