Skip to content

About

🥧 Pi Explorer — an interactive journey through the digits of π. Pure HTML/CSS/JS, zero dependencies.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🥧 Pi Explorer

Journey Through the Infinite — an interactive web experience exploring the digits, history, and wonders of π.

🔗 Live site (GitHub Pages): https://highviewone.github.io/pi-explorer/

Overview

Pi Explorer is a single-page, scrollytelling site that turns the story of π into something you can browse. It walks from "what makes π special" through its history across ancient civilizations and a collection of fun facts, ending with a digit-memorization challenge — all in pure HTML, CSS, and JavaScript with no build step or dependencies.

Sections

  • Hero — animated floating digits, the medallion logo, and share / copy-link buttons
  • The Mystery of Ï€ — why Ï€ is infinite, irrational, transcendental, and universal
  • Ï€ Through the Ages — an animated timeline and approximations from Ancient Egypt, Babylon, Israel, Greece, India, China, and the Islamic Golden Age
  • Ï€ Facts & Wonders — Pi Day, the Feynman Point, and more
  • The Pi Challenge — type the first 1,000 digits of Ï€ from memory. Challenge mode ends on the first mistake (personal best saved in the browser); Practice mode shows the right digit and keeps going, can start at any block of 10, and marks the groups you slipped on in the study list

Tech stack

Vanilla HTML / CSS / JavaScript — zero dependencies, zero build step.

index.html    # all content and sections
style.css     # styling
script.js     # interactivity (nav, timeline animations, copy button, Pi Challenge game)
logo.svg, favicon.svg, og-image.png   # artwork and the social-share preview image
manifest.webmanifest, sw.js          # installable app + offline support (network-first cache)
icon-192.png, icon-512.png, apple-touch-icon.png   # home-screen icons, rendered from logo.svg

Running locally

Just open index.html in a browser, or serve the folder (needed to test offline mode — the service worker doesn't run from file://):

python -m http.server 8000
# then open http://localhost:8000

Testing

Browser tests live in tests/site.spec.js (Playwright, run in the installed Google Chrome). They check the 1,000 digits against an independent calculation, every game mode (Challenge, Practice, Drill, Peek, streak), the Archimedes slider, the mobile menu, offline mode, and that the deploy workflow publishes every file the site needs.

npm install
npm test

The site itself still has no dependencies; package.json is only for the tests.

Deploying

Pushing to main runs the tests, then deploys automatically via GitHub Actions (.github/workflows/static.yml) to GitHub Pages. If a test fails, nothing is published. The workflow publishes an explicit list of files — if you add a new asset (image, page, script), add it to the cp line in that workflow or it won't be published.

og-image.png is the 1200×630 link-preview image used by LinkedIn, Bluesky, etc.; regenerate it if the logo or title changes.

About

🥧 Pi Explorer — an interactive journey through the digits of π. Pure HTML/CSS/JS, zero dependencies.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages