웹 페이지 프론트엔드 UI 수정
- 모바일에서 봤을 때 UI/UX 이상하고 불편했던 부분 수정 - 블로그 글 모바일 크기 시 리스트 아래로 글이 내려가는 부분 수정 - 전체 배경 이어 붙이기가 아닌 고정으로 스크롤 시에도 어색하지 않게 수정
This commit is contained in:
12
package-lock.json
generated
12
package-lock.json
generated
@@ -58,7 +58,6 @@
|
|||||||
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.27.1",
|
"@babel/code-frame": "^7.27.1",
|
||||||
"@babel/generator": "^7.28.5",
|
"@babel/generator": "^7.28.5",
|
||||||
@@ -1525,7 +1524,6 @@
|
|||||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"acorn": "bin/acorn"
|
"acorn": "bin/acorn"
|
||||||
},
|
},
|
||||||
@@ -1631,7 +1629,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"baseline-browser-mapping": "^2.9.0",
|
"baseline-browser-mapping": "^2.9.0",
|
||||||
"caniuse-lite": "^1.0.30001759",
|
"caniuse-lite": "^1.0.30001759",
|
||||||
@@ -1853,7 +1850,6 @@
|
|||||||
"integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==",
|
"integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.8.0",
|
"@eslint-community/eslint-utils": "^4.8.0",
|
||||||
"@eslint-community/regexpp": "^4.12.1",
|
"@eslint-community/regexpp": "^4.12.1",
|
||||||
@@ -2381,8 +2377,7 @@
|
|||||||
"version": "1.9.4",
|
"version": "1.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
||||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
|
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause"
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"node_modules/levn": {
|
"node_modules/levn": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
@@ -2636,7 +2631,6 @@
|
|||||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
@@ -2698,7 +2692,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
||||||
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
|
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0"
|
"loose-envify": "^1.1.0"
|
||||||
},
|
},
|
||||||
@@ -2711,7 +2704,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
|
||||||
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
|
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
"scheduler": "^0.23.0"
|
"scheduler": "^0.23.0"
|
||||||
@@ -3006,7 +2998,6 @@
|
|||||||
"integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
|
"integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.27.0",
|
"esbuild": "^0.27.0",
|
||||||
"fdir": "^6.5.0",
|
"fdir": "^6.5.0",
|
||||||
@@ -3128,7 +3119,6 @@
|
|||||||
"integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==",
|
"integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/colinhacks"
|
"url": "https://github.com/sponsors/colinhacks"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,12 @@
|
|||||||
padding: 40px 20px 80px;
|
padding: 40px 20px 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.site-main {
|
||||||
|
padding: 20px 16px 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes fadeUp {
|
@keyframes fadeUp {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|||||||
@@ -91,3 +91,36 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.site-nav__inner {
|
||||||
|
padding: 14px 16px;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-nav__brand {
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-nav__logo-image {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-nav__title {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-nav__subtitle {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-nav__links {
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-nav__link {
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,13 +11,21 @@ body {
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: radial-gradient(1000px 600px at 15% 5%, rgba(247, 168, 165, 0.25), transparent 60%),
|
background: radial-gradient(2000px 1200px at 15% 5%, rgba(247, 168, 165, 0.25), transparent 70%),
|
||||||
radial-gradient(800px 600px at 85% 0%, rgba(253, 212, 177, 0.18), transparent 60%),
|
radial-gradient(1600px 1200px at 85% 0%, rgba(253, 212, 177, 0.18), transparent 70%),
|
||||||
|
radial-gradient(1500px 800px at 50% 50%, rgba(151, 201, 170, 0.1), transparent 80%),
|
||||||
#0f0d12;
|
#0f0d12;
|
||||||
|
background-attachment: fixed;
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
font-family: var(--font-body);
|
font-family: var(--font-body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
body {
|
||||||
|
background-attachment: scroll;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,29 @@
|
|||||||
align-items: start;
|
align-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blog-toggle-list {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
top: 20px;
|
||||||
|
left: 20px;
|
||||||
|
z-index: 1000;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: rgba(10, 12, 20, 0.8);
|
||||||
|
color: var(--text);
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-toggle-list:hover {
|
||||||
|
transform: scale(1.1);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
.blog-list {
|
.blog-list {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
@@ -184,7 +207,10 @@
|
|||||||
|
|
||||||
.blog-article__body h1,
|
.blog-article__body h1,
|
||||||
.blog-article__body h2,
|
.blog-article__body h2,
|
||||||
.blog-article__body h3 {
|
.blog-article__body h3,
|
||||||
|
.blog-article__body h4,
|
||||||
|
.blog-article__body h5,
|
||||||
|
.blog-article__body h6 {
|
||||||
font-family: var(--font-display);
|
font-family: var(--font-display);
|
||||||
margin: 22px 0 10px;
|
margin: 22px 0 10px;
|
||||||
}
|
}
|
||||||
@@ -201,6 +227,18 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blog-article__body h4 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h5 {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h6 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.md-paragraph {
|
.md-paragraph {
|
||||||
margin: 0 0 14px;
|
margin: 0 0 14px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
@@ -220,6 +258,11 @@
|
|||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blog-article__body del {
|
||||||
|
text-decoration: line-through;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.blog-article__body a {
|
.blog-article__body a {
|
||||||
color: #f7d4c9;
|
color: #f7d4c9;
|
||||||
}
|
}
|
||||||
@@ -325,4 +368,104 @@
|
|||||||
.blog-grid {
|
.blog-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blog-toggle-list {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list.is-visible {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(6, 8, 12, 0.7);
|
||||||
|
z-index: 999;
|
||||||
|
padding: 80px 20px 20px;
|
||||||
|
overflow-y: auto;
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list.is-visible .blog-category-filter {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list.is-visible .blog-pagination {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.blog-header h1 {
|
||||||
|
font-size: clamp(24px, 6vw, 32px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-grid {
|
||||||
|
gap: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list {
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list__item {
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list__title {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-list__excerpt {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h2 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h4 {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h5 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-article__body h6 {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-categories__grid {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||||
|
gap: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-category-card {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import './Blog.css';
|
|||||||
const renderInline = (text) => {
|
const renderInline = (text) => {
|
||||||
const normalized = text.replace(/<br\s*\/?>/gi, '\n');
|
const normalized = text.replace(/<br\s*\/?>/gi, '\n');
|
||||||
const pattern =
|
const pattern =
|
||||||
/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g;
|
/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|\*[^*]+\*|~~[^~]+~~|`[^`]+`)/g;
|
||||||
const segments = normalized.split('\n');
|
const segments = normalized.split('\n');
|
||||||
|
|
||||||
return segments.flatMap((segment, segmentIndex) => {
|
return segments.flatMap((segment, segmentIndex) => {
|
||||||
@@ -48,6 +48,9 @@ const renderInline = (text) => {
|
|||||||
if (part.startsWith('*')) {
|
if (part.startsWith('*')) {
|
||||||
return <em key={`${part}-${index}`}>{part.replace(/\*/g, '')}</em>;
|
return <em key={`${part}-${index}`}>{part.replace(/\*/g, '')}</em>;
|
||||||
}
|
}
|
||||||
|
if (part.startsWith('~~')) {
|
||||||
|
return <del key={`${part}-${index}`}>{part.replace(/~~/g, '')}</del>;
|
||||||
|
}
|
||||||
if (part.startsWith('`')) {
|
if (part.startsWith('`')) {
|
||||||
return <code key={`${part}-${index}`}>{part.replace(/`/g, '')}</code>;
|
return <code key={`${part}-${index}`}>{part.replace(/`/g, '')}</code>;
|
||||||
}
|
}
|
||||||
@@ -123,6 +126,18 @@ const renderMarkdown = (body) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (line.startsWith('###### ')) {
|
||||||
|
blocks.push({ type: 'h6', value: line.replace(/^######\s+/, '') });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (line.startsWith('##### ')) {
|
||||||
|
blocks.push({ type: 'h5', value: line.replace(/^#####\s+/, '') });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (line.startsWith('#### ')) {
|
||||||
|
blocks.push({ type: 'h4', value: line.replace(/^####\s+/, '') });
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (line.startsWith('### ')) {
|
if (line.startsWith('### ')) {
|
||||||
blocks.push({ type: 'h3', value: line.replace(/^###\s+/, '') });
|
blocks.push({ type: 'h3', value: line.replace(/^###\s+/, '') });
|
||||||
return;
|
return;
|
||||||
@@ -146,6 +161,9 @@ const renderMarkdown = (body) => {
|
|||||||
if (block.type === 'h1') return <h1 key={index}>{block.value}</h1>;
|
if (block.type === 'h1') return <h1 key={index}>{block.value}</h1>;
|
||||||
if (block.type === 'h2') return <h2 key={index}>{block.value}</h2>;
|
if (block.type === 'h2') return <h2 key={index}>{block.value}</h2>;
|
||||||
if (block.type === 'h3') return <h3 key={index}>{block.value}</h3>;
|
if (block.type === 'h3') return <h3 key={index}>{block.value}</h3>;
|
||||||
|
if (block.type === 'h4') return <h4 key={index}>{block.value}</h4>;
|
||||||
|
if (block.type === 'h5') return <h5 key={index}>{block.value}</h5>;
|
||||||
|
if (block.type === 'h6') return <h6 key={index}>{block.value}</h6>;
|
||||||
if (block.type === 'list')
|
if (block.type === 'list')
|
||||||
return (
|
return (
|
||||||
<ul key={index}>
|
<ul key={index}>
|
||||||
@@ -202,6 +220,7 @@ const Blog = () => {
|
|||||||
|
|
||||||
const [selectedCategory, setSelectedCategory] = useState('전체');
|
const [selectedCategory, setSelectedCategory] = useState('전체');
|
||||||
const [page, setPage] = useState(1);
|
const [page, setPage] = useState(1);
|
||||||
|
const [showList, setShowList] = useState(false);
|
||||||
const pageSize = 10;
|
const pageSize = 10;
|
||||||
const filteredPosts = useMemo(() => {
|
const filteredPosts = useMemo(() => {
|
||||||
if (selectedCategory === '전체') return posts;
|
if (selectedCategory === '전체') return posts;
|
||||||
@@ -250,7 +269,15 @@ const Blog = () => {
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div className="blog-grid">
|
<div className="blog-grid">
|
||||||
<aside className="blog-list">
|
<button
|
||||||
|
type="button"
|
||||||
|
className="blog-toggle-list"
|
||||||
|
onClick={() => setShowList((prev) => !prev)}
|
||||||
|
aria-label="글 목록 토글"
|
||||||
|
>
|
||||||
|
☰
|
||||||
|
</button>
|
||||||
|
<aside className={`blog-list ${showList ? 'is-visible' : ''}`}>
|
||||||
<div className="blog-category-filter">
|
<div className="blog-category-filter">
|
||||||
{['전체', ...categoryNames, '기타'].map((name) => (
|
{['전체', ...categoryNames, '기타'].map((name) => (
|
||||||
<button
|
<button
|
||||||
@@ -272,7 +299,10 @@ const Blog = () => {
|
|||||||
className={`blog-list__item${
|
className={`blog-list__item${
|
||||||
post.slug === activeSlug ? ' is-active' : ''
|
post.slug === activeSlug ? ' is-active' : ''
|
||||||
}`}
|
}`}
|
||||||
onClick={() => setActiveSlug(post.slug)}
|
onClick={() => {
|
||||||
|
setActiveSlug(post.slug);
|
||||||
|
setShowList(false); // 모바일에서 글 선택 시 리스트 숨김
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<p className="blog-list__title">{post.title}</p>
|
<p className="blog-list__title">{post.title}</p>
|
||||||
<p className="blog-list__excerpt">{post.excerpt}</p>
|
<p className="blog-list__excerpt">{post.excerpt}</p>
|
||||||
|
|||||||
@@ -308,3 +308,51 @@
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.home-hero h1 {
|
||||||
|
font-size: clamp(24px, 6vw, 36px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-grid {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-card {
|
||||||
|
padding: 14px;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-card__title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-card__desc {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-posts {
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-post {
|
||||||
|
padding: 14px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-post__title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-profile__card {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-profile__name {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-profile__bio {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ const Home = () => {
|
|||||||
<p className="home-hero__kicker">Personal Archive</p>
|
<p className="home-hero__kicker">Personal Archive</p>
|
||||||
<h1>기록을 모으고, 이야기를 이어붙이는 작은 집.</h1>
|
<h1>기록을 모으고, 이야기를 이어붙이는 작은 집.</h1>
|
||||||
<p className="home-hero__lead">
|
<p className="home-hero__lead">
|
||||||
개발 실험, 여행 스냅, 그리고 생각을 모아두는 공간입니다. 블로그 글은
|
개발, 여행 스냅, 그리고 생각을 모아두는 공간입니다.
|
||||||
마크다운으로 작성해 계속 추가할 수 있어요.
|
|
||||||
</p>
|
</p>
|
||||||
<div className="home-hero__actions">
|
<div className="home-hero__actions">
|
||||||
<Link className="button primary" to="/blog">
|
<Link className="button primary" to="/blog">
|
||||||
|
|||||||
@@ -337,3 +337,43 @@
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.lotto-header h1 {
|
||||||
|
font-size: clamp(24px, 6vw, 32px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lotto-grid {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||||
|
gap: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lotto-panel {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lotto-panel__head {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lotto-row {
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lotto-ball {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lotto-meta__title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lotto-history__item {
|
||||||
|
padding: 14px;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,6 +24,12 @@
|
|||||||
font-size: clamp(30px, 4vw, 40px);
|
font-size: clamp(30px, 4vw, 40px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.travel-header h1 {
|
||||||
|
font-size: clamp(24px, 6vw, 32px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.travel-sub {
|
.travel-sub {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
@@ -52,6 +58,13 @@
|
|||||||
gap: 18px;
|
gap: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.travel-grid {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.travel-albums {
|
.travel-albums {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
@@ -80,6 +93,12 @@
|
|||||||
background: rgba(10, 12, 20, 0.6);
|
background: rgba(10, 12, 20, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.travel-map__canvas {
|
||||||
|
min-height: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.travel-map__info {
|
.travel-map__info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
@@ -189,6 +208,12 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.travel-card {
|
||||||
|
min-height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.travel-card.is-wide {
|
.travel-card.is-wide {
|
||||||
grid-column: span 2;
|
grid-column: span 2;
|
||||||
}
|
}
|
||||||
@@ -352,6 +377,14 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.travel-modal__arrow {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.travel-card__meta {
|
.travel-card__meta {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ const Travel = () => {
|
|||||||
const [regionsGeojson, setRegionsGeojson] = useState(null);
|
const [regionsGeojson, setRegionsGeojson] = useState(null);
|
||||||
const [selectedPhotoIndex, setSelectedPhotoIndex] = useState(null);
|
const [selectedPhotoIndex, setSelectedPhotoIndex] = useState(null);
|
||||||
const [modalOffset, setModalOffset] = useState(24);
|
const [modalOffset, setModalOffset] = useState(24);
|
||||||
|
const [touchStartX, setTouchStartX] = useState(null);
|
||||||
const cacheRef = useRef(new Map());
|
const cacheRef = useRef(new Map());
|
||||||
const cacheTtlMs = 10 * 60 * 1000;
|
const cacheTtlMs = 10 * 60 * 1000;
|
||||||
|
|
||||||
@@ -292,8 +293,42 @@ const Travel = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleTouchStart = (event) => {
|
||||||
|
if (selectedPhotoIndex === null) return;
|
||||||
|
const touch = event.touches[0];
|
||||||
|
setTouchStartX(touch.clientX);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleTouchEnd = (event) => {
|
||||||
|
if (selectedPhotoIndex === null || touchStartX === null) return;
|
||||||
|
const touch = event.changedTouches[0];
|
||||||
|
const deltaX = touch.clientX - touchStartX;
|
||||||
|
if (Math.abs(deltaX) > 50) { // 스와이프 거리 임계값
|
||||||
|
if (deltaX > 0) {
|
||||||
|
// 왼쪽으로 스와이프: 이전 사진
|
||||||
|
setSelectedPhotoIndex((prev) =>
|
||||||
|
prev === null
|
||||||
|
? prev
|
||||||
|
: (prev - 1 + photos.length) % photos.length
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// 오른쪽으로 스와이프: 다음 사진
|
||||||
|
setSelectedPhotoIndex((prev) =>
|
||||||
|
prev === null ? prev : (prev + 1) % photos.length
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setTouchStartX(null);
|
||||||
|
};
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
return () => window.removeEventListener('keydown', handleKeyDown);
|
window.addEventListener('touchstart', handleTouchStart);
|
||||||
|
window.addEventListener('touchend', handleTouchEnd);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener('keydown', handleKeyDown);
|
||||||
|
window.removeEventListener('touchstart', handleTouchStart);
|
||||||
|
window.removeEventListener('touchend', handleTouchEnd);
|
||||||
|
};
|
||||||
}, [photos.length, selectedPhotoIndex]);
|
}, [photos.length, selectedPhotoIndex]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user