File tree Expand file tree Collapse file tree 4 files changed +24
-3
lines changed
Expand file tree Collapse file tree 4 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : 2024 HUFS Code Festival
3+ archived : true
4+ ---
5+
16## ๋ํ ๊ฐ์
27
38๋ํ ํํ์ด์ง([ https://codefestival.gdghufs.com ] ( https://codefestival.gdghufs.com ) ) ํตํด ์ฐธ๊ฐ ์ ์ฒญ
Original file line number Diff line number Diff line change 1- <!-- ============================================ -->
1+ ---
2+ title : 2025 HUFS Code Festival
3+ archived : false
4+ ---
25
36## ๊ฐ์
47---
Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ export const container = style({
1313 display : 'flex' ,
1414} ) ;
1515
16+ export const alert = style ( {
17+ background : '#fff3cd' ,
18+ color : '#856404' ,
19+ padding : `${ rem ( 12 ) } ${ rem ( 16 ) } ` ,
20+ borderRadius : rem ( 8 ) ,
21+ fontSize : rem ( 14 ) ,
22+ } ) ;
23+
1624export const article = style ( {
1725 width : '100%' ,
1826 maxWidth : '100%' ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default async function Page({ params }: PageProps) {
1818
1919 const filePath = path . join ( process . cwd ( ) , 'content/histories' , `${ id } .mdx` ) ;
2020 const markdownWithMeta = fs . readFileSync ( filePath , 'utf-8' ) ;
21- const { content } = matter ( markdownWithMeta ) ;
21+ const { content, data } = matter ( markdownWithMeta ) ;
2222
2323 const toc : TOCType [ ] = [ ] ;
2424
@@ -47,7 +47,12 @@ export default async function Page({ params }: PageProps) {
4747 < Layout >
4848 < BackButton className = { styles . backButton } />
4949 < div className = { styles . container } >
50- < article className = { styles . article } dangerouslySetInnerHTML = { { __html : code } } />
50+ < article className = { styles . article } >
51+ { data . archived === true && (
52+ < div className = { styles . alert } > ๐ ์ด ํ์ด์ง๋ ์ด์ ํ์ฌ์ ์ ๋ณด๋ฅผ ๋ด๊ณ ์์ต๋๋ค.</ div >
53+ ) }
54+ < div dangerouslySetInnerHTML = { { __html : code } } />
55+ </ article >
5156 < TableOfContents toc = { toc } />
5257 </ div >
5358 </ Layout >
You canโt perform that action at this time.
0 commit comments