-
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.
Fix frontend issues on resources page (#103)
* fix: backend description text overflow * feat: new ResourceCard component removed unused assets * fix: key prop error * fix: remove unused components * fix: references to unused images * refactor: short-circuit and color fixes * Fix transformed filter glitches for webkit - Include `translateZ(0)` when applying transform to drop shadow filter --------- Co-authored-by: Taesung Hwang <[email protected]>
- Loading branch information
1 parent
3f0fc0e
commit e66f4ad
Showing
19 changed files
with
124 additions
and
231 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 0 additions & 33 deletions
33
apps/site/src/views/Resources/components/ApiGroup/ApiGroup.tsx
This file was deleted.
Oops, something went wrong.
79 changes: 0 additions & 79 deletions
79
apps/site/src/views/Resources/components/BackendGroup/BackendGroup.module.scss
This file was deleted.
Oops, something went wrong.
74 changes: 0 additions & 74 deletions
74
apps/site/src/views/Resources/components/BackendGroup/BackendGroup.tsx
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
61 changes: 61 additions & 0 deletions
61
apps/site/src/views/Resources/components/ResourceCard/ResourceCard.tsx
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,61 @@ | ||
import Image from "next/image"; | ||
|
||
import openNewWindow from "@/assets/icons/open-new-window.svg"; | ||
import styles from "./ResourceCard.module.scss"; | ||
|
||
type Tag = { | ||
text: string; | ||
link: string; | ||
}; | ||
|
||
interface ResourceCardProps { | ||
title: string; | ||
description: JSX.Element; | ||
stickerSrc?: string; | ||
links: Tag[]; | ||
stickyNoteColor: string; | ||
} | ||
|
||
export default function ResourceCard({ | ||
title, | ||
description, | ||
stickerSrc, | ||
links, | ||
stickyNoteColor, | ||
}: ResourceCardProps) { | ||
return ( | ||
<div | ||
className={styles.group} | ||
style={{ | ||
backgroundColor: `${stickyNoteColor}`, | ||
}} | ||
> | ||
<div className={styles.container + " text-center px-3"}> | ||
<div className={styles.tape}></div> | ||
{stickerSrc && <img src={stickerSrc} alt="Resource logo" width="100" />} | ||
<h3>{title}</h3> | ||
{description} | ||
</div> | ||
|
||
{links.map(({ text, link }) => ( | ||
<a | ||
key={link} | ||
href={link} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className={styles.tag} | ||
> | ||
{text} | ||
<div className="d-inline ms-1 vertical-align-middle"> | ||
<Image | ||
src={openNewWindow} | ||
width="20" | ||
height="20" | ||
alt="Open link in new window" | ||
/> | ||
</div> | ||
</a> | ||
))} | ||
</div> | ||
); | ||
} |
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.