-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
63 additions
and
4 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 |
---|---|---|
|
@@ -53,4 +53,11 @@ | |
|
||
.content img { | ||
max-width: 100%; | ||
} | ||
|
||
.authors { | ||
display: flex; | ||
gap: 25px; | ||
flex-wrap: wrap; | ||
margin: 30px 0; | ||
} |
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,22 @@ | ||
.author { | ||
display: flex; | ||
gap: 15px; | ||
align-items: center; | ||
} | ||
|
||
.author .avatar { | ||
display: flex; | ||
align-items: center; | ||
|
||
border-radius: 100%; | ||
width: 48px; | ||
aspect-ratio: 1; | ||
} | ||
|
||
.author .info .name { | ||
font-weight: 600; | ||
} | ||
|
||
.author .info .role { | ||
font-size: 0.7em; | ||
} |
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,23 @@ | ||
import { NEWS_IMAGES_URL } from "@/utils/constants"; | ||
import styles from "./author.module.css"; | ||
import Image from "next/image"; | ||
|
||
type Props = { | ||
displayName: string, | ||
avatar?: string, | ||
role?: string, | ||
} | ||
|
||
const Author: React.FC<Props> = ({ displayName, avatar, role }) => { | ||
return <div className={styles.author}> | ||
<div className={styles.avatar}> | ||
<Image src={`${NEWS_IMAGES_URL}/avatars/${avatar}`} alt={`${displayName}'s avatar`} width={48} height={48} /> | ||
</div> | ||
<div className={styles.info}> | ||
<div className={styles.name}>{ displayName }</div> | ||
<div className={styles.role}>{ role }</div> | ||
</div> | ||
</div>; | ||
} | ||
|
||
export default Author; |
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