Skip to content

Commit

Permalink
start working on favorite
Browse files Browse the repository at this point in the history
  • Loading branch information
john-rock committed Jan 30, 2025
1 parent d9a8b7c commit 960d06b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
21 changes: 11 additions & 10 deletions website/src/components/quickstartGuideCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,8 @@ export function QuickstartGuideTitle({ frontMatter }) {

return (
<div className={styles.infoContainer}>
<Link className={styles.backButton} to="/guides">Back to guides</Link>
<div className={styles.leftInfo}>
<div>
<button
onClick={toggleFavorite}
className={`${styles.favoriteButton} ${isFavorite ? styles.favorited : ''}`}
aria-label={isFavorite ? "Remove from favorites" : "Add to favorites"}
>

{getSvgIcon('fa-star')}
</button>
</div>
{recently_updated && (
<span className={styles.recently_updated}>Updated</span>
)}
Expand All @@ -89,6 +80,16 @@ export function QuickstartGuideTitle({ frontMatter }) {
{level && <div className={styles.tag}>{level}</div>}
</div>
)}
<div>
<button
onClick={toggleFavorite}
className={`${styles.favoriteButton} ${isFavorite ? styles.favorited : ''}`}
aria-label={isFavorite ? "Remove from favorites" : "Add to favorites"}
>

{getSvgIcon('fa-star')}
</button>
</div>
</div>
);
}
5 changes: 5 additions & 0 deletions website/src/components/quickstartGuideCard/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@
.leftInfo {
display: flex;
align-items: center;
gap: 0.375rem
}

.backButton {
color: var(--ifm-menu-color);
}

.infoContainer .tag_container {
Expand Down

0 comments on commit 960d06b

Please sign in to comment.