Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[공통] 헤더, 사이드 패널 컴포넌트화 #272

Merged
merged 6 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
440 changes: 4 additions & 436 deletions src/component/common/Header/Header.module.scss

Large diffs are not rendered by default.

264 changes: 264 additions & 0 deletions src/component/common/Header/MobilePanel/MobilePanel.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
.mobile-header {
display: flex;
width: 100%;
height: 100%;
padding: 20px;
box-sizing: border-box;
text-align: center;
align-items: center;
justify-content: space-between;

.header--main & {
padding: 20px;
}

&__icon {
padding: 0;
border: 0;
width: 24px;
height: 24px;
background-color: transparent;
cursor: pointer;

& > svg {
width: 18px;
height: 12px;
}

.header--main & {
top: 26px;
}

&--left {
left: 16px;
}

&--right {
right: 16px;

.header--main & {
right: 26px;
}
}
}

&__title {
font-size: 16px;
height: 100%;
display: flex;
align-items: center;

.header--main & {
justify-content: flex-start;
}

& > svg {
width: 58px;
height: 32px;
}
}

&__panel {
position: fixed;
top: 0;
left: 0;
box-sizing: border-box;
width: 100vw;
height: 100vh;
min-width: 360px;
padding-bottom: 40px;
background-color: #fff;
z-index: 20;
overflow: scroll;
transform: translateX(100%);
transition: all 0.3s cubic-bezier(0, 0, 0.2, 1);

&--show {
transform: translateX(0);
}
}

&__user {
width: 100%;
height: 111px;
box-sizing: border-box;
color: #175c8e;
font-size: 14px;
padding: 0 16px;
background: #fff;
position: sticky;
top: 0;
left: 0;
}

&__backspace {
display: block;
margin: 18px 0 8px -2px;
padding: 0;
border: 0;
width: 28px;
height: 28px;
background-color: transparent;
cursor: pointer;

& > img {
width: 100%;
height: 100%;
}
}

&__greet {
font-size: 16px;
font-family: "Noto Sans CJK KR", sans-serif;
display: block;
max-width: 240px;
text-align: left;
margin-bottom: 16px;
font-weight: bold;

& > span {
font-size: 13px;
font-weight: normal;
}
}

&__my-info {
margin-right: auto;
width: 80px;
font-family: "Noto Sans CJK KR", sans-serif;
font-size: 15px;
font-weight: normal;
color: black;
line-height: 24px;

::before {
display: inline-block;
width: 24px;
height: 24px;
margin-right: 4px;
content: "";
background: url("http://static.koreatech.in/assets/img/ic-bottom_myinfo.png") center/24px 24px;
}

& > a {
display: flex;
color: inherit;
text-decoration: inherit;
}
}

&__link {
margin-right: 15px;
font-family: "Noto Sans CJK KR", sans-serif;
font-size: 15px;
color: #252525;
cursor: pointer;

& + & {
margin-left: 15px;
margin-right: 0;
}

.mobile-header__my-info + & {
margin-left: 9px;
text-align: left;
}

& > a {
background-color: transparent;
color: inherit;
}

& > button {
padding: 0;
border: 0;
background-color: transparent;
color: inherit;
font-size: inherit;
font-family: inherit;
text-decoration: inherit;
cursor: pointer;
}
}

&__auth-menu {
display: flex;
justify-content: flex-end;
align-items: center;
font-family: "Noto Sans CJK KR", sans-serif;
font-size: 15px;
font-weight: normal;
color: #252525;
list-style: none;

.mobile-header__panel--logged-in & {
justify-content: space-around;
}
}

&__category-title {
width: 100%;
box-sizing: border-box;
padding: 5px 16px;
margin-top: 8px;
margin-bottom: 8px;
font-family: "Noto Sans CJK KR", sans-serif;
font-size: 15px;
font-weight: normal;
color: #858585;
background-color: #f7f7f7;
text-align: left;
}

&__sub-menus {
display: flex;
flex-wrap: wrap;
width: 100%;
list-style: none;
}

&__sub-menu {
display: block;
padding: 8px 20px;
width: 50%;
font-family: "Noto Sans CJK KR", sans-serif;
font-size: 15px;
background: #fff;
box-sizing: border-box;
border-collapse: collapse;
text-decoration: none;
text-align: left;
color: #252525;
font-weight: 500;
cursor: pointer;

& > a {
color: inherit;
text-decoration: inherit;

&:hover {
color: #f7941e;
font-weight: 700;
outline: none;
}
}
}

&__logo {
position: absolute;

&--koin {
right: 16px;
top: 16px;
width: 40px;
height: 40px;
}

&--bcsd {
right: 16px;
bottom: 20px;
width: 33px;
height: 33px;
}
}
}
Loading
Loading