Repository navigation
docs: new landing headline and a thumbnail on the YouTube box - #744
Open
JuroOravec wants to merge 1 commit into
Open
JuroOravec wants to merge 1 commit into
JuroOravec wants to merge 1 commit into
Conversation
The landing headline and the README title now read "Safe, fast, and
smart Python frontend engineered for AI agents." On the landing page the
last two words sit in a span that starts its own line, so the headline
renders as four lines ("Safe, fast, and smart / Python frontend /
engineered for / AI agents.") from 340px to wide desktops. The type
steps down so the first line fits beside the code panel, and a width cap
keeps a wide single column from merging lines.
The click-to-load YouTube box shows the video's thumbnail before the
click. The picture is a file this site serves (docs_site/static/img/
video-thumbnails/), so the page still loads nothing from YouTube or
Google before the click. A new `thumbnail` argument takes the path and
rejects anything outside /static/. docs_site/scripts/youtube_thumbnail.py
downloads a thumbnail for a video id, and docs/codebase.md says how to
refresh it when the video is re-recorded.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KUhrHajiCFnw2F7nAGf2Rh
This branch has not been deployed
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.
What changed
Two changes to the docs site landing page. The docs site and the root README are the only things that change. No published package (
citry,citry-core,citry-ui, ...) changes, so nothing the 1.x promise covers moves, and no changelog entry is needed.1. New headline
The headline is now "Safe, fast, and smart Python frontend engineered for AI agents." in
docs_site/content/index.mdand in the README title (README.mdline 5, which ships to PyPI; the line has no links, so the published-README rules are unaffected).git grep -i "engineered for"andgit grep -i "the complete python"find no other copy outsidedocs/design/and the archiveddocs_site/versions/snapshots, which stay as they are. Social cards use the page title and description, not the headline, so no generated image changes.How the line break works:
<span class="landing-hero__tail">AI agents.</span>inside the Markdown heading. The span isdisplay: blockinlanding.py, so "AI agents." starts its own line. A span (not a<br>) keeps the heading text one sentence for search and screen readers, andlinkify_headingsstill wraps the whole heading in its permalink<a>..landing-content .landing-hero h1:line-height: 1.1; text-wrap: auto;as the maintainer tried.Three CSS values differ from the maintainer's test, and all three are needed to get his four lines at every width:
clamp(2.7rem, 4.9vw, 4rem)(wasclamp(2.9rem, 5.6vw, 4.6rem)), the largest size where the first line still fits. Please check the size in your browser; it is the one visible change beyond what was asked.max-width: 10.5emreplacesmax-width: 15ch. Without a cap, a wide single column (601 to 720px, code panel hidden) fit "Python frontend engineered" on one line.clamp(2.4rem, 10vw, 3.6rem)(wasclamp(2.6rem, 11vw, 3.6rem)) so the first line fits on a phone too.Rendered lines measured in Chromium with a script that reads the line of every character (no horizontal overflow at any width):
At 390px the headline is four lines with "AI agents." on the last one, and the lede and buttons follow directly. At 320px the first line cannot fit, so it wraps to five lines with "AI agents." still last.
2. Thumbnail on the YouTube box
<c-youtube-video>showed a blank dark rectangle until clicked. It now shows the video's picture behind the play button, and still loads nothing from YouTube or Google before the click.thumbnailargument: a path under/static/. Anything else (for example ani.ytimg.comURL) stops the docs build with an error that names the value, so a remote picture cannot be added by mistake. Without it, the box looks as before.docs_site/static/img/video-thumbnails/d3nPqvDdNB0.jpg(1280 by 720, 156 KB, frommaxresdefault.jpg). The button keeps its play icon and itsaria-label. The image has descriptivealttext because the docsalt_textcheck warns on an empty one (andbuild-check --strictruns in the release workflow).site.css: the image fills the 16:9 box withobject-fit: coverand a dark layer keeps the white play button and label readable. The new rules apply only to a box that holds a picture, because archived docs versions share this stylesheet. Measured: the box is the same size before and after a delayed image arrives (no layout shift), at 1440 and 390px.docs_site/scripts/youtube_thumbnail.py <video id>downloads a thumbnail (falls back frommaxresdefault.jpgtohqdefault.jpgon 404, rejects non-JPEG and cut-off answers, refuses to overwrite a file unless--replace).docs/codebase.md("Add a video thumbnail") says how to refresh it when the video is re-recorded.thumbnail.Heads-up: the current picture is a frame of the recording that shows a "Stop the recording to save it" pop-up. It goes away when the video is re-recorded and the script is run for the new id.
Checks
docs_site/tests/test_youtube_video.py,test_youtube_thumbnail.py,test_landing_component.py(58 passed);ruff checkandruff format --checkondocs_sitepass.python -m docs_site build-check --strict: 0 errors, 0 warnings.python scripts/check.py --profile fast --reporter agentran with a debug build ofcitry-core: every phase passed (cargo fmt, clippy, test; ruff; mypy; pyright; Node phases; validators; Vue render parity) except one test in the pytest phase:packages/py/citry/tests/test_i18n_format.py::test_the_python_bounds_match_what_the_formatter_accepts[1e-32768-True](1 failed, 20125 passed). It fails withattempt to add with overflowinside thefixed_decimalcrate, a check Rust compiles into debug builds only. This change touches no code undercrates/orpackages/, so I expect CI, which builds a release wheel, to pass. I did not build a release to confirm.alt(strict build warning), the headline's phone and tablet wraps, the script's check for cut-off downloads, error messages, and several comments and doc passages. The security pass found no hole (thethumbnailvalue is author-only, and rendered attribute values are escaped).Versioning
Docs site and README only. Nothing in
crates/orpackages/changes, so there is no 1.x behavior change.🤖 Generated with Claude Code
https://claude.ai/code/session_01KUhrHajiCFnw2F7nAGf2Rh