Skip to content

Commit

Permalink
Merge pull request #39 from prgrms-web-devcourse-final-project/feat/#28
Browse files Browse the repository at this point in the history
M_002 / 말랑맵과 주 모달의 공통 컴포넌트 마크업
  • Loading branch information
gd06070 authored Nov 30, 2024
2 parents bdd4e69 + 37ae186 commit 7a7ce00
Show file tree
Hide file tree
Showing 58 changed files with 5,348 additions and 715 deletions.
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<!-- 나중에 로고 만들면 파비콘도 변경해야 함 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no"
/>

<title>말랑플레이스</title>
<meta name="title" content="말랑플레이스" />
Expand Down Expand Up @@ -57,7 +60,7 @@

<script
type="text/javascript"
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=%VITE_KAKAO_API_KEY%"
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=%VITE_KAKAO_API_KEY%&libraries=services,drawing,clusterer"
></script>
</head>

Expand Down
Binary file added public/fonts/Ownglyph-PDH.ttf
Binary file not shown.
Binary file added public/images/cursor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions router.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import BaseLayout from './src/components/layout/BaseLayout';
import MainPage from './src/pages/MainPage';
import ErrorPage from './src/pages/ErrorPage';
import LoginPage from './src/pages/LoginPage';
import RegisterPage from './src/pages/RegisterPage';
import ComponentMuseum from './src/pages/ComponentMuseum';

export const routesConfig = [
{
Expand All @@ -18,6 +22,22 @@ export const routesConfig = [
path: '/missing',
element: <>Oh No</>,
},
{
path: '/museum',
element: <ComponentMuseum />,
},
],
},
{
path: '/login',
element: <LoginPage />,
},
{
path: '/register',
element: <RegisterPage />,
},
{
path: '/*',
element: <ErrorPage />,
},
];
46 changes: 40 additions & 6 deletions src/assets/stylesheets/abstracts/_keyframes.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* _keyframes.scss */

@keyframes rotate-conic { // 회전하는 conic-gradient
@keyframes rotate-conic {
// 회전하는 conic-gradient
from {
--conic-range: 0deg;
}
Expand All @@ -10,7 +11,8 @@
}
}

@keyframes blink { // 순서대로 깜빡이는 말줄임표
@keyframes blink {
// 순서대로 깜빡이는 말줄임표
from {
opacity: 0;
}
Expand All @@ -20,9 +22,10 @@
}
}

@keyframes burger-toggle { // 햄버거 버튼
@keyframes burger-toggle {
// 햄부기 버튼
40% {
height: .1rem;
height: 0.1rem;
inset-inline-start: var(--burger-self-start);
inset-inline-end: var(--burger-self-end);
}
Expand All @@ -45,9 +48,40 @@
100% {
inset-inline-start: 0;
inset-inline-end: 0;
height: .8rem;
height: 0.8rem;
rotate: var(--burger-self-rotate) 0 0;
}
}

/* _keyframes.scss */
@keyframes pop-up-message {
// 파핑 메시지
from {
scale: 0;
}

45% {
scale: 1.2;
}

55% {
scale: 0.75;
}

70% {
scale: 1.1;
}

90% {
scale: 0.9;
}

95% {
scale: 1.05;
}

to {
scale: 1;
}
}

/* _keyframes.scss */
15 changes: 14 additions & 1 deletion src/assets/stylesheets/base/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
font-display: swap;
}

