Skip to content

Conversation

@yoonc01
Copy link
Collaborator

@yoonc01 yoonc01 commented Jan 1, 2025

요구사항

기본

  • 브라우저에 현재 보이는 화면의 영역(viewport) 너비를 기준으로 분기되는 반응형 디자인을 적용합니다.
    • PC: 1200px 이상
    • Tablet: 768px 이상 ~ 1199px 이하
    • Mobile: 375px 이상 ~ 767px 이하
    • 375px 미만 사이즈의 디자인은 고려하지 않습니다

랜딩 페이지

  • Tablet 사이즈로 작아질 때 “판다마켓” 로고의 왼쪽에 여백 24px, “로그인” 버튼 오른쪽 여백 24px을 유지할 수 있도록 “판다마켓” 로고와 “로그인" 버튼의 간격이 가까워집니다.
  • Mobile 사이즈로 작아질 때 “판다마켓” 로고의 왼쪽에 여백 16px, “로그인” 버튼 오른쪽 여백 16px을 유지할 수 있도록 “판다마켓” 로고와 “로그인" 버튼의 간격이 가까워집니다.
  • 화면 영역이 줄어들면 “Privacy Policy”, “FAQ”, “codeit-2024”이 있는 영역과 SNS 아이콘들이 있는 영역의 간격이 줄어듭니다.

로그인, 회원가입 페이지 공통

  • Tablet 사이즈에서 내부 디자인은 PC사이즈와 동일합니다.
  • Mobile 사이즈에서 좌우 여백 16px 제외하고 내부 요소들이 너비를 모두 차지합니다.
  • Mobile 사이즈에서 내부 요소들의 너비는 기기의 너비가 커지는 만큼 커지지만 400px을 넘지 않습니다.

[심화]

  • 페이스북, 카카오톡, 디스코드, 트위터 등 SNS에서 Linkbrary 랜딩 페이지(“/”) 공유 시 좌측 예시와 같은 미리보기를 볼 수 있도록 랜딩 페이지 메타 태그를 설정해 주세요.
  • 미리보기에서 제목은 “판다 마켓”, 설명은 “일상의 모든 물건을 거래해보세요”로 설정합니다.

주요 변경사항

sprint2 피드백 적용

스크린샷

2025-01-01.7.45.42.mov

멘토에게

반응형 작성 시 media query를 사용할 때

body {
    display: flex;
    color: white;
    padding: 0 16px;
}

@media (max-width: 1100px) {
    /*display: flex는 위에 선언되어 있음*/
    body {
        flex-direction: column;
    }
}

이런 식으로 body에서 중복되어 있는 것의 경우 다시 쓰지 않아도 되는 것을 알고 있는데
내용들이 많아지면 가독성 측면에서 이해를 위해 미디어 퀴리를 사용한 부분에 padding을 써 주는 것이 좋을까요??

@yoonc01 yoonc01 requested a review from kiJu2 January 1, 2025 10:55
@yoonc01 yoonc01 self-assigned this Jan 1, 2025
@yoonc01 yoonc01 added the 순한맛🐑 마음이 많이 여립니다.. label Jan 1, 2025
@kiJu2
Copy link
Collaborator

kiJu2 commented Jan 3, 2025

스프리트 미션 하시느라 수고 많으셨어요.
학습에 도움 되실 수 있게 꼼꼼히 리뷰 하도록 해보겠습니다. 😊

@kiJu2
Copy link
Collaborator

kiJu2 commented Jan 3, 2025

내용들이 많아지면 가독성 측면에서 이해를 위해 미디어 퀴리를 사용한 부분에 padding을 써 주는 것이 좋을까요??

흥미로운 방법이네요. 유지보수를 위해 가독성을 생각하시는 모습이 참 멋집니다 !

A 방법

body {
    display: flex;
    color: white;
    padding: 0 16px;
}

@media (max-width: 1100px) {
    body {
        flex-direction: column;
    }
}

B 방법

body {
    display: flex;
    color: white;
    padding: 0 16px;
}

@media (max-width: 1100px) {
    body {
        display: flex; /* 명시적으로 다시 선언 */
        padding: 0 16px; /* 중복 선언 */
        flex-direction: column;
    }
}

