Commit Graph
21 Commits
Author SHA1 Message Date
emil e089dd07de style: visual polish — accent tokens, starfield, fixed card/output heights, focus rings, spatial fixes 2026-05-11 01:36:58 +03:00
emil 8421441664 chore: add ESLint + Prettier, fix all lint errors
- Install eslint, typescript-eslint, eslint-plugin-astro, prettier,
  prettier-plugin-astro, globals
- Add flat eslint.config.mjs with recommended rules for JS, TS, Astro
- Add .prettierrc with astro plugin
- Add lint, lint:fix, format, format:check scripts
- Fix prefer-const, no-unused-vars, no-useless-assignment across codebase
- Fix AdBanner.astro JSX fragment for Prettier compatibility
- Add eslint-disable around Yandex/Top.Mail.Ru inline scripts
- Auto-format entire codebase with Prettier
2026-05-10 21:17:34 +03:00
emil 56ab3f6952 refactor: extract shared client utilities
- Add src/lib/client/clipboard.ts with CopyFeedback class
- Add src/lib/client/validation.ts with createErrorDisplay and isInteger
- Add src/lib/client/animations.ts with popElement
- Refactor NumberGenerator, LotteryGenerator, PasswordGenerator,
  ListGenerator, CardGenerator, CoinGenerator, UuidGenerator,
  WheelSpinner to use shared utilities
- Leave DiceGenerator and ColorGenerator untouched (complex patterns)
2026-05-10 20:56:33 +03:00
emil f1ba82735b refactor: i18n routing, shared GeneratorLayout, analytics component, content collections
- Add Astro native i18n routing (prefixDefaultLocale: false)
- Introduce GeneratorLayout to deduplicate all generator pages
- Enrich generator data with pageTitle, ruPageTitle, howTo/whenTo arrays
- Make EN and RU generator pages identical using @/ path aliases
- Extract analytics (Yandex Metrika + Top.Mail.Ru) into Analytics.astro
- Move tracker IDs to src/data/config.ts, inject via define:vars
- Migrate generator metadata to Content Collections (src/content/generators/*.json)
- Add Zod schema with .strict() validation in src/lib/generator-schema.ts
- Update CLAUDE.md with new conventions
2026-05-10 20:42:05 +03:00
Emil Shanaty ef2aeb5345 feat(dice): full notation engine with kh/kl/dh/dl, exploding dice, reroll, presets, roll history, adv/disadv toggle
- Inline dice engine: XdY±Z, keep/drop (4d6dl1), exploding (3d6!), penetrating (!p), reroll (r1, ro1, r<3)
- Notation input with real-time validation and bidirectional sync with controls
- Advantage/Disadvantage toggle with smart disable when count>1 or keep/drop present
- 6 presets: Attack, Damage, Fireball, Sneak Attack, Stat Roll (4d6dl1), Savage Strike (2d6!)
- Roll history with dropped strikethrough, explosion chains, reroll arrows
- Updated SEO title/description and When-to-use blocks (EN+RU)
2026-05-10 01:23:50 +03:00
emilandClaude Sonnet 4.6 7c5f67eab8 Upgrade Dice Generator: notation input, advantage/disadvantage, history, D&D presets
Adds XdY+Z notation parsing with bidirectional sync, 3-way advantage/disadvantage
toggle, last-10 roll history in sessionStorage, and D&D quick presets (Attack,
Damage, Fireball, Sneak Attack, Stat Roll). Updates SEO meta and SeoBlock content
in both EN and RU pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 17:18:16 +03:00
emilandClaude Sonnet 4.6 65e42e7d44 Add Russian language version of the site
- New i18n system: src/i18n/translations.ts with en/ru translation objects
- LanguageSwitcher component (fixed top-right EN/RU toggle)
- BaseLayout updated with lang prop, hreflang links, auto-redirect for Russian browsers
- All 10 generator components updated to use T.* translations
- GeneratorCard updated to show ruTitle/ruDescription and link to /ru/ routes
- SeoBlock updated with translated section headers
- New /ru/ home page and /ru/generators/[slug] dynamic route (all 10 generators)
- Russian SEO content (howTo/whenTo) for all generator pages
- English pages explicitly pass lang="en"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 16:49:57 +03:00
emilandClaude Sonnet 4.6 76d9233faa feat: remove Update wheel button, wheel updates automatically on input
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 16:10:20 +03:00
emilandClaude Sonnet 4.6 6e540fdb12 feat: wheel auto-updates on textarea input with 300ms debounce
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 16:08:41 +03:00
emilandClaude Sonnet 4.6 e72312f23f fix: confetti uses position:fixed to prevent page layout expansion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 16:06:37 +03:00
emilandClaude Sonnet 4.6 3863eb214e feat: add Spin the Wheel generator
Canvas-based wheel with 8-color palette, ease-out cubic spin animation,
deterministic winner calculation, confetti burst on result, copy to clipboard.
Supports 2–24 custom items with live textarea update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 16:03:30 +03:00
emilandClaude Sonnet 4.6 2ba1b53ba8 feat: randomise ad banner between Yandex app and Yandex Browser offers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 15:10:51 +03:00
emilandClaude Sonnet 4.6 57f1a8d705 seo: add How to use / When to use text blocks to all generator pages
Each page now has a subtle text section with keyword-rich content
for search engine indexing, without disrupting the tool UX.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 15:03:28 +03:00
emilandClaude Sonnet 4.6 fe5bb4f39c feat: replace ad placeholders with Yandex app referral banners
Leaderboard shows horizontal layout with logo, text and CTA button.
Tile/rectangle show vertical layout. All link to Yandex referral URL with rel=sponsored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 14:40:00 +03:00
emilandClaude Sonnet 4.6 9a5b85f32f feat: add coin flip, list picker, uuid/token generators
- Coin flip: slider 1–20 coins, heads/tails display with H/T count summary
- List picker: textarea input, configurable pick count, unique or with-replacement, Ctrl+Enter shortcut
- UUID/Token: UUID v4 via crypto, hex and base64 modes with configurable byte length, up to 20 at once

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 14:07:22 +03:00
emilandClaude Sonnet 4.6 d3434bc928 feat: add card generator
Adds /generators/cards/ — draws 1–52 cards from a standard 52-card deck. Supports unique draws (Fisher-Yates) and with-replacement mode. Cards rendered as mini playing-card tiles with red suits coloured. Clipboard copy in rank+suit format (e.g. A♠, K♥).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:47:10 +03:00
emilandClaude Sonnet 4.6 01ddfc8428 feat: add dice generator
Adds /generators/dice/ with configurable count (1–20) and standard RPG sides (d4/d6/d8/d10/d12/d20/d100). Shows individual rolls with colour-coded min/max, running total, and clipboard copy in NdS=total format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:42:16 +03:00
emilandClaude Sonnet 4.6 09f593a062 feat: add lottery generator
Adds /generators/lottery/ with configurable range and pick count. Partial Fisher-Yates shuffle guarantees unique draws, results sorted ascending and displayed as numbered balls with clipboard copy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:40:58 +03:00
emilandClaude Sonnet 4.6 3b7b1382b4 feat: add password generator
Adds /generators/password/ with length slider (4–64), uppercase/lowercase/digits/symbols toggles, guaranteed character-type coverage, Fisher-Yates shuffle, and clipboard copy. Sets password status to live in the generator catalog. Also adds CLAUDE.md with project architecture notes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:32:35 +03:00
emil28092005 6a8630a00d Add colours generator. 2026-05-09 13:30:43 +03:00
emil28092005 b1db390c06 Initial commit 2026-05-09 01:57:12 +03:00