13 Commits

Author SHA1 Message Date
giles
8c6fc87fc9 Add max-width gutters to match coop layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:38:41 +00:00
giles
dffce2f6de Dark content area beneath coop header
Wrap content block in bg-dark-800 so all existing dark-themed
templates render correctly without per-file migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:35:08 +00:00
giles
ff185b42f0 Restyle _base.html to match coop light theme
Sky-blue header bar, light body (bg-stone-50), Font Awesome,
hyperscript. Block-based layout: cart_mini, brand, nav_tree,
auth_menu, sub_nav, content. Keeps dark-* custom colors for
content panels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:00:12 +00:00
giles
98080b10c5 Add email field to UserContext
Extract email from session cookie and JWT claims. Store email in
cookie data. Needed for coop fragment composition (auth-menu).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:38:48 +00:00
giles
a7cb660009 Add fragment client for coop app composition
Lightweight httpx-based client to fetch HTML fragments from coop apps
(nav-tree, auth-menu, cart-mini) using internal Docker URLs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:28:26 +00:00
gilesb
11aa0568c5 Add l2_server field to UserContext
Allows L1 servers to track which L2 server the user authenticated with.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 17:35:18 +00:00
gilesb
932abb8d7a Fix auth to handle JWT tokens without actor_id
- Default actor_id to @username when not in token claims
- Support both artdag_session (base64 JSON) and auth_token (JWT) cookies
- Check both 'username' and 'sub' claims for username
- Check both 'actor_id' and 'actor' claims for actor_id

This fixes authentication when L2 tokens don't include actor_id.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:06:51 +00:00
giles
889ea98e41 Fix prose-invert styling with explicit CSS variables
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 13:10:31 +00:00
giles
2163cbd13b Add Tailwind typography plugin for prose styling
Enables proper markdown styling with prose-invert classes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:57:23 +00:00
giles
98d883d04c Bump version to 0.1.1
Force pip to fetch updated package with _base.html template.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:55:59 +00:00
giles
72aa954376 Rename base.html to _base.html
Prevents naming conflict when app templates extend the shared base.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:28:25 +00:00
giles
866e6e308f Add README documentation for artdag-common library
- Document Jinja2 templating system with examples
- Document authentication middleware (UserContext, cookie/header parsing)
- Document content negotiation utilities
- List all reusable template components
- Document custom Jinja2 filters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 09:58:43 +00:00
giles
fd97812e3d Initial artdag-common shared library
Shared components for L1 and L2 servers:
- Jinja2 template system with base template and components
- Middleware for auth and content negotiation
- Pydantic models for requests/responses
- Utility functions for pagination, media, formatting
- Constants for Tailwind/HTMX/Cytoscape CDNs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:07:59 +00:00