Skip to content

Commit 11450eb

Browse files
committed
Remove all site imagery
1 parent 16a9753 commit 11450eb

228 files changed

Lines changed: 335 additions & 5298 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ NEXT_PUBLIC_BASE_PATH=/koncert-together NEXT_PUBLIC_SITE_URL=https://suidge.gith
350350
本地主机或长期在线机器可以直接每天执行:
351351

352352
```bash
353-
cd /Users/neoshi/kpop-events
353+
cd /Users/neoshi/koncert2gether
354354
pnpm refresh:pages
355355
```
356356

@@ -377,7 +377,7 @@ pnpm refresh:pages
377377
推荐每天一次,足够适合当前试运行模式:
378378

379379
```cron
380-
17 6 * * * cd /Users/neoshi/kpop-events && /bin/bash -lc 'pnpm refresh:pages >> /Users/neoshi/kpop-events/.logs/pages-refresh.log 2>&1'
380+
17 6 * * * cd /Users/neoshi/koncert2gether && /bin/bash -lc 'pnpm refresh:pages >> /Users/neoshi/koncert2gether/.logs/pages-refresh.log 2>&1'
381381
```
382382

383383
建议额外准备:

app/artists/[slug]/page.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { TourPlanCard } from "@/components/tour-plan-card";
1010
import { getArtistBySlug, getArtists } from "@/lib/events";
1111
import { assetPath } from "@/lib/assets";
1212
import { communityPosts, guides, type EventItem } from "@/lib/site-data";
13-
import { formatShortDate, officialUpdates } from "@/lib/site-data";
13+
import { formatShortDate, hasDisplayVisual, officialUpdates } from "@/lib/site-data";
1414

