Skip to content

Commit

Permalink
🌈 Design: λŒ“κΈ€ μ»΄ν¬λ„ŒνŠΈ μž‘μ„±, 기타 반볡 μ•„μ΄ν…œ μ»΄ν¬λ„ŒνŠΈ ν˜•μ‹ λ§žμΆ”μ–΄ μˆ˜μ • (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoRaang committed Nov 29, 2024
1 parent cd94f2b commit 1ce1c5e
Show file tree
Hide file tree
Showing 9 changed files with 253 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/assets/stylesheets/components/_articleItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

&:has(input:checked) {
> .article-item-descriptions {
background-color: rgb(var(--clr-alert) / 0.05);
outline: 0.2rem solid rgb(var(--clr-alert) / 0.25);
background-color: rgb(var(--clr-tint-20) / 0.05);
outline: 0.2rem solid rgb(var(--clr-info) / 0.25);
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/assets/stylesheets/components/_mallangsItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

.mallang-item {
display: flex;
align-items: center;
gap: 0.6rem;
gap: 0.8rem;
padding: 0.8rem;
}

Expand All @@ -28,9 +27,11 @@
width: 100%;
height: 100%;

&.not-exist {
&.non-exist {
width: 2rem;
height: auto;
rotate: -15deg;
opacity: 0.5;
}
}
}
Expand Down
83 changes: 83 additions & 0 deletions src/assets/stylesheets/components/_replyItem.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* _replyItem.scss */

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

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

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

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

.reply-item-user {
display: flex;
align-items: center;
}

.reply-item-user-controls {
display: flex;
align-items: center;
gap: 0.4rem;
margin-inline-start: auto;
}

.reply-content-wrapper {
display: flex;
gap: 0.4rem;
}

.reply-depth-indicator {
flex-shrink: 0;
width: 1.2rem;

&::before {
display: block;
margin-inline-start: auto;
width: 55%;
height: 0.5rem;
border-bottom-left-radius: var(--rad-sm);
border-block-end: 1px solid rgb(var(--clr-text) / 0.25);
border-inline-start: 1px solid rgb(var(--clr-text) / 0.25);
content: '';
}
}

.reply-content-container {
display: flex;
flex-flow: column nowrap;
gap: 0.4rem;
}

.reply-content-text {
line-height: 1.4;
}

.reply-item-datetime {
display: flex;
align-items: center;
gap: 0.4rem;
font-size: var(--fnt-sm);
font-weight: 200;
opacity: 0.5rem;
}

/* _replyItem.scss */
4 changes: 2 additions & 2 deletions src/assets/stylesheets/components/_reviewItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

&:has(input:checked) {
> .review-item-descriptions {
background-color: rgb(var(--clr-alert) / 0.05);
outline: 0.2rem solid rgb(var(--clr-alert) / 0.25);
background-color: rgb(var(--clr-tint-20) / 0.05);
outline: 0.2rem solid rgb(var(--clr-info) / 0.25);
}
}
}
Expand Down
93 changes: 86 additions & 7 deletions src/assets/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2759,8 +2759,7 @@ input[type=checkbox]:is([data-checkbox-type=toggle]):focus + label .switch-rail
/* _mallangsItem.scss */
.mallang-item {
display: flex;
align-items: center;
gap: 0.6rem;
gap: 0.8rem;
padding: 0.8rem;
}

Expand All @@ -2786,9 +2785,11 @@ input[type=checkbox]:is([data-checkbox-type=toggle]):focus + label .switch-rail
width: 100%;
height: 100%;
}
.mallang-image-container > .mallang-image.not-exist {
.mallang-image-container > .mallang-image.non-exist {
width: 2rem;
height: auto;
rotate: -15deg;
opacity: 0.5;
}

.mallang-item-descriptions {
Expand Down Expand Up @@ -2835,8 +2836,8 @@ input[type=checkbox]:is([data-checkbox-type=toggle]):focus + label .switch-rail
gap: 0.8rem;
}
.review-item:has(input:checked) > .review-item-descriptions {
background-color: rgb(var(--clr-alert)/0.05);
outline: 0.2rem solid rgb(var(--clr-alert)/0.25);
background-color: rgb(var(--clr-tint-20)/0.05);
outline: 0.2rem solid rgb(var(--clr-info)/0.25);
}

.review-item-checkbox-wrapper {
Expand Down Expand Up @@ -2873,8 +2874,8 @@ input[type=checkbox]:is([data-checkbox-type=toggle]):focus + label .switch-rail
gap: 0.8rem;
}
.article-item:has(input:checked) > .article-item-descriptions {
background-color: rgb(var(--clr-alert)/0.05);
outline: 0.2rem solid rgb(var(--clr-alert)/0.25);
background-color: rgb(var(--clr-tint-20)/0.05);
outline: 0.2rem solid rgb(var(--clr-info)/0.25);
}

.article-item-checkbox-wrapper {
Expand Down Expand Up @@ -2930,6 +2931,84 @@ input[type=checkbox]:is([data-checkbox-type=toggle]):focus + label .switch-rail
}

/* _articleItem.scss */
/* _replyItem.scss */
.reply-item {
display: flex;
gap: 0.8rem;
}
.reply-item:has(input:checked) > .reply-item-body {
background-color: rgb(var(--clr-tint-20)/0.05);
outline: 0.2rem solid rgb(var(--clr-info)/0.25);
}

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

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

.reply-item-user {
display: flex;
align-items: center;
}

.reply-item-user-controls {
display: flex;
align-items: center;
gap: 0.4rem;
margin-inline-start: auto;
}

.reply-content-wrapper {
display: flex;
gap: 0.4rem;
}

.reply-depth-indicator {
flex-shrink: 0;
width: 1.2rem;
}
.reply-depth-indicator::before {
display: block;
margin-inline-start: auto;
width: 55%;
height: 0.5rem;
border-bottom-left-radius: var(--rad-sm);
border-block-end: 1px solid rgb(var(--clr-text)/0.25);
border-inline-start: 1px solid rgb(var(--clr-text)/0.25);
content: "";
}

.reply-content-container {
display: flex;
flex-flow: column nowrap;
gap: 0.4rem;
}

.reply-content-text {
line-height: 1.4;
}

.reply-item-datetime {
display: flex;
align-items: center;
gap: 0.4rem;
font-size: var(--fnt-sm);
font-weight: 200;
opacity: 0.5rem;
}

/* _replyItem.scss */
/* _modalFormInput.scss */
#modal-form-input-container {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions src/assets/stylesheets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
'components/notificationCard', 'components/userProfileCard',
'components/areaInfoPanel', 'components/mainModalCover',
'components/mainModal', 'components/mallangsItem', 'components/reviewItem',
'components/articleItem', 'components/modalFormInput',
'components/receiveChat', 'components/sendChat',
'components/articleItem', 'components/replyItem',
'components/modalFormInput', 'components/receiveChat', 'components/sendChat',
'components/settingMallangs', 'components/searchUserLocation',
'components/userLocationMap', 'components/totalSearch';
6 changes: 1 addition & 5 deletions src/components/common/ArticleItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ const ArticleItem = ({
<article className="article-item">
{isEditMode && (
<div className="article-item-checkbox-wrapper">
<input
type="checkbox"
name="check-something"
id={`chkArticleItem${index}`}
/>
<input type="checkbox" id={`chkArticleItem${index}`} />

<label htmlFor={`chkArticleItem${index}`}>
<div className="toggles-indicator">
Expand Down
59 changes: 59 additions & 0 deletions src/components/common/ReplyItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import dateFormat from '../../utils/dateFormat';
import hourFormat from '../../utils/hourFormat';
import NameTag from './NameTag';
import Remix from './Remix';

const ReplyItem = ({
index = 0,
userObject = { userID: 0, userImage: null, userName: '홍길동' },
replyContent = 'μž‘μ„±λœ λ‚΄μš©μ΄ μ—†μ–΄μš”.',
writtenDateTime = '1970-01-01',
isMyReply = false,
isEditMode = false,
}) => {
return (
<article className="reply-item">
{isEditMode && (
<div className="reply-item-checkbox-wrapper">
<input type="checkbox" id={`chkReplyItem${index}`} />

<label htmlFor={`chkReplyItem${index}`}>
<div className="toggles-indicator">
<Remix iconName={'check-line'} iconSize={0.6} />
</div>
</label>
</div>
)}

<div className="reply-item-body">
<div className="reply-item-user">
<NameTag userObject={userObject} />

{isMyReply && (
<div className="reply-item-user-controls">
<span>μˆ˜μ •</span>
<span>Β·</span>
<span>μ‚­μ œ</span>
</div>
)}
</div>

<div className="reply-content-wrapper">
<div className="reply-depth-indicator"></div>

<div className="reply-content-container">
<div className="reply-content-text">{replyContent}</div>

<div className="reply-item-datetime">
<span>{dateFormat(writtenDateTime)}</span>
<span>Β·</span>
<span>{hourFormat(writtenDateTime)}</span>
</div>
</div>
</div>
</div>
</article>
);
};

export default ReplyItem;
21 changes: 14 additions & 7 deletions src/pages/ComponentMuseum.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import ReviewTotalScore from '../components/common/ReviewTotalScore';
import ModalSectionTitle from '../components/common/ModalSectionTitle';
import ModalDateSeparator from '../components/common/ModalDateSeparator';
import ModalFormInput from '../components/common/ModalFormInput';
import SendChatItem from '../components/common/SendChatItem';
import ReceiveChatItem from '../components/common/ReceiveChatItem';
import ReplyItem from '../components/common/ReplyItem';

const ComponentMuseum = () => {
return (
Expand All @@ -17,11 +16,10 @@ const ComponentMuseum = () => {
marginBlockStart: '6.4rem',
}}
>
이곳은 곡용 μ»΄ν¬λ„ŒνŠΈμ˜ λ°•λ¬Όκ΄€... μ›ν•˜λŠ” 것을 골라 μ“°μ‹œμ˜€...
<div>
<SendChatItem />
<ReceiveChatItem />
</div>
<p style={{ marginBlock: '4rem' }}>
이곳은 곡용 μ»΄ν¬λ„ŒνŠΈμ˜ λ°•λ¬Όκ΄€... μ›ν•˜λŠ” 것을 골라 μ“°μ‹œμ˜€...
</p>

<ModalFormInput />
<ModalDateSeparator />
<ModalSectionTitle />
Expand All @@ -39,10 +37,19 @@ const ComponentMuseum = () => {
}}
>
<ModalInstruction
index={0}
instEmoji="⚠️"
instHeadline="μ•—!"
instContent="무언가 μ‹ λ¬˜ν•œ 기뢄이 λ“ λ‹€"
/>
<ReplyItem />
<ReplyItem
index={1}
replyContent="이것이 λ‚˜μ˜ 진심 λŒ“κΈ€μ΄λ‹€"
writtenDateTime="2024-12-24 21:31"
isMyReply={true}
isEditMode={true}
/>
<MallangItem />
<MallangItem isEditMode={true} />
<ReviewItem index={1} />
Expand Down

0 comments on commit 1ce1c5e

Please sign in to comment.