Skip to content

Own page per calculator, phone layout fixes, author in the header - #19

Merged
ehcrea merged 1 commit into
mainfrom
claude/project-thread-9t7nna
Nov 10, 2026
Merged

ehcrea merged 1 commit into
mainfrom
claude/project-thread-9t7nna

Conversation

@ehcrea

@ehcrea ehcrea commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Requested by Eren · project thread

What changes

Search: one page per calculator. tools/build-pages.js now writes a page for every calculator in every language (leaf-spring/, de/leaf-spring/, …, 85 pages). Each has its own title (e.g. "Blattfeder berechnen | Rechner für Präzisionstechnik"), description, canonical/hreflang links and JSON-LD, and shows the theory notes as plain text for crawlers. sitemap.xml lists all of them. The home page list links to these pages.
The app reads data-calc on <html> to open that calculator, moves the URL to the calculator's own page when you switch (inputs stay in the hash, so share links keep working), and sets the tab title per calculator. The language switch keeps the calculator.

Phones.

  • No more sideways scrolling: checked every calculator in all 5 languages at 320 and 360 px (DE, NL, ES, TR and the EN motion profile overflowed before). Fix: grid columns use minmax(0, 1fr), and long words in labels, result rows and headings wrap.
  • Action row: phones show Save, Export PDF and "More…". The other buttons open under More. Desktop looks the same as before.

Bug fix. PDF export loaded vendor/… relative to the page, so on /de/, /nl/ and the other language pages it requested de/vendor/…. It now resolves the path from js/pdf.js. Checked: a PDF downloads from /de/hertz-contact/.

Branding. The header subtitle now reads "by E. Tozlu" (translated) instead of "formulas from JPE Precision Point". The site descriptions credit JPE at the end. Source links, the disclaimer and the corrections card are unchanged. Spot check: the JPE leaf spring article is almost all formulas, so the theory notes are this site's own text.

Testing

  • npm test: 827 passed (tests/i18n-keys.js now also scans tools/seo.config.js)
  • Playwright: overflow sweep, More toggle, calculator page opens the right calculator, nav and language switch URLs, About reload, PDF download on a German page, no page errors

Generated by Claude Code

- Every calculator now has its own page in each language (leaf-spring/,
  de/leaf-spring/, ...) with its own title, description, canonical and
  hreflang links and the theory notes as crawlable text; 85 pages in all,
  listed in sitemap.xml. The app opens the calculator named in data-calc,
  moves the URL to the calculator's page when switching, and sets the tab
  title per calculator.
- Fix sideways scrolling on phones (all languages, 320 and 360 px): form
  and result columns can shrink, long words wrap.
- Phones: Save, Export PDF and a "More..." toggle; the other actions open
  under it. Desktop is unchanged.
- PDF export loads jsPDF next to js/, so it also works on the language
  pages (it looked for de/vendor/... before).
- Header subtitle "by E. Tozlu"; site descriptions credit JPE Precision
  Point at the end instead of leading with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtSyM5HXUjVKVXDMRw2Hht
@ehcrea ehcrea self-assigned this Nov 10, 2026
@ehcrea
ehcrea merged commit d3054c8 into main Nov 10, 2026
2 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