Skip to content

feat: add fringe events page and API#186

Open
Link1515 wants to merge 2 commits into
mainfrom
feat/fringe-page
Open

feat: add fringe events page and API#186
Link1515 wants to merge 2 commits into
mainfrom
feat/fringe-page

Conversation

@Link1515
Copy link
Copy Markdown
Member

@Link1515 Link1515 commented Jun 2, 2026

Changes

  • 新增 /fringe 頁面,顯示周邊活動列表
  • 新增 /api/fringe server API,從 fringe sheet 讀取資料,並在 production 過濾未 publish 的項目。
  • 新增 FringeRow / Fringe 型別與 zod schema,並把 fringe 加入 sheet ID、sheet name 與 schema 對應。
  • 新增 CpFringeCard 元件,用於轉接周邊活動資料到共用卡片。
  • 新增 CpContentCard 共用元件,集中處理標題、圖片、介紹文字、外部連結與 read more/show less。
  • 重構 CpSponsorCard,改用 CpContentCard 呈現,移除重複 UI 與 i18n 邏輯。
  • 抽出 Google Drive 圖片 URL 轉換工具 transformGoogleDriveImageUrl,並套用到 sponsor 與 fringe API。

Impact

  • 影響前台 UI:新增 /fringe 頁面,贊助商卡片顯示邏輯改由共用元件處理。
  • 影響 server API:新增 /api/fringe,並調整 /api/sponsor 使用共用圖片轉換工具。
  • 影響 Google Sheets 設定:新增 fringe sheet 對應,欄位需符合 FringeRowSchema

@rileychh-dokploy-coscup
Copy link
Copy Markdown

rileychh-dokploy-coscup Bot commented Jun 2, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ❌ Failed Preview URL 2026-06-02T02:03:49.578Z

@Link1515 Link1515 requested a review from a team June 2, 2026 02:06
Copy link
Copy Markdown
Collaborator

@mirumodapon mirumodapon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我在思考如果 CpContentCard.vue 在贊助頁面與 Fringe 的頁面沒有其他改動的話,應該可以不用 CpFringeCard.vue 或是 CpSponsorCard.vue ,直接引用就可以了。

Comment thread shared/types/fringe.ts
intro_zh: z.string(),
intro_en: z.string(),
link: z.string(),
contact: z.string(),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

或許可以想想怎麼把 contact 的資訊呈現出來

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

想確認一下 contact 欄位是什麼意思呢? 是聯絡人嗎?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

對的喔

Comment thread app/pages/fringe.vue

<i18n lang="yaml">
zh:
noFringe: "周邊活動目前尚未公布。"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個文字我等等去大籌上問問,可能會需要像是:「如果有你有活動,可以到....申請」

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c41a23ee8d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread app/pages/fringe.vue

const { t } = useI18n()

const { data: fringes } = await useFetch<Fringe[]>('/api/fringe')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ensure the new page is prerendered

When this page is only added as a filesystem route, it is not discoverable by the static-generation crawler: I checked app/components/shared/CpNavbar.vue, app/components/shared/CpFooter.vue, nuxt.config.ts, and app/app.vue, and there is no link or prerenderRoutes entry for /fringe (only these new fringe files reference it). Nuxt's prerender docs note that pages not linked from a discoverable page cannot be prerendered automatically, so on the GitHub Pages deployment direct visits to /2026/fringe and /2026/en/fringe will 404 unless this route is linked or explicitly registered for prerendering.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants