From 4831e2d25d83c7f5ed23d889d273078fa47a4f5a Mon Sep 17 00:00:00 2001
From: Mina Choi AROUND 걸어서 닿는 명소와 맛집입니다. 걸어서 닿는 곳부터 차로 가는 곳까지 묶었습니다. 걸어서 닿는 명소와 맛집입니다. 걸어서 닿는 곳부터 차로 가는 곳까지 묶었습니다.{shownSpots.slice(0, firstSpots).map((place, i) => item(place, i))}
+
{shownSpots.length - firstSpots}곳 더 보기
+
-
- {shownSpots.slice(firstSpots).map((place, i) => item(place, i + firstSpots))}
-
+ 주변 안내
{shownSpots.length - firstSpots}곳 더 보기
- {shownSpots.length - firstSpots}곳 더 보기
- {shown.length - firstSpots}곳 더 보기
-
{lodging ?
{fixed}
} + {lodging && sub &&{sub}
}{english}
}{locality}
} - {fixed &&{fixed}
}
{sub}
}{fixed}
)} - {lodging && fixed &&{fixed}
} - {chips.length > 0 && ( -{sub}
}{fixed}
} + {sub &&{sub}
} {(stay || link || place.phone) && ({fixed}
)} - {lodging && fixed &&{fixed}
} - {chips.length > 0 && ( -{sub}
}{place.addressLocality ?? place.addressRegion}
)}{fixed}
}
{sub}
}{fixed}
)} {lodging && sub &&{sub}
} - {chips.length > 0 && ( -{fixed}
)} - {lodging && fixed &&{fixed}
} - {chips.length > 0 && ( -{sub}
}{lodging ?
{sub}
} +
{sub}
} +{sub}
} + {where &&{where}
} +{fixed}
)} - {lodging && sub &&{sub}
} +{sub}
} +{fixed}
)} - {lodging && sub &&{sub}
} +
{sub}
} +{fixed}
)} - {lodging && sub &&{sub}
} +{fixed}
)} - {lodging && sub &&{sub}
} ++ + {cycle[index % cycle.length]} + +
+ ); +} diff --git a/solution/site/src/sections/hero-catchphrase.css b/solution/site/src/sections/hero-catchphrase.css index 2d6b627..74da5c2 100644 --- a/solution/site/src/sections/hero-catchphrase.css +++ b/solution/site/src/sections/hero-catchphrase.css @@ -1,12 +1,16 @@ -.hero-catchphrase { display: block; } -.hero-catchphrase-fixed { display: block; } -.hero-catchphrase .w4d-line { display: block; margin-top: 0.5rem; min-height: 1.5em; word-break: keep-all; } +.hero-catchphrase { display: block; word-break: keep-all; } .hero-catchphrase .w4d-w { display: inline-block; overflow: hidden; vertical-align: bottom; } .hero-catchphrase .w4d-w > span { display: inline-block; animation: lodging-word-in 0.45s both; animation-delay: var(--w4d-d); } +.hero-rotator { word-break: keep-all; } +.hero-rotator-line { display: block; animation: hero-rotator-in 0.6s both; } @keyframes lodging-word-in { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } } -@media (prefers-reduced-motion: reduce) { - .hero-catchphrase .w4d-w > span { animation: none; } +@keyframes hero-rotator-in { + from { opacity: 0; transform: translateY(6px); } + to { opacity: 1; transform: translateY(0); } +} +@media (prefers-reduced-motion: reduce) { + .hero-catchphrase .w4d-w > span, .hero-rotator-line { animation: none; } } diff --git a/solution/site/src/sections/hero-catchphrase.test.tsx b/solution/site/src/sections/hero-catchphrase.test.tsx index 7613179..3305d99 100644 --- a/solution/site/src/sections/hero-catchphrase.test.tsx +++ b/solution/site/src/sections/hero-catchphrase.test.tsx @@ -1,26 +1,65 @@ import {expect, it} from 'vitest'; import {renderToStaticMarkup} from 'react-dom/server'; -import {PlaceCategory} from '@o2o/shared'; +import {PlaceCategory, type SitePayload} from '@o2o/shared'; import {SiteProvider} from '@site/lib/site-context'; import {LayoutProvider} from '@site/lib/layout'; import {LAYOUTS} from '@site/layouts'; import {MOONLIGHT_STAY_PAYLOAD} from '@site/fixtures/moonlight-stay'; import lines from '@site/lib/lodging-catchphrases.json'; -import {HeroCatchphrase} from './HeroCatchphrase'; +import {buildCycle, HeroCatchphrase, HeroRotator, weatherBucket} from './HeroCatchphrase'; -it('keeps the original lodging tagline in the static HTML', () => { - const html = renderToStaticMarkup(