Skip to content

Add a preview of the landing page under new subdirectory - #4

Merged
lnihlen merged 3 commits into
carbon-language:trunkfrom
AdityaGirdhar:add-landing-page-preview
Nov 3, 2026
Merged

lnihlen merged 3 commits into
carbon-language:trunkfrom
AdityaGirdhar:add-landing-page-preview

Conversation

@AdityaGirdhar

Copy link
Copy Markdown
Contributor

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.

  • Fetches GitHub stars, forks, and open issues live from the GitHub API
    (cached for an hour) instead of hardcoding them.
  • Responsive layout with a hamburger menu button on narrow screens.
  • The hero shows examples/hello_world.carbon extended to call a function
    from a C++ header (hello_world.h), shown in a second window.
  • Reuses the favicon from the docs site.
  • Uses system font stacks, with no external font requests.

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.

Testing:

  • Preview deployment:
    https://adityagirdhar.github.io/website/preview/
  • Both code samples were compiled, linked, and tested with the
    0.0.0-0.nightly.2026.10.27 toolchain. With the nightly CLI,
    Core.PrintStr also needs lib/carbon/core/io.impl.carbon linked.

Assisted-by: Google Antigravity

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
@AdityaGirdhar
AdityaGirdhar requested a review from a team as a code owner October 27, 2026 12:05
@AdityaGirdhar
AdityaGirdhar requested review from lnihlen and removed request for a team October 27, 2026 12:05
@lnihlen
lnihlen requested a review from zygoloid October 27, 2026 12:24

@lnihlen lnihlen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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?

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
@lnihlen

lnihlen commented Oct 27, 2026

Copy link
Copy Markdown

Oh also, the favicon is rendering weirdly for me - I see some kind of noise in the transparent area outside of the C in the circle, do you? Any idea how we might have picked that up?

@AdityaGirdhar

Copy link
Copy Markdown
Contributor Author

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?

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.

Oh also, the favicon is rendering weirdly for me - I see some kind of noise in the transparent area outside of the C in the circle, do you? Any idea how we might have picked that up?

Resolved offline.

@AdityaGirdhar
AdityaGirdhar requested a review from lnihlen November 2, 2026 18:59

@lnihlen lnihlen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, thanks for landing this!

@lnihlen
lnihlen added this pull request to the merge queue Nov 3, 2026
Merged via the queue into carbon-language:trunk with commit 26618f0 Nov 3, 2026
7 checks passed
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