Repository navigation
Add a preview of the landing page under new subdirectory - #4
Conversation
Adds the initial Carbon landing page as static HTML, CSS, and JS under preview/, served at https://carbon-lang.dev/preview/ for review in the open. - Uses system font stacks, with no external font requests. - Fetches GitHub stars, forks, and open issues live from the GitHub API (cached for an hour) instead of hardcoding them. - Responsive layout with a menu button on narrow screens. - The hero code sample is examples/hello_world.carbon from carbon-lang. - Reuses the favicon from the carbon-lang docs site. Root index.html, 404.html, and robots.txt are unchanged, so carbon-lang.dev/ still redirects to GitHub and the preview isn't indexed. Launching later means moving preview/* to the root. Assisted-by: Google Antigravity
Adds a hello_world.h panel below hello_world.carbon. The Carbon code keeps the Core.PrintStr line from examples/hello_world.carbon and also imports the header and calls its function, so the hero shows C++ interop next to the copy that describes it. Both files were compiled, linked, and run with the 0.0.0-0.nightly.2026.10.27 toolchain. Note that with the nightly CLI, Core.PrintStr also needs lib/carbon/core/io.impl.carbon compiled and linked. Code panels now scroll horizontally instead of clipping long lines. Assisted-by: Google Antigravity
lnihlen
left a comment
There was a problem hiding this comment.
Great initial job here! I've noted a few minor nits. One overall question, and entirely for a future PR effort. I see the aria labels, have you tested this with a screen reader? Is there any way we can set up some automated accessibility testing? I've heard there are OSS tools for this, are you familiar with any?
|
Oh also, the favicon is rendering weirdly for me - I see some kind of noise in the transparent area outside of the |
Not with a real screen reader yet, only automated checks so far (contrast, ARIA, headings, headless Chrome). For automated testing, axe-core, pa11y-ci or Lighthouse CI could run in a GitHub Action on every PR. Happy to set one up in a follow-up PR.
Resolved offline. |
Adds the initial Carbon landing page as static HTML, CSS, and JS under
preview/, served at https://carbon-lang.dev/preview/ for review in the open.(cached for an hour) instead of hardcoding them.
examples/hello_world.carbonextended to call a functionfrom a C++ header (
hello_world.h), shown in a second window.Root
index.html,404.html, androbots.txtare unchanged, socarbon-lang.dev/ still redirects to GitHub and the preview isn't indexed.
Launching later means moving
preview/*to the root.Testing:
https://adityagirdhar.github.io/website/preview/
0.0.0-0.nightly.2026.10.27toolchain. With the nightly CLI,Core.PrintStralso needslib/carbon/core/io.impl.carbonlinked.Assisted-by: Google Antigravity