-
-
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.
Merge pull request #28 from nyomansunima/17-explore-repo-feature
🍀 update: repo to explore
- Loading branch information
Showing
11 changed files
with
241 additions
and
14 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,46 @@ | ||
import Image from 'next/image' | ||
import { FunctionComponent } from 'react' | ||
import styles from '@styles/components/explore/explore-repo-item.module.scss' | ||
import { ExplorationRepo } from '~/types/content' | ||
|
||
interface ExploreRepoItemProps { | ||
data: ExplorationRepo | ||
} | ||
|
||
/** | ||
* # ExploreRepoItem | ||
* | ||
* the repo item to show in the | ||
* explore stages | ||
* | ||
* @returns JSX.Element | ||
*/ | ||
const ExploreRepoItem: FunctionComponent<ExploreRepoItemProps> = ({ | ||
data, | ||
}): JSX.Element => { | ||
return ( | ||
<div | ||
data-cursor-size="80" | ||
data-cursor-icon="fi fi-rr-code-commit" | ||
className={`${styles.item} item`} | ||
onClick={() => window.open(data.url)} | ||
> | ||
<picture> | ||
<Image src={data.image} fill sizes="auto" alt={data.title} /> | ||
</picture> | ||
<i | ||
className={`${ | ||
data.source == 'github' | ||
? 'fi fi-brands-github' | ||
: 'fi fi-brands-gitlab' | ||
} ${styles.source}`} | ||
></i> | ||
<div className={styles.detail}> | ||
<h4>{data.title}</h4> | ||
<p>{data.desc.substring(0, 70)}</p> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default ExploreRepoItem |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import ExploreItemCard from './explore-item-card' | ||
import ExploreRepoItem from './explore-repo-item' | ||
import ExploreStackItem from './explore-stack-item' | ||
|
||
export { ExploreItemCard, ExploreStackItem } | ||
export { ExploreItemCard, ExploreStackItem, ExploreRepoItem } |
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
61 changes: 61 additions & 0 deletions
61
apps/frontend/styles/components/explore/explore-repo-item.module.scss
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 @@ | ||
@use '../../base' as *; | ||
|
||
.item { | ||
display: flex; | ||
gap: size(5); | ||
border: 1px solid var(--clr-gray-100); | ||
border-radius: 28px; | ||
padding: size(4); | ||
cursor: pointer; | ||
|
||
picture { | ||
display: flex; | ||
height: 64px; | ||
width: 64px; | ||
border-radius: 12px; | ||
overflow: hidden; | ||
position: relative; | ||
|
||
img { | ||
object-fit: cover; | ||
} | ||
} | ||
|
||
.source { | ||
display: flex; | ||
font-size: fontSize(2xl); | ||
position: absolute; | ||
z-index: 99; | ||
top: 52px; | ||
left: 52px; | ||
background: var(--clr-white); | ||
border-radius: 100%; | ||
padding: size(1); | ||
} | ||
|
||
.detail { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
|
||
h4 { | ||
display: flex; | ||
font-size: fontSize(2xl); | ||
font-weight: 500; | ||
line-height: 1; | ||
} | ||
|
||
p { | ||
display: flex; | ||
font-size: fontSize(lg); | ||
font-weight: 500; | ||
margin-top: size(5); | ||
} | ||
|
||
span { | ||
display: flex; | ||
font-weight: 600; | ||
margin-top: 20px; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.
862b294
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
personal-portfolio-website-studio – ./apps/studio
personal-portfolio-website-studio.vercel.app
personal-portfolio-website-studio-nyomansunima.vercel.app
personal-portfolio-website-studio-git-main-nyomansunima.vercel.app
studio.nyomansunima.com
862b294
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
personal-portfolio-website-frontend – ./apps/frontend
personal-portfolio-website-frontend.vercel.app
personal-portfolio-website-frontend-git-main-nyomansunima.vercel.app
nyomansunima.com
personal-portfolio-website-frontend-nyomansunima.vercel.app