Repository navigation
Dx11 · 所有球场图统一成绿草地配白线 - #445
Merged
Merged
Conversation
tokens.css now holds the pitch colours (grass, lighter stripe, chalk, edge, and a CSS grass background), light and night. SVG pitches draw the shared <Grass> component; the overlay preview uses --pv-pitch-grass. Labels drawn on the lineups and attacking-lanes pitches turn chalk white. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做了什么
网站上所有画球场的地方都改成了真实的绿色草地、白色线条,带深浅相间的割草条纹。原来的球场是浅灰绿色,看起来不像球场。
改到的地方:阵容看板、回放和实时看板上的球场、转折点详情页的球场、比赛片段回放、统计页的射门图 / 热力图 / 传球网络 / 平均站位、赛后报告的进攻路线图、实时射门小卡片,以及叠加层预览的背景。
颜色现在只在一个地方定义(样式变量文件),以后要调颜色只改一处。夜间模式下草地暗一些,但还是绿色。写在球场上的球员名字、评分、百分比改成了白字,在草地上看得清。
需要队友做什么
怎么确认它能用
打开任意一场比赛,依次点 阵容、回放、数据,再打开一个转折点和叠加层预览页(
/overlay/<比赛编号>?preview=1),球场都应该是绿草地。电脑切到深色模式再看一遍。转折点详情页的截图用的是前端自带的演示数据(
?fixture=1),因为本机后端没有连 AI,生成不了转折点。其他截图来自本机后端跑的 Tessmouth United 4–3 Vantry Town。类型检查通过,前端 48 组共 412 个测试全部通过。
Closes #442
给写代码的同学
apps/web/src/styles/tokens.css(和副本docs/design/tokens.css):--pv-pitch(草地、深色条)、--pv-pitch-stripe(浅色条)、--pv-pitch-line(白线)、--pv-pitch-edge(球场边框)、--pv-pitch-grass(给 CSS 背景用的条纹渐变)。夜间两处(媒体查询和data-theme="dark")一起改。apps/web/src/components/Grass.tsx:底色加 12 条割草条纹,along="x" | "y"决定条纹方向。用在Pitch.tsx、viz/pitch.tsx、Lineups.tsx(竖向)、report/Lanes.tsx、live/LiveCentre.tsx。后两处原来是圆角浅色块,现在是直角草地加白色外框。styles/base.css:.pitch、.lu-pitch边框用--pv-pitch-edge;删掉没用了的.lu-grass;.lu-line不透明度 .55 → .9;.lu-nm、.lu-rt、.lu-offmk改白字加半透明深色描边。styles/report.css:.rp-turf/.lc-turf只画白框,线改白;路线箭头加白边;百分比和标签改白字加描边。styles/overlay.css:预览背景从写死的两种绿换成var(--pv-pitch-grass)。d/Dx10-Dx11-screenshots分支,只为 PR 引用,不要合并那个分支。🤖 Generated with Claude Code