-
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 #17 from TEAM-Hearus/feat/my-script
Feat : ๋ด ์คํฌ๋ฆฝํธ ํ์ด์ง ์ถ๊ฐ
- Loading branch information
Showing
8 changed files
with
234 additions
and
1 deletion.
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,39 @@ | ||
@import '../../../styles/variables/colors.scss'; | ||
@import '../../../styles/variables/fonts.scss'; | ||
|
||
.postItContainer { | ||
display: flex; | ||
flex-direction: column; | ||
background-color: $white_FF; | ||
width: 240px; | ||
height: 300px; | ||
border-radius: 8px; | ||
box-shadow: 0px 3px 4px 0px $box-shadow_00; | ||
padding: 10px; | ||
margin: 20px; | ||
} | ||
.title { | ||
@include SemiBold_Body_16; | ||
color: $dark-font_33; | ||
padding: 10px 10px; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
.content { | ||
@include Regular_Sub_14; | ||
color: $light-gray_81; | ||
height: 200px; | ||
padding: 3px 10px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
display: -webkit-box; | ||
-webkit-line-clamp: 9; | ||
-webkit-box-orient: vertical; | ||
line-height: 22px; | ||
} | ||
.date { | ||
@include Medium_Sub_14; | ||
color: $light-gray_81; | ||
padding: 10px; | ||
} |
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,18 @@ | ||
import styles from './ScriptItem.module.scss'; | ||
|
||
interface IScriptProps { | ||
// id: number; | ||
title: string; | ||
content: string; | ||
date: string; | ||
} | ||
const ScriptItem = ({ title, content, date }: IScriptProps) => { | ||
return ( | ||
<div className={styles.postItContainer}> | ||
<div className={styles.title}>{title}</div> | ||
<div className={styles.content}>{content}</div> | ||
<span className={styles.date}>{date}</span> | ||
</div> | ||
); | ||
}; | ||
export default ScriptItem; |
12 changes: 12 additions & 0 deletions
12
src/components/common/buttons/StartBtn/StartBtn.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,12 @@ | ||
@import '../../../../styles/variables/colors.scss'; | ||
@import '../../../../styles/variables/fonts.scss'; | ||
|
||
.startingBtn { | ||
border-radius: 26px; | ||
background-color: $brand-point; | ||
cursor: pointer; | ||
border-width: 0; | ||
padding: 12px 24px; | ||
@include Regular_Body_16; | ||
color: $white_FF; | ||
} |
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,9 @@ | ||
import styles from './StartBtn.module.scss'; | ||
|
||
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {} | ||
|
||
const StartingButton = (props: ButtonProps) => { | ||
return <button className={styles.startingBtn} {...props} />; | ||
}; | ||
|
||
export default StartingButton; |
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,51 @@ | ||
export interface IScriptElement { | ||
id: number; | ||
title: string; | ||
content: string; | ||
date: string; | ||
} | ||
|
||
export const scriptElements: IScriptElement[] = [ | ||
{ | ||
id: 1, | ||
title: '๊ฒฝ์ ํ์๋ก -240708', | ||
content: | ||
'์ ๋ถ์ ์ค์์ํ์ด ๊ฒฝ์ ๋ฅผ ์ด๋ป๊ฒ ์กฐ์ ํ๊ณ , ๊ฒฝ์ ๋ฌธ์ ์ ๋์ํ๋์ง๋ฅผ ๋ค๋ฃจ๋ ๊ฒฝ์ ์ ์ฑ ์ ๋งค์ฐ ์ค์ํ ์ฃผ์ ์ ๋๋ค. ํตํ ์ ์ฑ , ์ฌ์ ์ ์ฑ ๋ฑ ๋ค์ํ ์ ์ฑ ๋๊ตฌ๋ฅผ ํตํด ๊ฒฝ์ ์ ์์ ์ฑ๊ณผ ์ฑ์ฅ์ ์ ์งํ๋ ๋ฐฉ๋ฒ์ ๋ถ์ํฉ๋๋ค.', | ||
date: '2024.07.08', | ||
}, | ||
{ | ||
id: 2, | ||
title: '๊ฒฝ์ ํ์ธ๋ฏธ๋-240705', | ||
content: | ||
'์๋ ํ์ธ์, ์ฌ๋ฌ๋ถ. ์ค๋์ ๊ฒฝ์ ์ธ๊ณ์์์ ๊ธ์ต ์ธก๋ฉด์ ๋ํด ํจ๊ป ์ด์ผ๊ธฐํด๋ณด๋ ค๊ณ ํฉ๋๋ค. ๊ธ์ต ์์ฅ์ ๋ณํ์ ๊ทธ ์ํฅ์ ๋ํด ์ดํด๋ณด๊ฒ ์ต๋๋ค. ์ฐ๋ฆฌ๋ ์ต๊ทผ ๋ช ๋ ๊ฐ ๊ธ์ต ์์ฅ์์ ํฐ ๋ณํ๋ฅผ ๊ฒฝํํด์์ต๋๋ค. ํนํ ๋์งํธ ํํ์ ๋ฑ์ฅ๊ณผ ๋ธ๋ก์ฒด์ธ ๊ธฐ์ ์ ๋ฐ์ ์ ๊ธ์ต ์์ฅ์ ํ์ ์ ์ธ ๋ณํ๋ฅผ ๊ฐ์ ธ์์ต๋๋ค. ์ด์ ๋ฐ๋ฅธ ๊ธ์ต ๊ธฐ๊ด๋ค์ ์ ๋ต์ ๋์๊ณผ ์ฌ์ฉ์๋ค์ ๊ธ์ต ์๋น์ค ์ฌ์ฉ ๋ฐฉ์์๋ ํฐ ๋ณํ๊ฐ ์ผ์ด๋๊ณ ์์ต๋๋ค.', | ||
date: '2024.07.05', | ||
}, | ||
{ | ||
id: 3, | ||
title: '์ฒญ๊ฐ ๋ ธํธ', | ||
content: | ||
'๋ํต๋ นยท๊ตญ๋ฌด์ด๋ฆฌยท๊ตญ๋ฌด์์ยทํ์ ๊ฐ๋ถ์ ์ฅยทํ๋ฒ์ฌํ์ ์ฌํ๊ดยท๋ฒ๊ดยท์ค์์ ๊ฑฐ๊ด๋ฆฌ์์ํ ์์ยท๊ฐ์ฌ์์ฅยท๊ฐ์ฌ์์ ๊ธฐํ ๋ฒ๋ฅ ์ด ์ ํ ๊ณต๋ฌด์์ด ์ ํ๋ฒ์ฌํ์์ ์ ์ฒญํ์ฌ ๊ทธ ์ฌํ์ ์ํ์ฌ ์ฌํํ๋ค.๋ํต๋ นยท๊ตญ๋ฌด์ด๋ฆฌยท๊ตญ๋ฌด์์ยทํ์ ๊ฐ๋ถ์ ์ฅยทํ๋ฒ์ฌํ์ ์ฌํ๊ดยท๋ฒ๊ดยท์ค์์ ๊ฑฐ๊ด๋ฆฌ์์ํ ์์', | ||
date: '2024.07.04', | ||
}, | ||
{ | ||
id: 4, | ||
title: '๊ฒฝ์ ์ํ-240703', | ||
content: | ||
'๋ํต๋ นยท๊ตญ๋ฌด์ด๋ฆฌยท๊ตญ๋ฌด์์ยทํ์ ๊ฐ๋ถ์ ์ฅยทํ๋ฒ์ฌํ์ ์ฌํ๊ดยท๋ฒ๊ดํ ๊ณต๋ฌด์์ด ๊ทธ ์ง๋ฌด์งํ์ ์์ด์ ํ๋ฒ์ด๋ ๋ฒ๋ฅ ์ ์๋ฐฐํ ๋์๋ ๊ตญํ๋ ํํต์ ์์ถ๋ฅผ ์๊ฒฐํ ์ ์๋ค. ๋ฒ๋ฅ ์ด ํ๋ฒ์ ์๋ฐ๋๋ ์ฌ๋ถ๊ฐ ์ฌํ์ ์ ์ ๊ฐ ๋ ๊ฒฝ์ฐ์๋', | ||
date: '2024.07.03', | ||
}, | ||
{ | ||
id: 5, | ||
title: '์กฐ๋ณ๊ณผ์ ํ์', | ||
content: | ||
'์๋ ํ์ธ์, ์ ๋ ์กฐ์ ๋ง์ผํ ํํธ๋ฅผ ๋งก๊ณ ์์ต๋๋ค. ์ต๊ทผ์ ์ฐ๋ฆฌ๊ฐ ์ค์ ํ ๋ง์ผํ ์ ๋ต์ ๋ํด ๋ช ๊ฐ์ง ์ ๋ฐ์ดํธ๋ฅผ ํด ๋๋ฆด๊ฒ์. ์ด๋ฒ ์ฃผ์๋ SNS ์บ ํ์ธ์ ํตํด ๋ง์ ๊ด์ฌ์ ๋์๊ณ , ํนํ Instagram์์์ ๋ฐ์์ด ์ข์์ต๋๋ค. ์ ๋ ์ฌ๋ฌด ๋ถ์์ ๋ด๋นํ๊ณ ์์ต๋๋ค. ์ง๋ ์ฃผ์๋ ์์ฅ ์กฐ์ฌ์ ๊ฒฝ์์ฌ ๋ถ์์ ๋ง์ณค๊ณ , ์ด๋ฒ ์ฃผ์๋ ์์น ์๋ฃ๋ฅผ ๋ฐํ์ผ๋ก ์ธ๋ถ์ ์ธ ์ฌ๋ฌด ๋ชจ๋ธ์ ์ค๋น ์ค์ ์์ต๋๋ค. ์์ฐ ๋ฐ ์๊ธ ์กฐ๋ฌ ๊ณํ๋ ์กฐ์ํ ์์ฑํ ๊ณํ์ ๋๋ค.', | ||
date: '2024.07.02', | ||
}, | ||
{ | ||
id: 6, | ||
title: '๊ฒฝ์ ํ์๋ก -240701', | ||
content: | ||
'์๋ ํ์ธ์, ์ฌ๋ฌ๋ถ. ๊ฒฝ์ ํ ์๋ก ์์ ์ ์์ํ๊ฒ ์ต๋๋ค. ๊ฒฝ์ ํ์ ์ฐ๋ฆฌ๊ฐ ์์์ ์ด๋ป๊ฒ ๋ถ๋ฐฐํ๊ณ ์์ฐํ๋ฉฐ ์๋นํ๋์ง๋ฅผ ์ดํดํ๋ ํ๋ฌธ์ ๋๋ค. ์ด ์์ ์์๋ ๊ฒฝ์ ํ์ ๊ธฐ๋ณธ ๊ฐ๋ ๊ณผ ์ฃผ์ ์ด๋ก ๋ค์ ๋ฐฐ์ฐ๊ณ , ์ด๋ฅผ ํ์ค ์ธ๊ณ์ ๊ฒฝ์ ํ์์ ์ ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ฐฐ์ฐ๊ฒ ๋ ๊ฒ์ ๋๋ค.', | ||
date: '2024.07.01', | ||
}, | ||
]; |
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,39 @@ | ||
@import '../../../styles/variables/colors.scss'; | ||
@import '../../../styles/variables/fonts.scss'; | ||
|
||
.wholeContainer { | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
padding: 30px 40px; | ||
} | ||
.headerContainer { | ||
@include Medium_Title_24; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
.recentScripts { | ||
color: $dark-font_5A; | ||
} | ||
|
||
.noneScriptContainer { | ||
display: flex; | ||
justify-content: center; | ||
height: 80%; | ||
align-items: center; | ||
flex-direction: column; | ||
color: $light-font_9E; | ||
} | ||
.noneScript { | ||
@include SemiBold_Body_18; | ||
} | ||
.startingScript { | ||
@include Medium_Sub_14; | ||
} | ||
.scriptContainer { | ||
display: flex; | ||
width: 100%; | ||
height: auto; | ||
flex-wrap: wrap; | ||
} |
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,5 +1,64 @@ | ||
import styles from './MyScript.module.scss'; | ||
import StartingButton from '../../../components/common/buttons/StartBtn/StartBtn'; | ||
import ScriptItem from '../../../components/common/ScriptItem/ScriptItem'; | ||
import { scriptElements } from '../../../constants/script'; | ||
|
||
const MyScript = () => { | ||
return <div>MyScript</div>; | ||
// const { data } = useQuery<IScriptElement[], Error>({ | ||
// queryKey: ['script'], | ||
// queryFn: () => getScript(), | ||
// }); | ||
|
||
return ( | ||
<div className={styles.wholeContainer}> | ||
<div className={styles.headerContainer}> | ||
<div className={styles.recentScripts}> | ||
{scriptElements ? '์ต๊ทผ ์คํฌ๋ฆฝํธ' : ''} | ||
</div> | ||
<StartingButton>๋ น์ ์์</StartingButton> | ||
</div> | ||
|
||
{!scriptElements ? ( | ||
<div className={styles.noneScriptContainer}> | ||
<h4 className={styles.noneScript}>์คํฌ๋ฆฝํธ ์์</h4> | ||
<br></br> | ||
<p className={styles.startingScript}> | ||
๋ น์ ์์ ๋ฒํผ์ ๋๋ฌ ๋ง๋ค์ด๋ณด์ธ์ | ||
</p> | ||
</div> | ||
) : ( | ||
<div className={styles.scriptContainer}> | ||
{scriptElements?.map((script) => ( | ||
<ScriptItem key={script.id} {...script} /> | ||
))} | ||
{/* <ScriptItem | ||
id="1" | ||
title="๊ฒฝ์ ํ์๋ก -240708" | ||
content="์ ๋ถ์ ์ค์์ํ์ด ๊ฒฝ์ ๋ฅผ ์ด๋ป๊ฒ ์กฐ์ ํ๊ณ , ๊ฒฝ์ ๋ฌธ์ ์ ๋์ํ๋์ง๋ฅผ ๋ค๋ฃจ๋ ๊ฒฝ์ ์ ์ฑ ์ ๋งค์ฐ ์ค์ํ ์ฃผ์ ์ ๋๋ค. ํตํ ์ ์ฑ , ์ฌ์ ์ ์ฑ ๋ฑ ๋ค์ํ ์ ์ฑ ๋๊ตฌ๋ฅผ ํตํด ๊ฒฝ์ ์ ์์ ์ฑ๊ณผ ์ฑ์ฅ์ ์ ์งํ๋ ๋ฐฉ๋ฒ์ ๋ถ์ํฉ๋๋ค." | ||
date="2024.05.07" | ||
></ScriptItem> | ||
<ScriptItem | ||
id="1" | ||
title="title" | ||
content="content" | ||
date="date" | ||
></ScriptItem> | ||
<ScriptItem | ||
id="1" | ||
title="title" | ||
content="content" | ||
date="2024.05.07" | ||
></ScriptItem> | ||
<ScriptItem | ||
id="1" | ||
title="title" | ||
content="content" | ||
date="2024.05.07" | ||
></ScriptItem> */} | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default MyScript; |
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