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
22 changes: 22 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>StarSync</title>
<meta name="description" content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간" />
<meta name="keywords" content="StarSync, 스타싱크, 팬, 후원, 팬 활동, 팬심, 아이돌" />
<meta name="author" content="Team StarSync" />

<meta property="og:type" content="website" />
<meta property="og:title" content="StarSync" />
<meta
property="og:description"
content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
/>
<meta property="og:image" content="https://www.starsync.wiki/default-og.png" />
<meta property="og:url" content="https://www.starsync.wiki/" />
<meta property="og:site_name" content="StarSync" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="StarSync" />
<meta
name="twitter:description"
content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
/>
<meta name="twitter:image" content="https://www.starsync.wiki/default-og.png" />

<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css" />
<style>
Expand Down
135 changes: 53 additions & 82 deletions src/pages/landing/LandingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ const LandingPage = () => {
const { list } = useLoaderData();
console.log('리스트:', list);

const DEFAULT_OG_IMAGE = 'https://www.starsync.wiki/default-og.png';

const handleClearStorage = () => {
localStorage.clear();
};
Expand Down Expand Up @@ -94,90 +92,63 @@ const LandingPage = () => {
};

return (
<>
<title>StarSync</title>
<meta name="description" content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간" />
<meta name="keywords" content="StarSync, 스타싱크, 팬, 후원, 팬 활동, 팬심, 아이돌" />
<meta name="author" content="Team StarSync" />

{/* Open Graph */}
<meta property="og:type" content="website" />
<meta property="og:title" content="StarSync" />
<meta
property="og:description"
content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
/>
<meta property="og:image" content={DEFAULT_OG_IMAGE} />
<meta property="og:url" content="https://www.starsync.wiki/" />
<meta property="og:site_name" content="StarSync" />

{/* Twitter */}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="StarSync" />
<meta
name="twitter:description"
content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
/>
<meta name="twitter:image" content={DEFAULT_OG_IMAGE} />

<div css={S.pageContainer}>
<div css={S.backgroundStarsWrapper}>
{stars.map((star) => (
<div key={star.id} css={S.starStyle(star)} />
))}
</div>

{/* Dot Navigation */}
<nav css={S.navDots}>
{sections.map((section, idx) => (
<button
key={section.id}
type="button"
css={[S.dot, activeIndex === idx && S.activeDot]}
onClick={() => handleSmoothScroll(idx)}
aria-label={`Move to ${section.id} section`}
/>
))}
</nav>
<div css={S.pageContainer}>
<div css={S.backgroundStarsWrapper}>
{stars.map((star) => (
<div key={star.id} css={S.starStyle(star)} />
))}
</div>

{/* Sections */}
{/* Dot Navigation */}
<nav css={S.navDots}>
{sections.map((section, idx) => (
<section
<button
key={section.id}
data-index={idx}
ref={(el) => {
sectionRefs.current[idx] = el;
}}
css={S.section}
>
<motion.div
css={S.sectionContent}
initial={{ opacity: 0, y: 50 }}
animate={{ opacity: activeIndex === idx ? 1 : 0.3, y: activeIndex === idx ? 0 : 50 }}
transition={{ duration: 0.8 }}
>
<h1>{section.title}</h1>
<p>{section.description}</p>
<Link to="/list" onClick={handleClearStorage}>
<CustomButton type="button" variant="landing">
{section.buttonText}
</CustomButton>
</Link>
{section.showScrollGuide && (
<button
type="button"
css={S.scrollGuide}
onClick={handleScrollGuideClick}
aria-label="Scroll to next section"
>
스크롤하여 아래로 이동
</button>
)}
</motion.div>
</section>
type="button"
css={[S.dot, activeIndex === idx && S.activeDot]}
onClick={() => handleSmoothScroll(idx)}
aria-label={`Move to ${section.id} section`}
/>
))}
</div>
</>
</nav>

{/* Sections */}
{sections.map((section, idx) => (
<section
key={section.id}
data-index={idx}
ref={(el) => {
sectionRefs.current[idx] = el;
}}
css={S.section}
>
<motion.div
css={S.sectionContent}
initial={{ opacity: 0, y: 50 }}
animate={{ opacity: activeIndex === idx ? 1 : 0.3, y: activeIndex === idx ? 0 : 50 }}
transition={{ duration: 0.8 }}
>
<h1>{section.title}</h1>
<p>{section.description}</p>
<Link to="/list" onClick={handleClearStorage}>
<CustomButton type="button" variant="landing">
{section.buttonText}
</CustomButton>
</Link>
{section.showScrollGuide && (
<button
type="button"
css={S.scrollGuide}
onClick={handleScrollGuideClick}
aria-label="Scroll to next section"
>
스크롤하여 아래로 이동
</button>
)}
</motion.div>
</section>
))}
</div>
);
};

Expand Down
69 changes: 18 additions & 51 deletions src/pages/list/ListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ const ListPage = () => {
const [voteSuccessTrigger, setVoteSuccessTrigger] = useState(false);
const { idols, donations } = useLoaderData(); // 여기서 데이터 받음

const DEFAULT_OG_IMAGE = 'https://www.starsync.wiki/default-og.png';

useEffect(() => {
const storedCredit = localStorage.getItem('selectedCredit');
if (storedCredit) {
Expand All @@ -31,57 +29,26 @@ const ListPage = () => {
};

return (
<>
<title>StarSync - 리스트</title>
<meta name="description" content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간" />
<meta name="keywords" content="StarSync, 스타싱크, 팬, 후원, 팬 활동, 팬심, 아이돌" />
<meta name="author" content="Team StarSync" />

{/* Open Graph */}
<meta property="og:type" content="website" />
<meta property="og:title" content="StarSync" />
<meta
property="og:description"
content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
<div css={S.wrapper}>
<div css={S.listTheme} />
<Charge credit={credit} setModalType={setModalType} /> {/* Charge에 credit 전달 */}
<Carousel data={donations} setModalType={setModalType} setSelectedIndex={setSelectedIndex} />
<Chart
setModalType={setModalType}
selectedTab={selectedTab}
setSelectedTab={setSelectedTab}
voteSuccessTrigger={voteSuccessTrigger}
/>
<meta property="og:image" content={DEFAULT_OG_IMAGE} />
<meta property="og:url" content="https://www.starsync.wiki/list" />
<meta property="og:site_name" content="StarSync" />

{/* Twitter */}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="StarSync" />
<meta
name="twitter:description"
content="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
<ListModal
modalType={modalType}
setModalType={setModalType}
credit={credit}
updateCredit={updateCredit}
setVoteSuccessTrigger={setVoteSuccessTrigger}
gender={selectedTab}
donations={selectedIndex != null ? donations.list[selectedIndex] : null}
/>
<meta name="twitter:image" content={DEFAULT_OG_IMAGE} />

<div css={S.wrapper}>
<div css={S.listTheme} />
<Charge credit={credit} setModalType={setModalType} /> {/* Charge에 credit 전달 */}
<Carousel
data={donations}
setModalType={setModalType}
setSelectedIndex={setSelectedIndex}
/>
<Chart
setModalType={setModalType}
selectedTab={selectedTab}
setSelectedTab={setSelectedTab}
voteSuccessTrigger={voteSuccessTrigger}
/>
<ListModal
modalType={modalType}
setModalType={setModalType}
credit={credit}
updateCredit={updateCredit}
setVoteSuccessTrigger={setVoteSuccessTrigger}
gender={selectedTab}
donations={selectedIndex != null ? donations.list[selectedIndex] : null}
/>
</div>
</>
</div>
);
};

Expand Down
Loading