-
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 #16 from SkyLightQP/develop
refactor: redesign MainPage
- Loading branch information
Showing
42 changed files
with
678 additions
and
684 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React, { FC } from 'react'; | ||
import ReactMarkdown from 'react-markdown'; | ||
import styled from '@emotion/styled'; | ||
|
||
interface DescriptionViewProps { | ||
readonly description: string; | ||
} | ||
|
||
export const MarkdownWrapper = styled.div` | ||
& li { | ||
width: 630px; | ||
font-size: 16px; | ||
word-break: break-all; | ||
padding-left: 12px; | ||
text-indent: -12px; | ||
list-style-type: none; | ||
line-height: 1.6; | ||
&::before { | ||
content: '- '; | ||
} | ||
@media screen and (max-width: 700px) { | ||
width: 300px; | ||
} | ||
} | ||
`; | ||
|
||
export const DescriptionView: FC<DescriptionViewProps> = ({ description }) => { | ||
return ( | ||
<MarkdownWrapper> | ||
<ReactMarkdown>{description}</ReactMarkdown> | ||
</MarkdownWrapper> | ||
); | ||
}; |
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,35 @@ | ||
import React, { FC } from 'react'; | ||
import styled from '@emotion/styled'; | ||
import { ExternalLink } from '../../Link/ExternalLink'; | ||
import { SchemaType } from '../../../types/type-util'; | ||
|
||
interface ExternalLinkViewProps { | ||
readonly links: SchemaType<'links'>[]; | ||
} | ||
|
||
const ExternalLinkGroup = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
& > a { | ||
margin-right: 6px; | ||
} | ||
& > a:last-child { | ||
margin-right: 0; | ||
} | ||
`; | ||
|
||
export const ExternalLinkView: FC<ExternalLinkViewProps> = ({ links }) => { | ||
return ( | ||
<ExternalLinkGroup> | ||
{links | ||
.sort((a, b) => a.order - b.order) | ||
.map((link) => ( | ||
<ExternalLink key={link.id} href={link.href}> | ||
{link.name} | ||
</ExternalLink> | ||
))} | ||
</ExternalLinkGroup> | ||
); | ||
}; |
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,41 @@ | ||
import React, { FC } from 'react'; | ||
import styled from '@emotion/styled'; | ||
import Image from 'next/image'; | ||
import Breakpoint from '../../../styles/Breakpoint'; | ||
|
||
interface ImageViewProps { | ||
readonly urls: string[]; | ||
} | ||
|
||
const ImageGroup = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
& > img { | ||
margin-right: 16px; | ||
} | ||
& > img:last-child { | ||
margin-right: 0; | ||
} | ||
@media screen and (max-width: ${Breakpoint.MOBILE}) { | ||
overflow-x: auto; | ||
} | ||
`; | ||
|
||
const StyledImage = styled(Image)` | ||
width: auto; | ||
height: 80px; | ||
border-radius: 10px; | ||
`; | ||
|
||
export const ImageView: FC<ImageViewProps> = ({ urls }) => { | ||
return ( | ||
<ImageGroup> | ||
{urls.map((src) => ( | ||
<StyledImage key={src} src={src} alt="프로젝트 썸네일" width="147" height="80" /> | ||
))} | ||
</ImageGroup> | ||
); | ||
}; |
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.