@font-face {
font-family: 'Ownglyph_PDH';
src:
local('온글잎 박다현체'),
url('/fonts/Ownglyph-PDH.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}

:root {
font-family: 'SUIT', sans-serif;
font-size: clamp(12px, 5vmin, 20px); // Reactive REM
Expand All @@ -35,7 +45,7 @@
--ff-serif-kr: 'MaruBuri', serif;
--ff-serif-en: '';
--ff-cursive: '';

--ff-dingbat: 'Ownglyph_PDH', sans-serif;
--rad-full: 25rem;
--rad-xl: 0.8rem;
--rad-lg: 0.4rem;
Expand Down Expand Up @@ -69,6 +79,9 @@ body {
font-size: var(--fnt-md);
word-break: keep-all;
transition: background-color 0.25s;
cursor:
url('/images/cursor.png') 8 8,
auto;

&.prevent-scroll {
// 모달 등을 사용할 때 <body>에 클래스를 부여하여 스크롤 방지
Expand Down
8 changes: 5 additions & 3 deletions src/assets/stylesheets/components/_areaInfoPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
display: grid;
place-items: center;
position: fixed;
inset-block-start: 4.8rem;
inset-block-start: 5.2rem;
inset-inline-start: 15.6rem;
width: 2.4rem;
height: 2.4rem;
Expand All @@ -13,16 +13,18 @@
box-shadow: var(--shd-100);
color: rgb(var(--clr-text-on-tint));
transition:
inset-inline-start 0.25s 0.1s,
inset-block-start 0.25s 0.25s,
inset-inline-start 0.25s,
background-color 0.25s;
z-index: 501;

> .remix {
rotate: -180deg;
rotate: 180deg;
transition: rotate 0.5s 0.1s;
}

&.on {
inset-block-start: 4rem;
inset-inline-start: 0.8rem;
background-color: rgb(var(--clr-notify));

Expand Down
69 changes: 69 additions & 0 deletions src/assets/stylesheets/components/_articleItem.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* _articleItem.scss */

.article-item {
display: flex;
gap: 0.8rem;

&:has(input:checked) {
> .article-item-descriptions {
background-color: rgb(var(--clr-tint-20) / 0.05);
outline: 0.2rem solid rgb(var(--clr-info) / 0.25);
}
}

&:not(:has(input:checked)):hover {
> .article-item-descriptions {
background-color: rgb(var(--clr-tint-20) / 0.05);
}
}
}

.article-item-checkbox-wrapper {
flex-shrink: 0;
display: flex;
align-items: center;
height: 2.4rem;
}

.article-item-descriptions {
display: flex;
flex-flow: column nowrap;
gap: 0.4rem;
flex: 1;
padding: 0.8rem;
border-radius: var(--rad-lg);
}

@mixin sub-descriptions {
display: flex;
align-items: center;
gap: 0.2rem;
font-size: var(--fnt-sm);
font-weight: 200;
}

.article-item-title {
@include sub-descriptions();
}

.article-item-title-text {
font-size: var(--fnt-md);
font-weight: 900;
}

.article-replies-counter {
font-weight: 400;
opacity: 0.5;
}

.article-item-category {
@include sub-descriptions();
}

.article-item-datetime {
@include sub-descriptions();

opacity: 0.5;
}

/* _articleItem.scss */
89 changes: 89 additions & 0 deletions src/assets/stylesheets/components/_chatItem.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/* _chatItem.scss */

.chat-item {
display: flex;
gap: 0.4rem;

.chat-content-container {
animation: pop-up-message 0.25s ease-in forwards 1;
}

&.opposite {
.chat-content-container {
border-top-left-radius: 0;
background-color: rgb(var(--clr-surface-100));
transform-origin: top left;
}

.chat-datetime-container {
justify-content: flex-end;
}
}

&.my {
justify-content: flex-end;

.chat-content-container {
justify-self: flex-end;
border-bottom-right-radius: 0;
background-color: rgb(var(--clr-info));
color: rgb(var(--clr-text-on-tint));
transform-origin: bottom right;
}
}
}

.chat-user-image-container {
flex-shrink: 0;
position: relative;
width: 1.8rem;
height: 1.8rem;
border: 1px solid rgb(var(--clr-text) / 0.15);
border-radius: var(--rad-full);
background-color: rgb(var(--clr-gray));
color: rgb(var(--clr-white));
overflow: clip;

> .remix {
position: absolute;
inset: 0;
margin-block-start: 0.4rem;
width: 100%;
height: 100%;
opacity: 0.5;
}
}

.chat-user-image {
position: absolute;
inset: 0;
}

.chat-body {
display: flex;
flex-flow: column nowrap;
gap: 0.2rem;
}

.chat-user-name {
font-size: var(--fnt-sm);
font-weight: 700;
opacity: 0.5;
}

.chat-content-container {
padding: 0.4rem 0.6rem;
max-width: 14rem;
border-radius: var(--rad-lg);
line-height: 1.4;
}

.chat-datetime-container {
display: flex;
align-items: center;
gap: 0.2rem;
font-size: var(--fnt-sm);
opacity: 0.5;
}

/* _chatItem.scss */
Loading

0 comments on commit 7a7ce00

Please sign in to comment.