Skip to content

Commit

Permalink
Merge branch 'Style/#1504-responsive-css' of github.com:42organizatio…
Browse files Browse the repository at this point in the history
…n/42gg.client into Style/#1504-responsive-css
  • Loading branch information
irenee-14 committed Aug 29, 2024
2 parents 87efcbf + b61a5b3 commit ae87f61
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 42 deletions.
68 changes: 36 additions & 32 deletions components/agenda/Home/AgendaTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
import Image from 'next/image';
import Link from 'next/link';
import MyAgendaBtn from 'components/agenda/Home/MyAgendaBtn';
import styles from 'styles/agenda/Home/AgendaTitle.module.scss';

const AgendaTitle = () => {
return (
<div className={styles.agendaTitleContainer}>
<div className={styles.agendaTitleButtonContainer}>AGENDA</div>
<div className={styles.agendaTitleButtonContainer}>
<Link href={`/agenda/create`}>
<button className={styles.agendaCreateBtn}>
<div>개최신청</div>
<div className={styles.imageWrapper}>
<Image
src='/image/agenda/ArrowRight.svg'
width={35}
height={35}
alt='Create Agenda'
className={styles.imageBox}
/>
</div>
</button>
</Link>
<Link href={`/agenda/ticket`}>
<button className={styles.agendaCreateBtn}>
<div>티켓 확인하기</div>
<div className={styles.imageWrapper}>
<Image
src='/image/agenda/ArrowRight.svg'
width={35}
height={35}
alt='Create Agenda'
className={styles.imageBox}
/>
</div>
</button>
</Link>
<>
<div className={styles.agendaTitleContainer}>
<div className={`${styles.agendaTitle}`}>AGENDA</div>
<div className={styles.agendaTitleButton}>
<Link href={`/agenda/create`}>
<button className={styles.agendaCreateBtn}>
<div>개최신청</div>
<div className={styles.imageWrapper}>
<Image
src='/image/agenda/ArrowRight.svg'
width={35}
height={35}
alt='Create Agenda'
className={styles.imageBox}
/>
</div>
</button>
</Link>
<Link href={`/agenda/ticket`}>
<button className={styles.agendaCreateBtn}>
<div>티켓 확인하기</div>
<div className={styles.imageWrapper}>
<Image
src='/image/agenda/ArrowRight.svg'
width={35}
height={35}
alt='Create Agenda'
className={styles.imageBox}
/>
</div>
</button>
</Link>
</div>
</div>
</div>
<MyAgendaBtn />
</>
);
};

Expand Down
2 changes: 0 additions & 2 deletions pages/agenda/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { AgendaDataProps } from 'types/agenda/agendaDetail/agendaTypes';
import type { NextPage } from 'next';
import AgendaList from 'components/agenda/Home/AgendaList';
import AgendaTitle from 'components/agenda/Home/AgendaTitle';
import MyAgendaBtn from 'components/agenda/Home/MyAgendaBtn';
import { TestModal, TestModal2 } from 'components/agenda/modal/testModal';
import PageNation from 'components/Pagination';
import useFetchGet from 'hooks/agenda/useFetchGet';
Expand All @@ -30,7 +29,6 @@ const Agenda: NextPage = () => {
return (
<div className={styles.agendaPageContainer}>
<AgendaTitle />
<MyAgendaBtn />
<div className={listStyles.agendaListTextWrapper}>
<h2>AGENDA LIST</h2>
<div>
Expand Down
7 changes: 7 additions & 0 deletions styles/agenda/Home/Agenda.module.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
@import 'styles/agenda/common.scss';

.agendaPageContainer {
@include layout;
display: flex;
width: 100%;
flex-direction: column;
padding: 1rem 0;
margin: 0;
gap: 1.5rem;
@media screen and (min-width: 961px) {
gap: 0rem;
> div:not(:first-child) {
margin-bottom: 1.5rem;
}
}
}
14 changes: 13 additions & 1 deletion styles/agenda/Home/AgendaTitle.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,24 @@
padding: 0 1rem;
@include text(main-menu);

.agendaTitleButtonContainer {
.agendaTitle {
@include gridHidden(mobile);
}
.agendaTitleButton,
.agendaTitle {
display: flex;
flex-direction: column;
gap: 1rem;
align-items: flex-end;
}
.agendaTitleButton {
@media screen and (min-width: 961px) {
position: absolute;
top: 5rem;
right: 6rem;
flex-direction: row;
}
}

.agendaCreateBtn {
display: flex;
Expand Down
3 changes: 3 additions & 0 deletions styles/agenda/Home/MyAgendaBtn.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
transition: width 0.15s ease, height 0.15s ease;
gap: 1rem;
@include text(sub-menu);
@include gridHead;
}

.myAgendaContainer.expandedHeight {
height: 28rem;
@include gridHead;
}

.myAgendaContainer.expandedWidth {
width: 23rem;
@include gridHead;
}

.myAgendaBtnToggle {
Expand Down
16 changes: 9 additions & 7 deletions styles/agenda/responsive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@media screen and (min-width: 481px) and (max-width: 960px) {
display: flex;
flex-direction: column;
padding: 0 5rem;
// padding: 0 5rem;
border: 2px solid blue;
}
@media screen and (min-width: 961px) {
Expand All @@ -55,10 +55,12 @@
// 헤더에 붙어있는 부분
@mixin gridHead {
@include action;
// @media screen and (min-width: 481px) and (max-width: 960px) {
// }
// @media screen and (min-width: 961px) {
// }
@media screen and (min-width: 961px) {
width: calc(100%);
border: var(--default-border);
border-top: none;
border-radius: 0 0 $radius-big $radius-big;
}
}

// 아래 컨테이너 중 가장 위에 있는 부분
Expand All @@ -76,11 +78,11 @@
@include action;
@if ($view == 'web') {
@media screen and (max-width: 960px) {
display: none;
display: none !important;
}
} @else {
@media screen and (min-width: 961px) {
display: none;
display: none !important;
}
}
}

0 comments on commit ae87f61

Please sign in to comment.