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
15 changes: 12 additions & 3 deletions src/components/Time.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function BuildUpTime() {
})} ${today.getDate()}일 ${day}`;

const hour = today.getHours();
// const getHour = hour - 12;
const min = today.getMinutes();
const sec = today.getSeconds();

Expand All @@ -31,9 +32,9 @@ export default function BuildUpTime() {
minute: "numeric",
});
const wish = ` ${
(hour <= 12 && "좋은 오전 입니다. 상쾌한 하루를 시작해 보세요!") ||
(hour <= 17 && "식사는 맛있게 하셨나요? 오후도 보람차게 보내세요!") ||
"하루 잘 마무리 하셨나요? 즐거운 저녁 되세요 "
(hour < 12 && "좋은 오전 입니다. 상쾌한 하루를 시작해 보세요!") ||
(hour < 17 && "식사는 맛있게 하셨나요? 오후도 보람차게 보내세요!") ||
(hour < 22 && "하루 잘 마무리 하셨나요? 즐거운 저녁 되세요")
}`;
return (
<div>
Expand All @@ -59,3 +60,11 @@ export default function BuildUpTime() {

// setInterval(startTime, 1000);
// return <span className="time">{ntime}</span>;
/*
if (paramType === 'day') {
unit = 1000 * 60 * 60 * 24; // 일 단위
} else if (paramType === 'hour') {
unit = 1000 * 60 * 60; // 시간
} else if (paramType === 'minute') {
unit = 1000 * 60; // 분
*/
38 changes: 35 additions & 3 deletions src/css/MainPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,44 @@ body {
display: flex;
justify-content: center;
position: absolute;
top: 50%;
left: 16%;
left: 50%;
top: 55%;
width: 100%;
transform: translate(-50%, -50%);
animation: text2-fadein 1.5s;
font-family: "Nanum Pen Script", serif;
}

@media screen and (max-width: 1200px) {
#main-clock .time-message {
font-size: 2em;
top: 60%;
color: var(--main-colco-text);
}
}
@media screen and (max-height: 800px) {
#main-clock .time-message {
font-size: 3em;
top: 60%;
color: var(--main-colco-text);
}
}
@media screen and (max-height: 500px) {
#main-clock .time-message {
font-size: 2em;
top: 60%;
color: var(--main-colco-text);
}
}

@media screen and (max-height: 300px) {
#main-clock .time-message {
font-size: 1em;
top: 70%;
color: var(--main-colco-text);
}
}

.time-box {
display: block;
position: absolute;
Expand All @@ -253,7 +285,7 @@ body {
transition: all 0.3s ease;
}

.time-message:hover {
.time-meage:hover {
color: var(--main-colco-text);
}

Expand Down