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
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fandom-K | StarSync</title>
<title>StarSync</title>
<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
Binary file added public/default-og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
135 changes: 82 additions & 53 deletions src/pages/landing/LandingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ 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 @@ -92,63 +94,90 @@ const LandingPage = () => {
};

return (
<div css={S.pageContainer}>
<div css={S.backgroundStarsWrapper}>
{stars.map((star) => (
<div key={star.id} css={S.starStyle(star)} />
))}
</div>
<>
<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} />

{/* Dot Navigation */}
<nav css={S.navDots}>
<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>

{/* Sections */}
{sections.map((section, idx) => (
<button
<section
key={section.id}
type="button"
css={[S.dot, activeIndex === idx && S.activeDot]}
onClick={() => handleSmoothScroll(idx)}
aria-label={`Move to ${section.id} section`}
/>
))}
</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 }}
data-index={idx}
ref={(el) => {
sectionRefs.current[idx] = el;
}}
css={S.section}
>
<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>
<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: 51 additions & 18 deletions src/pages/list/ListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ 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 @@ -29,26 +31,57 @@ const ListPage = () => {
};

return (
<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}
<>
<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="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
/>
<ListModal
modalType={modalType}
setModalType={setModalType}
credit={credit}
updateCredit={updateCredit}
setVoteSuccessTrigger={setVoteSuccessTrigger}
gender={selectedTab}
donations={selectedIndex != null ? donations.list[selectedIndex] : null}
<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="별처럼 연결되는 우리, 모든 별이 하나로 이어지는 순간"
/>
</div>
<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>
</>
);
};

Expand Down
Loading