1515
type Props = {
1616
params: Promise<{ slug: string }>;
@@ -67,8 +67,18 @@ export default async function ArtistDetailPage({ params }: Props) {
6767
</div>
6868
</div>
6969
<div className="artist-hero-visual">
70-
{artist.heroImage ? <img alt={artist.name} className="artist-hero-image" src={assetPath(artist.heroImage)} /> : null}
71-
<ImageAttributionLine attribution={artist.imageAttribution} />
70+
{artist.heroImage && hasDisplayVisual(artist.imageQuality) ? (
71+
<>
72+
<img alt={artist.name} className="artist-hero-image" src={assetPath(artist.heroImage)} />
73+
<ImageAttributionLine attribution={artist.imageAttribution} />
74+
</>
75+
) : (
76+
<article className="detail-block single-card-message">
77+
<p className="eyebrow">主视觉待补</p>
78+
<h2>这位艺人的真实图片还在补齐</h2>
79+
<p>当前先把巡演、成员档案和相关指南整理完整,等拿到可用来源后再补进主视觉。</p>
80+
</article>
81+
)}
7282
</div>
7383
<div className="artist-hero-panel">
7484
<div className="detail-row">

app/events/[slug]/page.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
type EventItem,
1111
findSourceStatus,
1212
formatShortDate,
13-
getStatusLabel
13+
getStatusLabel,
14+
hasDisplayVisual
1415
} from "@/lib/site-data";
1516

1617
type Props = {
@@ -51,8 +52,18 @@ export default async function EventDetailPage({ params }: Props) {
5152
</div>
5253
</div>
5354
<div className="detail-hero-image-wrap">
54-
{event.heroImage ? <img alt={event.title} className="detail-hero-image" src={assetPath(event.heroImage)} /> : null}
55-
<ImageAttributionLine attribution={event.heroImageAttribution} />
55+
{event.heroImage && hasDisplayVisual(event.heroImageQuality) ? (
56+
<>
57+
<img alt={event.title} className="detail-hero-image" src={assetPath(event.heroImage)} />
58+
<ImageAttributionLine attribution={event.heroImageAttribution} />
59+
</>
60+
) : (
61+
<article className="detail-block single-card-message">
62+
<p className="eyebrow">活动海报待补</p>
63+
<h2>这场还没有可直接展示的官方主视觉</h2>
64+
<p>先把票务入口、时间和出行准备整理好,等拿到官方海报或场馆图后再补进这一页。</p>
65+
</article>
66+
)}
5667
</div>
5768
<aside className="detail-panel">
5869
<div className="detail-row">

app/globals.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,44 @@ img {
624624
padding: 24px;
625625
}
626626

627+
.guide-prose > p,
628+
.guide-prose > h2,
629+
.guide-prose > h3 {
630+
margin: 0;
631+
}
632+
633+
.guide-prose {
634+
display: grid;
635+
gap: 14px;
636+
}
637+
638+
.guide-section-heading,
639+
.guide-inline-heading {
640+
color: var(--ink);
641+
line-height: 1.3;
642+
}
643+
644+
.guide-section-heading {
645+
margin-top: 8px;
646+
font-size: 1.4rem;
647+
}
648+
649+
.guide-inline-heading {
650+
font-size: 1.02rem;
651+
}
652+
653+
.guide-callout,
654+
.guide-action {
655+
padding: 14px 16px;
656+
border-radius: 18px;
657+
background: rgba(24, 20, 18, 0.045);
658+
}
659+
660+
.guide-callout {
661+
color: var(--ink);
662+
font-weight: 700;
663+
}
664+
627665
.checklist {
628666
margin: 18px 0 0;
629667
padding-left: 18px;

app/guides/[slug]/page.tsx

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,48 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
2121
};
2222
}
2323

24+
function renderGuideBody(body: string) {
25+
return body
26+
.split("\n")
27+
.map((line) => line.trim())
28+
.filter(Boolean)
29+
.map((line, index) => {
30+
if (line.startsWith("#### ")) {
31+
return (
32+
<h3 className="guide-inline-heading" key={`${index}-${line}`}>
33+
{line.replace(/^#### /, "")}
34+
</h3>
35+
);
36+
}
37+
38+
if (line.startsWith("### ")) {
39+
return (
40+
<h2 className="guide-section-heading" key={`${index}-${line}`}>
41+
{line.replace(/^### /, "")}
42+
</h2>
43+
);
44+
}
45+
46+
if (line.startsWith("**") && line.endsWith("**")) {
47+
return (
48+
<p className="guide-callout" key={`${index}-${line}`}>
49+
{line.replace(/^\*\*/, "").replace(/\*\*$/, "")}
50+
</p>
51+
);
52+
}
53+
54+
if (line.startsWith("👉 ")) {
55+
return (
56+
<p className="guide-action" key={`${index}-${line}`}>
57+
{line.replace(/^👉 /, "")}
58+
</p>
59+
);
60+
}
61+
62+
return <p key={`${index}-${line}`}>{line}</p>;
63+
});
64+
}
65+
2466
export default async function GuideDetailPage({ params }: Props) {
2567
const { slug } = await params;
2668
const guide = guides.find((item) => item.slug === slug);
@@ -40,10 +82,15 @@ export default async function GuideDetailPage({ params }: Props) {
4082
<div className="detail-copy">
4183
<p className="eyebrow">{categoryLabel}</p>
4284
<h1>{guide.title}</h1>
43-
<p className="hero-text">{guide.body}</p>
85+
<p className="hero-text">{guide.summary}</p>
4486
</div>
4587
</section>
4688
<section className="detail-content single-column">
89+
<article className="detail-block guide-prose">
90+
<p className="eyebrow">正文</p>
91+
<h2>先把决策顺序想清楚</h2>
92+
{renderGuideBody(guide.body)}
93+
</article>
4794
<article className="detail-block">
4895
<p className="eyebrow">重点速记</p>
4996
<h2>重点记住</h2>
@@ -154,6 +201,19 @@ export default async function GuideDetailPage({ params }: Props) {
154201
</div>
155202
</article>
156203
) : null}
204+
{guide.practical?.links?.length ? (
205+
<article className="detail-block">
206+
<p className="eyebrow">继续阅读</p>
207+
<h2>相关页面</h2>
208+
<div className="link-row">
209+
{guide.practical.links.map((item) => (
210+
<a className="ticket-link" href={item.href} key={item.href}>
211+
{item.label}
212+
</a>
213+
))}
214+
</div>
215+
</article>
216+
) : null}
157217
</section>
158218
</main>
159219
);

app/page.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { assetPath } from "@/lib/assets";
1010
import {
1111
communityPosts,
1212
guides,
13+
hasDisplayVisual,
14+
hasRealVisual,
1315
launchHighlights,
1416
slugifyArtistName,
1517
uniqueCountries
@@ -19,11 +21,11 @@ export default async function HomePage() {
1921
const [events, artists, plans] = await Promise.all([getEvents(), getArtists(), getTourPlans()]);
2022
const countries = uniqueCountries(events);
2123
const cities = new Set(events.map((event) => event.city));
22-
const sourcedArtists = artists.filter((artist) => artist.imageAttribution);
23-
const collageArtists = (sourcedArtists.length ? sourcedArtists : artists).slice(0, 4);
24+
const sourcedArtists = artists.filter((artist) => hasRealVisual(artist.imageQuality));
25+
const collageArtists = (sourcedArtists.length ? sourcedArtists : artists.filter((artist) => hasDisplayVisual(artist.imageQuality))).slice(0, 4);
2426
const featuredArtistCards = [
25-
...sourcedArtists,
26-
...artists.filter((artist) => !artist.imageAttribution)
27+
...artists.filter((artist) => hasRealVisual(artist.imageQuality)),
28+
...artists.filter((artist) => !hasRealVisual(artist.imageQuality))
2729
].slice(0, 9);
2830

2931
return (
@@ -80,7 +82,7 @@ export default async function HomePage() {
8082
<div className="hero-collage">
8183
{collageArtists.map((artist) => (
8284
<Link className="hero-collage-card" href={`/artists/${artist.slug}`} key={artist.slug}>
83-
{artist.coverImage ? <img alt={artist.name} src={assetPath(artist.coverImage)} /> : null}
85+
{artist.coverImage && hasDisplayVisual(artist.imageQuality) ? <img alt={artist.name} src={assetPath(artist.coverImage)} /> : null}
8486
<span>{artist.name}</span>
8587
</Link>
8688
))}

components/artist-card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Link from "next/link";
22
import { assetPath } from "@/lib/assets";
3+
import { hasDisplayVisual } from "@/lib/site-data";
34
import type { ArtistProfile } from "@/lib/site-data";
45

56
type Props = {
@@ -11,7 +12,7 @@ type Props = {
1112
export function ArtistCard({ artist, eventCount, planCount = 0 }: Props) {
1213
return (
1314
<article className="artist-card" style={{ ["--artist-accent" as string]: artist.accent }}>
14-
{artist.coverImage ? (
15+
{artist.coverImage && hasDisplayVisual(artist.imageQuality) ? (
1516
<div className="artist-visual-frame">
1617
<img alt={`${artist.name} visual`} className="artist-visual" src={assetPath(artist.coverImage)} />
1718
</div>

components/event-card.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import {
55
type EventItem,
66
findArtistByName,
77
formatDate,
8-
getStatusLabel
8+
getStatusLabel,
9+
hasDisplayVisual
910
} from "@/lib/site-data";
1011

1112
type Props = {
@@ -17,7 +18,7 @@ export function EventCard({ event }: Props) {
1718

1819
return (
1920
<article className="event-card">
20-
{event.heroImage ? (
21+
{event.heroImage && hasDisplayVisual(event.heroImageQuality) ? (
2122
<div className="event-visual-frame">
2223
<img alt={`${event.artist} ${event.city}`} className="event-visual" src={assetPath(event.heroImage)} />
2324
</div>

0 commit comments

Comments
 (0)