Skip to content
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
30 changes: 17 additions & 13 deletions src/components/introduce/IntroduceForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';

import Moment from 'react-moment';

import facepaint from 'facepaint';
import styled from '@emotion/styled';

import { authorizedUsersNumber, changeDateToTime } from '../../util/utils';
Expand All @@ -11,30 +12,30 @@ import palette from '../../styles/palette';
import DateTimeChange from '../common/DateTimeChange';
import IntroduceActionButtons from './IntroduceActionButtons';

const mq = facepaint([
'@media(min-width: 1024px)',
'@media(min-width: 1150px)',
]);
Comment on lines +15 to +18
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

공통되는 부분이 많다. 리팩토링해주는게 좋을 거 같다.


const IntroduceReferenceWrapper = styled.div`
font-size: 1.1rem;

${mq({
fontSize: ['2vw', '0.9rem', '1.1rem'],
})};

display: flex;
justify-content: space-evenly;
margin-bottom: 1.5rem;
padding: 1rem;
border-radius: 0.75rem;
background-color: ${palette.gray[1]};

align-items: center;

label {
font-weight: bold;
line-height: 3rem;
margin-right: .7rem;
}

@media (max-width: 1024px) {
font-size: 1rem;
padding: 0.5rem;
width: auto;
}

@media (max-width: 768px) {
width: 100%;
}
`;

const ModeratorWrapper = styled.div`
Expand All @@ -57,7 +58,10 @@ const ModeratorWrapper = styled.div`
`;

const IntroduceReference = styled.div`
padding-right: 50px;
${mq({
paddingRight: ['4vw', '30px', '50px'],
})};

border-right: 0.1rem solid ${palette.gray[3]};
`;

Expand Down
6 changes: 2 additions & 4 deletions src/components/main/StudyGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import palette from '../../styles/palette';
import DateTimeChange from '../common/DateTimeChange';

const mq = facepaint([
'@media(min-width: 767px)',
'@media(min-width: 650px)',
'@media(min-width: 1024px)',
]);

const StudyGroupWrapper = styled.div(() => mq({
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
margin: ['1rem 0px 0px 0px', '.5rem', '1rem'],
margin: ['1rem 0px 1rem 0px', '0.5rem', '1rem'],
borderRadius: '4px',
border: `2px solid ${palette.gray[4]}`,
width: ['100%', 'calc(50% - 2rem)', '19rem'],
Expand Down Expand Up @@ -60,7 +60,6 @@ const ContentLink = styled(Link)`
const StudyInfoWrapper = styled.div`
padding: 0 1rem 1rem 1rem;
display: flex;
flex: 1 1 0%;
flex-direction: column;

.moderator{
Expand All @@ -72,7 +71,6 @@ const StudyInfoWrapper = styled.div`
const StudyContentWrapper = styled.div`
padding: 0 1rem 0 1rem;
display: block;
flex: 1 1 0%;

p {
text-overflow: ellipsis;
Expand Down
18 changes: 15 additions & 3 deletions src/styles/DateTimeStatus.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import React from 'react';

import facepaint from 'facepaint';
import styled from '@emotion/styled';
import { css } from '@emotion/react';

import palette from './palette';

const mq = facepaint([
'@media(min-width: 1024px)',
'@media(min-width: 1150px)',
]);

const DateTimeStatusWrapper = styled.div`
font-size: 1rem;
${mq({
fontSize: ['1.5vw', '0.8rem', '1.1rem'],
height: ['30px', '30px', '40px'],
})};

font-weight: 600;
font-family: 'Gamja Flower', cursive;
display: inline-flex;
Expand Down Expand Up @@ -41,11 +51,14 @@ const DateTimeStatusWrapper = styled.div`
&& css`
margin-bottom: 0.5rem;
background: #ff6b6b;
${mq({
fontSize: ['0.8rem', '1rem'],
height: ['15px', '20px'],
})};
`}

${({ status }) => status === 'introduceRecruit'
&& css`
font-size: 1.1rem;
align-items: center;
margin: 0;
padding: .2rem 40px .2rem 40px;
Expand All @@ -71,7 +84,6 @@ const DateTimeStatusWrapper = styled.div`

${({ status }) => status === 'introduceDeadline'
&& css`
font-size: 1.1rem;
align-items: center;
margin: 0;
padding: 0 40px 0 40px;
Expand Down