feat: refresh the home page and separate match event types

Add an inhouse hero, Hall of Fame, rankings, and event-specific schedules. Carry the event type through the API and admin tools, and improve results and player history displays.
This commit is contained in:
dahyeon committed 2026-11-10 22:13:55 +09:00
1 parent 7e0cd7cb19
commit 664af15255
58 files changed
+2316 -593

No files matched your search

+3 -3
View File
@@ -3,7 +3,7 @@ import { NavLink } from "react-router";
import { PageBody, PageHero } from "../ui";
const ADMIN_SECTIONS = [
{ path: "matches", label: "내전 관리" },
{ path: "matches", label: "대회 관리" },
{ path: "tournament-codes", label: "토너먼트 코드" },
{ path: "legacy-import", label: "과거 기록 가져오기" },
{ path: "legacy-matches", label: "과거 기록 정리" },
@@ -46,7 +46,7 @@ export function AdminPage({
className={({ isActive }) =>
`flex min-h-10 items-center justify-center rounded-[10px] px-2 py-2 text-center text-xs font-bold transition-colors sm:px-4 sm:text-sm ${
isActive
? "bg-secondary text-secondary-content dark:bg-white dark:text-[#14161b]"
? "bg-secondary text-secondary-content"
: "text-content-muted hover:bg-sunken hover:text-content"
}`
}
@@ -72,7 +72,7 @@ export function AdminNotice({
return (
<main className="mx-auto w-full max-w-3xl px-4 py-16 sm:px-6">
<div className="lts-panel px-6 py-10 text-center">
<h1 className="text-lg font-bold text-content">{title}</h1>
<h1 className="text-lg font-bold">{title}</h1>
{children && (
<div className="mt-2 text-sm text-content-muted">{children}</div>
)}
@@ -0,0 +1,52 @@
.lts-hall {
--lts-hall-slant: 10px;
/* Paint the muted band edge to edge without leaving the page-width column. */
background: var(--color-background-muted);
box-shadow: 0 0 0 100vmax var(--color-background-muted);
clip-path: inset(0 -100vmax);
}
.lts-hall-card {
border-radius: 1.25rem;
}
.lts-hall-player,
.lts-hall-portrait {
border-radius: 0.75rem;
}
.lts-hall-pixel {
image-rendering: pixelated;
}
.lts-hall-crown {
rotate: 14deg;
}
@media (prefers-reduced-motion: no-preference) {
.lts-hall[data-intro] .lts-hall-portrait img {
animation: lts-hall-reveal 110ms linear
calc(180ms + var(--lts-hall-order) * 48ms) backwards;
}
}
@keyframes lts-hall-reveal {
from {
clip-path: polygon(
0 0,
0 0,
calc(0px - var(--lts-hall-slant)) 100%,
0 100%
);
}
to {
clip-path: polygon(
0 0,
calc(100% + var(--lts-hall-slant)) 0,
100% 100%,
0 100%
);
}
}
+183
View File
@@ -0,0 +1,183 @@
import type { MatchPosition } from '@lolympus/contracts';
import { ChevronRight, UserRound } from 'lucide-react';
import { useEffect, useRef, useState, type CSSProperties } from 'react';
import { Link } from 'react-router';
import { useDdragonManifest } from '../api/hooks';
import captainCrown from '../assets/captain-crown.svg';
import pixelTrophy from '../assets/pixel-trophy.svg';
import { profileIconUrl } from '../lib/ddragon';
import { positionLabel } from '../lib/league';
import { pageWidthClass } from '../ui/layout';
import './HomeHallOfFame.css';
// The roster featured on the home page is curated independently of match results.
const FEATURED_TEAM = {
name: '똥칼라파워',
captainUserId: '69f090029bf765ff8e54faae',
members: [
{
userId: '6a36268cf3a6fd12921ca016',
position: 'TOP',
gameName: 'ALLM',
tagLine: 'ALL',
profileIconId: 6091,
},
{
userId: '69f090029bf765ff8e54faae',
position: 'JGL',
gameName: 'OPIS',
tagLine: '2283',
profileIconId: 7146,
},
{
userId: '69f090039bf765ff8e54facf',
position: 'MID',
gameName: '우 킨',
tagLine: '안우킨',
profileIconId: 6622,
},
{
userId: '6a37c488f3a6fd12921cf2b4',
position: 'ADC',
gameName: '말 안해도 알잖아',
tagLine: 'Ф x Ф',
profileIconId: 6379,
},
{
userId: '69f090069bf765ff8e54fb5a',
position: 'SUP',
gameName: '툭치면 크르릉',
tagLine: 'KR1',
profileIconId: 4020,
},
] satisfies Array<{
userId: string;
position: MatchPosition;
gameName: string;
tagLine: string;
profileIconId: number;
}>,
};
export default function HomeHallOfFame({
introReady,
}: {
introReady: boolean;
}) {
const { data: manifest } = useDdragonManifest();
const sectionRef = useRef<HTMLElement>(null);
const [playIntro, setPlayIntro] = useState(false);
useEffect(() => {
const section = sectionRef.current;
if (
!introReady ||
!section ||
typeof IntersectionObserver === 'undefined' ||
window.matchMedia('(prefers-reduced-motion: reduce)').matches
) {
return;
}
const observer = new IntersectionObserver(
([entry]) => {
if (entry?.isIntersecting) setPlayIntro(true);
},
{ threshold: 0.5 },
);
observer.observe(section);
return () => observer.disconnect();
}, [introReady]);
return (
// The second grid column is left empty on purpose: it reserves room for a
// small companion card beside the hall of fame.
<section
ref={sectionRef}
aria-labelledby="home-hall-of-fame"
className={`${pageWidthClass()} lts-hall grid gap-8 py-6 md:py-8 lg:grid-cols-[minmax(0,1fr)_20rem]`}
data-intro={playIntro ? '' : undefined}
>
<div className="lts-hall-card flex min-w-0 flex-col gap-4 bg-card p-5 sm:flex-row sm:gap-5">
<h2 className="min-w-0 sm:w-36 sm:shrink-0">
<span
id="home-hall-of-fame"
className="block text-sm font-semibold text-content-muted"
>
명예의 전당
</span>
<span className="mt-2 block text-2xl leading-tight font-extrabold tracking-tight [overflow-wrap:anywhere]">
{FEATURED_TEAM.name}
</span>
<span className="mt-1 flex items-center gap-1 text-xs font-semibold text-content-muted">
<img src={pixelTrophy} alt="" className="lts-hall-pixel size-4" />
직전 멸망전 우승
</span>
</h2>
<div className="h-px bg-line sm:h-auto sm:w-px" aria-hidden="true" />
<ul
className="grid min-w-0 flex-1 gap-1 sm:grid-cols-5 sm:content-center sm:items-start"
aria-label="우승팀 선수"
>
{FEATURED_TEAM.members.map(
({ userId, position, gameName, tagLine, profileIconId }, index) => {
const icon = profileIconUrl(manifest, profileIconId);
const isCaptain = userId === FEATURED_TEAM.captainUserId;
return (
<li key={userId} className="min-w-0">
<Link
to={`/users/${userId}/history?queueGroup=internal`}
className="lts-hall-player group flex h-full items-center gap-2.5 px-2 py-2 transition-colors hover:bg-sunken focus-visible:-outline-offset-2 sm:flex-col sm:gap-2 sm:py-3 sm:text-center"
>
<span className="relative shrink-0">
{isCaptain && (
<img
src={captainCrown}
alt="팀장"
className="lts-hall-crown lts-hall-pixel absolute -top-2.5 -right-2.5 z-10 w-6"
/>
)}
<span
className="lts-hall-portrait relative grid size-10 place-items-center overflow-hidden bg-sunken-strong text-content-muted sm:size-13"
style={{ '--lts-hall-order': index } as CSSProperties}
>
<UserRound className="size-5" aria-hidden="true" />
<img
key={icon}
src={icon}
alt=""
className="absolute inset-0 size-full object-cover"
onError={(event) => {
event.currentTarget.hidden = true;
}}
/>
</span>
</span>
<span className="min-w-0 flex-1 sm:w-full sm:flex-none">
<span className="block text-xs font-semibold text-content-muted">
{positionLabel[position]}
</span>
<span className="flex flex-wrap items-baseline gap-x-1.5 sm:flex-col sm:items-center">
<span className="text-sm font-bold [overflow-wrap:anywhere] group-hover:underline">
{gameName}
</span>
<span className="text-xs text-content-muted [overflow-wrap:anywhere]">
#{tagLine}
</span>
</span>
</span>
<ChevronRight
className="size-4 shrink-0 text-content-muted sm:hidden"
aria-hidden="true"
/>
</Link>
</li>
);
},
)}
</ul>
</div>
</section>
);
}
@@ -612,11 +612,11 @@ function SkillBuildPanel({
</div>
{skillEvents.length > 0 ? (
<div className="mt-3 overflow-x-auto">
<div className="min-w-[610px] space-y-1">
<div className="min-w-[400px] space-y-1">
{SKILL_ROWS.map((row) => (
<div
key={`skill-row-${row.slot}`}
className="grid grid-cols-[2rem_repeat(18,minmax(1.45rem,1fr))] gap-1"
className="grid grid-cols-[2rem_repeat(18,minmax(1.1rem,1fr))] gap-0.5"
>
<div
className={`flex h-7 items-center justify-center text-xs font-bold ${row.className}`}
+6 -6
View File
@@ -289,7 +289,7 @@ function SummonerSpellTooltipContent({
return (
<div className="space-y-2">
<div className="font-black text-[#f0d878]">
<div className="font-black text-item-highlight">
{spell?.name ?? `스펠 ${spellId}`}
</div>
{descriptionHtml ? (
@@ -320,7 +320,7 @@ function RuneTooltipContent({
return (
<div className="space-y-2">
<div className="font-black text-[#f0d878]">
<div className="font-black text-item-highlight">
{rune?.name ?? (runeId ? `룬 ${runeId}` : "룬")}
</div>
{rune?.shortDesc ? (
@@ -349,7 +349,7 @@ function RuneStyleTooltipContent({
return (
<div className="space-y-2">
<div className="font-black text-[#f0d878]">
<div className="font-black text-item-highlight">
{style?.name ?? (styleId ? `룬 ${styleId}` : "룬")}
</div>
<div className="text-white/55">룬 스타일</div>
@@ -371,7 +371,7 @@ function ItemTooltipContent({
return (
<div className="space-y-2">
<div className="font-black text-[#f0d878]">
<div className="font-black text-item-highlight">
{item?.name ?? `아이템 ${itemId}`}
</div>
{item?.plaintext ? (
@@ -390,8 +390,8 @@ function ItemTooltipContent({
{item?.gold.total ? (
<div className="border-t border-white/10 pt-2 font-bold text-white">
가격:
<span className="text-[#f0d878]">{item.gold.total}</span>{" "}
<span className="text-[#f0d878]">
<span className="text-item-highlight">{item.gold.total}</span>{" "}
<span className="text-item-highlight">
({item.gold.base || item.gold.total})
</span>
</div>
@@ -165,12 +165,13 @@ function RoundColumn({
{bracketRoundLabel(round.stage, round.roundNumber)}
</h3>
<div className="space-y-3">
{round.seriesIds.map((seriesId) => {
{round.seriesIds.map((seriesId, index) => {
const series = seriesById.get(seriesId);
return series ? (
<SeriesScoreCard
key={series.seriesId}
series={series}
displayLabel={`${index + 1}경기`}
teamById={teamById}
/>
) : null;
@@ -55,7 +55,7 @@ export function MatchDetailTabBar({
}
return (
<div className="lts-panel sticky top-(--app-header-height) z-40 p-1">
<div className="lts-panel sticky top-(--app-header-nav-height) z-40 p-1">
<div
className="no-scrollbar flex gap-1 overflow-x-auto"
role="tablist"
@@ -79,7 +79,7 @@ export function MatchDetailTabBar({
onKeyDown={(event) => handleKeyDown(event, tab.id)}
className={`h-10 flex-none whitespace-nowrap rounded-[10px] px-4 text-sm font-bold transition-colors sm:px-5 ${
selected
? "bg-secondary text-secondary-content dark:bg-white dark:text-[#14161b]"
? "bg-secondary text-secondary-content"
: "text-content-muted hover:bg-sunken hover:text-content"
}`}
>
@@ -86,11 +86,6 @@ export function SeriesScoreCard({
<span className="block truncate text-[11px] font-bold leading-3 text-base-content/75">
{identity.label}
</span>
{identity.code && (
<span className="mt-0.5 block truncate font-mono text-[9px] leading-[10px] text-content-subtle">
{identity.code}
</span>
)}
</span>
<span
className={`inline-flex shrink-0 items-center gap-1 border px-1 py-0.5 text-[10px] font-bold leading-3 ${STATUS_TONE_CLASS[presentation.tone]}`}
@@ -58,9 +58,6 @@ export function TeamSeriesCard({
{displayLabel}
</h3>
<div className="mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-content-muted">
{series.code && (
<code className="break-all font-mono">{series.code}</code>
)}
<span>{seriesRuleLabel(series)}</span>
</div>
</div>
@@ -198,7 +198,7 @@ export function TeamTournamentCodes({
aria-label={`${seriesLabel} 토너먼트 코드`}
>
<div className="px-4 pt-3 sm:px-5">
<h4 className="text-sm font-bold text-base-content">토너먼트 코드</h4>
<h4 className="text-sm font-bold">토너먼트 코드</h4>
</div>
<ol>
{renderAssignment(nextAssignment)}