A 방법은 코드 중복을 줄일 수 있는 장점이 있으며 미디어 쿼리와 거리가 멀 수 있으므로 가독성이 저하될 수 있을 것 같아요.
B 방법은 기존에 적용한 스타일을 즉시 알 수 있다는 장점이 있으나 중복 선언이 있으므로 유지보수가 저하될 수 있을거라 사료됩니다.

만약 코드의 거리를 가까이하여 가독성도 좋고 코드 중복을 줄이고 싶다면 nesting을 시킬 수 있을 것 같아요.
다음과 같이요:

body {
    display: flex;
    color: white;
    padding: 0 16px;
    @media (max-width: 1100px) {
        flex-direction: column;
    }
}

중첩된 미디어 쿼리

(응용) 다음과 같이도 작성할 수 있습니다 !

h1 {
  background-color: aqua;

  @media (min-width: 400px) {
    background-color: blue;
    @media screen {
      @media (max-width: 800px) {
        background-color: red;
      }
    }
  }
}

견해 정도로만 봐주시면 감사드리겠습니다. 🙇‍♂️🙇‍♂️

추가로 브라우저 호환성 이슈가 있을 수 있으니 can i use 에서 확인해보시는 것도 좋겠어요 😊

Hot item
</p>
<p class="main-content-text-title">
<h2 class="main-content-text-title">
Copy link
Collaborator

Choose a reason for hiding this comment

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

굿굿 ~! 이제 제목이란 의미를 가지게 되었군요 !

피드백 반영 좋습니다 ~! 👍👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

너무 좋아요 ~! 이제 이미지가 깨지지 않겠군요 !

Comment on lines +1 to +12
const visibilityConfig = {
password: {
type: "text",
src: "/src/assets/icons/visibility_off_btn.svg",
alt: "비밀번호 숨기기",
},
text: {
type: "password",
src: "/src/assets/icons/visibility_on_btn.svg",
alt: "비밀번호 보기",
},
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

오호 객체로 중앙집중화시켜서 관리를 시키고 있군요? 🤔

흥미로운 풀이 방법이네요 👍👍

// 초기 상태 및 입력값 검증 함수
function validateInputs() {
const inputs = parent.querySelectorAll("input");
const allFilled = Array.from(inputs).every(input => input.value.trim() !== "");
Copy link
Collaborator

Choose a reason for hiding this comment

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

크으 ~! 모던 자바스크립트를 훌륭히 소화시키셨네요.

Array, forEach 등 메서드를 활용하여 가독성과 효율성이 좋은 코드가 되었네요 👍

Comment on lines +2 to +11
password: {
type: "text",
src: "/src/assets/icons/visibility_off_btn.svg",
alt: "비밀번호 숨기기",
},
text: {
type: "password",
src: "/src/assets/icons/visibility_on_btn.svg",
alt: "비밀번호 보기",
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

(선택/제안) password, texthtml에서 inputtype과 같아요.

어떤 설정의 의미인지를 명확히 하기 위해 다음과 같은 키네임은 어떤가요?:

Suggested change
password: {
type: "text",
src: "/src/assets/icons/visibility_off_btn.svg",
alt: "비밀번호 숨기기",
},
text: {
type: "password",
src: "/src/assets/icons/visibility_on_btn.svg",
alt: "비밀번호 보기",
},
showPassword: {
type: "text",
src: "/src/assets/icons/visibility_off_btn.svg",
alt: "비밀번호 숨기기",
},
hidePassword: {
type: "password",
src: "/src/assets/icons/visibility_on_btn.svg",
alt: "비밀번호 보기",
},

이는 순전히 선택적 제안입니다 ! 😊

@kiJu2
Copy link
Collaborator

kiJu2 commented Jan 3, 2025

수고하셨습니다 효준님 !
제품의 구조를 어떻게 효율적으로 관리할 수 있는지에 대해서 관심이 많으신 것 같네요 👍👍
멋진 개발자로 거듭될 모습이 보입니다 😊😊
스프린트 미션 수행하시느라 수고 많으셨습니다 🙇‍♂️

@kiJu2 kiJu2 merged commit b0fd119 into codeit-bootcamp-frontend:Basic-윤효준 Jan 3, 2025
@yoonc01 yoonc01 deleted the sprint3/효준 branch January 5, 2025 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

순한맛🐑 마음이 많이 여립니다..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants