Skip to content

Commit

Permalink
Add SUAPC BOJ problem link button
Browse files Browse the repository at this point in the history
  • Loading branch information
2093ab authored and derug committed Oct 9, 2023
1 parent cf7d84a commit 68c6c41
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 9 deletions.
4 changes: 2 additions & 2 deletions components/ArchiveButton/ArchiveButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const CustomButton = styled.div`
border: none;
`}
@media (max-width: 633px) {
@media (max-width: 766px) {
border: none;
padding: 0.2rem 0;
}
Expand Down Expand Up @@ -56,7 +56,7 @@ const ArchiveButton = styled(
text-decoration: none;
}
@media (max-width: 633px) {
@media (max-width: 766px) {
margin-left: 0;
}
`;
Expand Down
2 changes: 1 addition & 1 deletion components/ContestWrap/ContestItem/ArchiveWrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ArchiveWrap_ = css`
overflow-x: auto;
white-space: nowrap;
@media (max-width: 633px) {
@media (max-width: 766px) {
}
`;
const ArchiveWrap = ({ href, children, className }) => {
Expand Down
2 changes: 1 addition & 1 deletion components/ContestWrap/ContestItem/TextWrap/TextWrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ItemContent = styled.p`
`}
margin: 0;
@media (max-width: 633px) {
@media (max-width: 766px) {
font-size: 0.9rem;
line-height: 1.6;
}
Expand Down
6 changes: 6 additions & 0 deletions pages/suapc.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ const Suapc = () => {
/>
{currentSeasonData.fileNames ? (
<ArchiveWrap className="hide-if-mobile">
<ArchiveButton
disabled={!Boolean(currentSeasonData.links.bojProblem)}
href={currentSeasonData.links.bojProblem}
>
문제(BOJ 링크)
</ArchiveButton>
<ArchiveButton
disabled={!Boolean(currentSeasonData.fileNames.testPdf)}
disabledText="문제 PDF가 제공되지 않는 대회입니다."
Expand Down
1 change: 1 addition & 0 deletions public/history/suapc/2020 Summer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"season": "Summer",
"date": "2020년 8월 15일 오후 2시 ~ 오후 5시",
"links": {
"bojProblem": "https://www.acmicpc.net/category/799",
"scoreboard": "https://api.suapc.kr/2020s/SUAPC_2020s_Scoreboard.html"
},
"fileNames": {
Expand Down
1 change: 1 addition & 0 deletions public/history/suapc/2021 Summer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"season": "Summer",
"date": "2021년 8월 28일 오후 12시 ~ 오후 5시",
"links": {
"bojProblem": "https://www.acmicpc.net/category/detail/2757",
"scoreboard": "https://www.acmicpc.net/contest/spotboard/678"
},
"fileNames": {
Expand Down
1 change: 1 addition & 0 deletions public/history/suapc/2021 Winter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"season": "Winter",
"date": "2021년 2월 28일 오후 12시 ~ 오후 5시",
"links": {
"bojProblem": "https://www.acmicpc.net/category/detail/2446",
"scoreboard": "https://www.acmicpc.net/contest/spotboard/586"
},
"fileNames": {
Expand Down
1 change: 1 addition & 0 deletions public/history/suapc/2022 Summer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"season": "Summer",
"date": "2022년 9월 4일(일) 오후 12시 ~ 오후 5시",
"links": {
"bojProblem": "https://www.acmicpc.net/category/detail/3180",
"scoreboard": "https://www.acmicpc.net/contest/spotboard/840"
},
"fileNames": {
Expand Down
1 change: 1 addition & 0 deletions public/history/suapc/2022 Winter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"season": "Winter",
"date": "2022년 2월 26일(토) 오후 12시 ~ 오후 5시",
"links": {
"bojProblem": "https://www.acmicpc.net/category/detail/3032",
"scoreboard": "https://www.acmicpc.net/contest/spotboard/764"
},
"fileNames": {
Expand Down
1 change: 1 addition & 0 deletions public/history/suapc/2023 Summer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"season": "Summer",
"date": "2023년 8월 26일(토) 오후 12시 ~ 오후 5시",
"links": {
"bojProblem": "https://www.acmicpc.net/category/detail/3855",
"scoreboard": "https://www.acmicpc.net/contest/spotboard/1104"
},
"fileNames": {
Expand Down
1 change: 1 addition & 0 deletions public/history/suapc/2023 Winter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"season": "Winter",
"date": "2023년 2월 25일(토) 오후 12시 ~ 오후 5시",
"links": {
"bojProblem": "https://www.acmicpc.net/category/detail/3517",
"scoreboard": "https://www.acmicpc.net/contest/spotboard/950"
},
"fileNames": {
Expand Down
10 changes: 5 additions & 5 deletions styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ sitemask {
.show-if-mobile {
display: none;

@media (max-width: 633px) {
@media (max-width: 766px) {
display: block;
}
}
.hide-if-mobile {
@media (max-width: 633px) {
@media (max-width: 766px) {
display: none;
}
}
Expand All @@ -102,7 +102,7 @@ sitemask {
}
}
.hide-if-small {
@media (max-width: 633px) {
@media (max-width: 766px) {
display: block;
}
}
Expand All @@ -121,13 +121,13 @@ a:hover {
}

ul {
@media (max-width: 633px) {
@media (max-width: 766px) {
padding-left: 1rem;
}
}

li {
@media (max-width: 633px) {
@media (max-width: 766px) {
font-size: 0.9rem;
}

Expand Down

0 comments on commit 68c6c41

Please sign in to comment.