Commit Graph

49 Commits

Author SHA1 Message Date
aed051afaa ci: Add Gitea Actions deploy workflow
Some checks failed
Deploy / deploy (push) Failing after 1m28s
Build the frontend and the Go share-service, rsync/scp both to the Caddy
host, and restart share-svc + reload caddy. Triggers on push to master
(and manual dispatch). Requires a DEPLOY_SSH_KEY secret; host/user/paths
default to the Justfile values and are overridable via repo variables.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:16:23 +00:00
410eb3a5a8 chore: Add deploy plumbing for the share service
Add a hardened systemd unit, a Caddy reverse-proxy snippet that maps
/fabula/api/* to the loopback service, and Justfile build-server/
deploy-server recipes that build a static binary and ship + restart it.
Includes server/README documenting the API, config, and deploy steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:01:37 +00:00
6609956711 chore: Add go feature to devcontainer, bump node version 2026-06-16 21:46:51 -04:00
122a4cc881 feat: Add share-link backend and wire up the sheet
Add a small Go + SQLite service (server/) that stores character-sheet
JSON blobs and returns short, content-addressed IDs, so sheets can be
shared via a compact ?s=<id> link instead of an oversized inline payload.

CharacterSheet.tsx now POSTs to the service on share and fetches by ID on
load, falling back to the self-contained ?c= inline link when the backend
is unreachable. Legacy ?c= links still decode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 01:44:15 +00:00
21c8bf5be1 perf: Shorten shared character sheet URLs
Use URL-safe base64 (base64url) for the ?c= payload so it no longer
needs percent-encoding, and prune empty string/array fields before
encoding. Decoding accepts standard base64, so existing links still load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 01:13:12 +00:00
6461039bd7 refactor: Migrate the app to TypeScript
Convert the React app from JS/JSX to TS/TSX and add type-checking:
- Rename sheet-main, book, BookIndex, CharacterSheet to .ts(x) and
  add types (Fields, Bond, ClassEntry, Spell, CheckMap; loose
  SavedData for abbreviated save/share payloads)
- Add globals.d.ts for CSS imports and the __BOOK_DATA__ global
- tsconfig.json (strict, noEmit) and a 'typecheck' npm script
- webpack: handle ts/tsx via @babel/preset-typescript
- Enforce types with a tracked pre-commit hook (core.hooksPath),
  wired up automatically via the 'prepare' script
- Update stale Justfile format target for the src/ layout

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 00:51:53 +00:00
0ba87ac547 chore: organize scripts 2026-06-17 00:03:04 +00:00
406641c522 chore: Organize PDFs 2026-06-17 00:02:30 +00:00
f462205463 feat: Printable character sheet 2026-06-16 02:10:22 +00:00
fcbd0acfb2 refactor: Move source files from root into src/
Relocates book.js, fabula-ultima-sheet.css, and fabula-ultima-sheet.html
into src/ to consolidate all source files under one directory. Updates
webpack entry points, HTML template path, and CSS import accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 04:14:30 +00:00
26d7a4a7fc refactor: Convert main page to React 2026-06-11 03:44:22 +00:00
e1efd7dd37 fix: Swap positions of max and current boxes for vitals 2026-06-11 02:30:41 +00:00
a44a54ff8a refactor: Convert book viewer to idiomatic React
Replace the SSR + injected vanilla-JS navigation script with a proper
client-side React app. BookIndex now uses useState/useEffect/useCallback
for all navigation state, scroll tracking, keyboard shortcuts, and history
management. webpack.config.js switches from renderToStaticMarkup to
embedding page data as window.__BOOK_DATA__ JSON; book.js becomes a
createRoot entry point. Also adds babel-loader for JSX bundling, fixes
#root display:contents so the flex height chain is preserved, and
restores missing CSS for header, .logo, .toolbar, and .tab buttons.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 02:12:29 +00:00
fe2b5bca0c bug: Formatting 2026-06-10 01:35:03 +00:00
17274235ed chore: Fix pipeline 2026-06-08 22:57:36 +00:00
6f5795b1e3 bug: Fix numbering on Table of Contents 2026-06-08 22:57:24 +00:00
8de734cee5 bug: Fix ugly margin on page header 2026-06-08 22:43:45 +00:00
b8ba7728db refactor: Extract inline book layout CSS to css/book-layout.css
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 22:40:33 +00:00
df68d1309d feat: Replace build.py with JSX-based webpack-native book index generation
Port the Python HTML-generation script to a React component (src/BookIndex.jsx)
rendered at build time via renderToStaticMarkup, removing the need to run
build.py separately before webpack.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 22:37:03 +00:00
3c3c5a332f bug: Fix page scroll detection and add browser history support
- Use getBoundingClientRect() in the scroll listener so the active-page
  threshold is measured relative to the content container rather than
  the document body, fixing off-by-one page detection.
- Replace history.replaceState with pushState for user-initiated
  navigation (sidebar, prev/next, keyboard) and add a popstate listener
  so the browser back/forward buttons work correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 22:26:48 +00:00
1977a5d966 bug: Fix incorrectly labled table 2026-06-08 22:22:11 +00:00
19798b703c bug: Fix incorrectly numbered list 2026-06-08 22:19:54 +00:00
1d837103c5 bug: Fix extraneous styling on h2 2026-06-08 22:17:14 +00:00
f7574aee21 bug: Update rare weapons tables 2026-06-08 22:13:31 +00:00
41d89cb632 bug: Fix issue with page links going to the wrong place 2026-06-08 21:48:52 +00:00
4dbdb12876 feat: Links to pages 2026-06-08 21:33:39 +00:00
006307a62e chore: formatting 2026-06-08 21:11:07 +00:00
373eb19fe4 chore: Remove extraneous CSS <link> 2026-06-07 00:32:36 +00:00
54d560980b chore: More formatting 2026-06-07 00:30:21 +00:00
b4ee0eb212 chore: Remove watermarks 2026-06-07 00:12:02 +00:00
74c4fc2c2a chore: Build pipeline for books/core 2026-06-06 23:44:13 +00:00
88a2778e6f chore: Format HTML in books/core 2026-06-06 23:44:01 +00:00
6a7e988ca0 bug: Remove extraneous pages in books/core 2026-06-06 23:33:41 +00:00
b4a31d9e56 feat: Combine all core book pages into a single scrollable index.html
Replaces the iframe-based viewer with a self-contained file where each
page is a <section id="page-N">. Navigation (sidebar, prev/next, arrow
keys, URL hash) scrolls to sections instead of loading separate files.
Added build.py to regenerate index.html from the individual page files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 23:08:28 +00:00
1de1377033 bug: Pages numbered correctly in books/core 2026-06-06 22:44:37 +00:00
75c6ab9975 feat: Add core rules 2026-06-06 13:03:00 +00:00
c75cd188c1 feat: Add book viewer at /book with shared design system
- Add html/index.html: book viewer with auto-discovering sidebar,
  prev/next navigation, keyboard shortcuts, and URL hash persistence
- Add html/book-page.css: shared stylesheet for all book pages derived
  from fabula-ultima-sheet.css (dark theme, CSS variables, Cinzel/
  Crimson Text fonts, common class styles)
- Add book.js entry point so webpack injects the shared CSS into the
  book viewer; update webpack.config.js for two entry points, split
  CSS chunk, CopyWebpackPlugin for book pages, and /book dev server
  rewrite rule
- Add scripts/strip_watermark.py: removes "Guest Customer (Order
  #52072168)" watermark artifacts from all 210 book pages
- Add scripts/restyle_book.py: strips per-page <style> blocks and
  injects <link rel="stylesheet" href="book-page.css"> into all pages
- Update Justfile deploy to scp -r dist/* for the new /book subtree

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 03:36:35 +00:00
58552b536f chore: Use webpack to build production version 2026-06-05 03:04:58 +00:00
41bbb7a44b chore: Format code with Prettier 2026-06-05 02:41:10 +00:00
a9dc508940 chore: Add Node.js .gitignore
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 02:38:42 +00:00
32991843d8 perf: Minify JSON save keys to reduce serialized state size
Replace verbose key names with short identifiers in collectData/applyData
(e.g. name→n, zenit→z, heroicSkills→hs). Nested bond, class, and spell
objects are mapped at the boundary so in-memory state and rendering code
are unchanged. applyData uses ?? fallbacks to remain compatible with data
saved under the old key names.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 02:36:13 +00:00
52ee6ea26b feat: Add Manage page, light/dark theme toggle, and URL sharing
- Move Save, Load, Export, Import buttons to a dedicated Manage page
- Add light theme with warm parchment palette; auto-detect via prefers-color-scheme, persisted to localStorage
- Add URL sharing: sheet state is deflate-raw compressed, base64-encoded, and stored in ?c= parameter; auto-save is suppressed when viewing a shared URL
- Extract JS to fabula-ultima-sheet.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 02:28:12 +00:00
9ade0820d6 chore: Move JS to separate file 2026-06-05 02:06:56 +00:00
74efbe9c1b feat: Light theme 2026-06-05 02:00:54 +00:00
75bdf92743 chore: Create Justfile for common tasks 2026-06-05 01:51:21 +00:00
d22393771a chore: Split out CSS 2026-06-05 01:48:25 +00:00
49f1419bc1 chore: Formatting 2026-06-05 01:42:05 +00:00
bc57e4d883 feat: Add import/export buttons 2026-06-04 02:08:18 +00:00
54e481ab62 Initial commit: Fabula Ultima HTML character sheet
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 02:04:41 +00:00