docs: play a short entrance animation in the home page hero - #71
Merged
Merged
Conversation
The hero illustration now plays a short entrance once on load and then rests on the same static picture as before: | Time | What happens | |---|---| | 0.1s | the yellow ring around the illustration is drawn (1.1s) | | 0.15s | the review card rises | | 0.3s | the ring around "already checked" is drawn | | 0.35s | the "clang-format 21 · clang-tidy 21" pin slides in | | 0.45s | the three diff lines slide in one after another | | 0.85s | the github-actions clang-tidy suggestion rises | | 1.05s | the small check beside the headline is drawn | | 1.45s | "Commit suggestion" is pressed | | 1.7s | the auto-fix commit chip pops up | | 2.0s | the large check is drawn | It is CSS only: a block of keyframes in `home.css`, and `pathLength="1"` on the four hand-drawn paths in `home.html`, which the drawing needs. With "reduce motion" turned on, nothing moves. The strokes keep their width when the SVGs stretch (`vector-effect: non-scaling-stroke`), so on screen a path is 0.67 to 1.25 times its `pathLength` (measured at 375px and 1280px). The drawing uses 1.5-long dashes to cover that, and its last frame removes the dashes, so the finished picture is the unchanged static stroke. Checked with `mkdocs serve` at 1280px and 375px wide by seeking the animations to 0.1, 0.55, 0.9, 1.05, 1.65 and 2.05 seconds and to the end: no stray stroke before the drawing starts, the end state matches the current page, and there is no horizontal scroll.
✅ Deploy Preview for cpp-linter-github-io ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
The hero illustration now plays a short entrance once on load and then rests on the same static picture as before:
It is CSS only: a block of keyframes in
home.css, andpathLength="1"on the four hand-drawn paths inhome.html, which the drawing needs. With "reduce motion" turned on, nothing moves.The strokes keep their width when the SVGs stretch (
vector-effect: non-scaling-stroke), so on screen a path is 0.67 to 1.25 times itspathLength(measured at 375px and 1280px). The drawing uses 1.5-long dashes to cover that, and its last frame removes the dashes, so the finished picture is the unchanged static stroke.Checked with
mkdocs serveat 1280px and 375px wide by seeking the animations to 0.1, 0.55, 0.9, 1.05, 1.65 and 2.05 seconds and to the end: no stray stroke before the drawing starts, the end state matches the current page, and there is no horizontal scroll.