diff --git a/docs/site/img/og.jpg b/docs/site/img/og.jpg new file mode 100644 index 0000000..bda69c8 Binary files /dev/null and b/docs/site/img/og.jpg differ diff --git a/docs/site/index.html b/docs/site/index.html index d6ee78d..b5bfddb 100644 --- a/docs/site/index.html +++ b/docs/site/index.html @@ -3,15 +3,19 @@ - + Magic Session Manager for Strapi 5: sessions, logout and login protection - Magic Session Manager for Strapi 5 + + + + - + + - - + + + + + + - +
- + Magic Session Manager
-
+
-
- Strapi 5 plugin -

See who is signed in. End access in one click.

-

- Magic Session Manager records every sign-in of your app's users (Users & - Permissions) as a session. Admins see who is online, end single sessions or all sessions - of a user, and block accounts. Your app gets logout routes, a "my devices" list, - failed-login lockout and optional country rules. It works with Strapi's native - refresh-token sessions and with several server processes on one database. -

-
- Install the plugin - See the screens - View source +
+
+ +

See who is signed in. End access in one click.

+

+ Magic Session Manager is a free, MIT-licensed Strapi 5 plugin that records every Users + & Permissions sign-in as a session, so admins can see who is online, end sessions + and block accounts. +

+

+ Your app gets logout routes, a "my devices" list, failed-login lockout and optional + country rules. It works with Strapi's native refresh-token sessions and with several + server processes on one database. +

+ +
    +
  • Strapi ^5.50.0
  • +
  • Node.js ^22.22.2 or >=24.15.0
  • +
  • 5 admin languages
  • +
  • MIT, no telemetry
  • +
+

+ npm version + npm downloads + CI build status + License: MIT + Strapi 5.50+ + Documentation site +

-

- npm version - npm downloads - CI build status - License: MIT - Strapi 5.50+ - Documentation site -

-
    -
  • Strapi 5, tested on 5.63
  • -
  • Node.js 22.22.2+ or 24.15.0+
  • -
  • 5 admin languages
  • -
  • MIT, free, no telemetry
  • -
  • npm, Yarn and pnpm
  • -
+
+ Sessions dashboard: four stat cards (Active, Idle, Ended, All), search, a status filter and a table of sessions with Active, Idle and Ended badges. +
-
+
-
+
+
+

Is Magic Session Manager the right fit?

+
+
+

Use it when

+
    +
  • + Your app users sign in through Users & Permissions and you want to see and end + their sessions. +
  • +
  • + Your frontend needs "log out", "log out everywhere" and a "my devices" list. +
  • +
  • You want a lockout after failed sign-ins, rate limits or country rules.
  • +
  • + You want to see who is signed in to the Strapi admin panel and sign admins out. +
  • +
+
+
+

Skip it when

+
    +
  • Your users do not sign in through Users & Permissions.
  • +
  • + You need to create or edit admin accounts. That stays in Strapi's Settings › + Users. +
  • +
  • Your project runs Strapi older than 5.50.0.
  • +
  • You run several processes on SQLite. That setup needs PostgreSQL or MySQL.
  • +
+
+
+

Requirements

+
    +
  • + Strapi ^5.50.0 with @strapi/plugin-users-permissions +
  • +
  • Node.js ^22.22.2 || >=24.15.0
  • +
  • PostgreSQL, MySQL or SQLite
  • +
  • SESSION_ENCRYPTION_KEY when NODE_ENV=production
  • +
+
+
+
+

Quick start (1 minute)

@@ -1161,70 +1361,72 @@

Compatibility

FAQ

-
- Does it manage Strapi admin accounts? -

- It shows who is signed in to the Strapi admin panel and signs admins out (the Admin - panel view). Creating, editing and deactivating admins stays in Strapi's Settings › - Users. Everything else is about end users of Users & Permissions. -

-
-
- When does signing out an admin take effect? -

- On the admin's next request, usually their next click: Strapi 5.62 checks the session - on every admin request. They can sign in again with their password unless you - deactivate the account in Settings › Users. -

-
-
- Do I need a license key, account or activation? -

- No. Everything is free under MIT and the plugin contacts no license or telemetry - server. The only key you may add is your own MaxMind key for the GeoLite2 database. -

-
-
- Do I have to add the session-required policy? -

- No. Revocation works on every Content API route without configuration. The policy is - an optional, explicit per-route check. -

-
-
- Does it work with jwtManagement: 'refresh'? -

- Yes. Strapi issues, rotates and revokes its own sessions; the plugin adds device, IP - address, location and history, and ends the native session when you end it. -

-
-
- What are "untracked Strapi sign-ins" on the dashboard? -

- Refresh tokens that Strapi still accepts but that have no session details from this - plugin, for example sign-ins from before it started tracking, or tokens that custom - code created without returning them. They are not in the list and are not active or - online sessions. Why? shows a count-only summary (before or after - tracking, how Strapi created them, expiry); End these sessions ends - them. The README lists which sign-in paths are linked. -

-
-
- Does it send my users' IP addresses anywhere? -

- Only when location lookup uses ipapi.co (provider ipapi, or - auto without a local database). Choose local-mmdb or - disabled to keep IP addresses on your server. -

-
-
- Why do sign-ins get 429? -

- The temporary IP lockout counts failed sign-ins per IP address. Behind a proxy, turn - on Koa's proxy mode or Trust proxy headers, otherwise all users share the proxy's - address. -

-
+
+
+ Does it manage Strapi admin accounts? +

+ It shows who is signed in to the Strapi admin panel and signs admins out (the Admin + panel view). Creating, editing and deactivating admins stays in Strapi's Settings › + Users. Everything else is about end users of Users & Permissions. +

+
+
+ When does signing out an admin take effect? +

+ On the admin's next request, usually their next click: Strapi 5.62 checks the + session on every admin request. They can sign in again with their password unless + you deactivate the account in Settings › Users. +

+
+
+ Do I need a license key, account or activation? +

+ No. Everything is free under MIT and the plugin contacts no license or telemetry + server. The only key you may add is your own MaxMind key for the GeoLite2 database. +

+
+
+ Do I have to add the session-required policy? +

+ No. Revocation works on every Content API route without configuration. The policy is + an optional, explicit per-route check. +

+
+
+ Does it work with jwtManagement: 'refresh'? +

+ Yes. Strapi issues, rotates and revokes its own sessions; the plugin adds device, IP + address, location and history, and ends the native session when you end it. +

+
+
+ What are "untracked Strapi sign-ins" on the dashboard? +

+ Refresh tokens that Strapi still accepts but that have no session details from this + plugin, for example sign-ins from before it started tracking, or tokens that custom + code created without returning them. They are not in the list and are not active or + online sessions. Why? shows a count-only summary (before or after + tracking, how Strapi created them, expiry); End these sessions ends + them. The README lists which sign-in paths are linked. +

+
+
+ Does it send my users' IP addresses anywhere? +

+ Only when location lookup uses ipapi.co (provider ipapi, or + auto without a local database). Choose local-mmdb or + disabled to keep IP addresses on your server. +

+
+
+ Why do sign-ins get 429? +

+ The temporary IP lockout counts failed sign-ins per IP address. Behind a proxy, turn + on Koa's proxy mode or Trust proxy headers, otherwise all users share the proxy's + address. +

+
+
@@ -1316,19 +1518,59 @@

Known issues outside the plugin

>
-
-
+
+ diff --git a/docs/site/llms.txt b/docs/site/llms.txt new file mode 100644 index 0000000..9f28df1 --- /dev/null +++ b/docs/site/llms.txt @@ -0,0 +1,59 @@ +# Magic Session Manager for Strapi 5 + +> Magic Session Manager (npm: strapi-plugin-magic-sessionmanager, plugin id: magic-sessionmanager) is a free, MIT-licensed Strapi 5 plugin that records every Users & Permissions sign-in as a session. Admins see who is online, end single sessions or all sessions of a user, and block accounts; the app gets logout routes, a "my devices" list, failed-login lockout and optional country rules. + +The current version is on npm (link below). The plugin sends no telemetry and needs no account or license key. + +What it does: + +- Sessions dashboard with Active, Idle and Ended counts, search, filters, CSV and JSON export and a details dialog per session (device, browser, IP address, location, security score). +- End one session, end all sessions of a user, delete a record or block a user. Ended sessions are rejected on the next request with 401. +- Content API under `/api/magic-sessionmanager` (Users & Permissions JWT, own sessions only, rate limited): `GET /my-sessions`, `GET /current-session`, `GET /user/:userId/sessions`, `POST /logout`, `POST /logout-all`, `POST /logout-others`, `DELETE /my-sessions/:sessionId`. `POST /api/auth/logout` also ends the current session. +- Login protection: temporary IP lockout after failed sign-ins, Content API rate limits, optional rejection of VPN, proxy or low-score sign-ins, country allow or block lists. +- IP location from a local MaxMind GeoLite2 database, from ipapi.co, or off. +- Security emails through Strapi's Email plugin and sign-in notifications to Discord or Slack. +- A Sessions panel next to each user in the Content Manager and an Online users widget on the Strapi homepage. +- Admin panel sessions: who is signed in to the Strapi admin panel; sign an admin out of one browser or everywhere. +- Works with `jwtManagement: 'refresh'` (Strapi's native sessions) and `'legacy-support'`, and with pm2 workers or Railway replicas on one PostgreSQL or MySQL database, without sticky sessions or Redis. +- Stored tokens are encrypted with AES-256-GCM and never returned; retention deletes old history. + +Requirements: + +- Strapi `^5.50.0` and `@strapi/plugin-users-permissions` `^5.50.0` (tested on 5.50.0 and 5.63.0) +- Node.js `^22.22.2 || >=24.15.0` +- PostgreSQL, MySQL or SQLite (several processes need PostgreSQL or MySQL) +- `SESSION_ENCRYPTION_KEY`, required when `NODE_ENV=production` + +Install: + +```bash +npm install strapi-plugin-magic-sessionmanager +``` + +```typescript +// config/plugins.ts +export default () => ({ + 'magic-sessionmanager': { enabled: true }, +}); +``` + +Then set `SESSION_ENCRYPTION_KEY`, run `npm run build` and `npm run develop`, and open Session Manager in the admin menu. + +Configuration essentials: + +- Admin permissions: `plugin::magic-sessionmanager.access`, `plugin::magic-sessionmanager.admin-sessions.read`, `plugin::magic-sessionmanager.admin-sessions.revoke`. +- Optional route policy `plugin::magic-sessionmanager.session-required` for an explicit per-route check; revocation works on every Content API route without it. +- Behind a proxy, turn on Koa's proxy mode or Trust proxy headers, otherwise all users share the proxy's IP address for the lockout. + +## Docs + +- [Documentation site](https://schero94.github.io/Magic-Sessionmanager/): overview, screenshots, configuration, API, examples, security, several instances, FAQ +- [README](https://github.com/Schero94/Magic-Sessionmanager#readme): full reference for configuration, Content API, admin API and permissions, GeoIP, alerts, troubleshooting +- [CHANGELOG](https://github.com/Schero94/Magic-Sessionmanager/blob/main/CHANGELOG.md) +- [npm package](https://www.npmjs.com/package/strapi-plugin-magic-sessionmanager) + +## Optional + +- [Running several instances](https://github.com/Schero94/Magic-Sessionmanager#running-several-instances-railway-replicas-pm2-cluster) +- [Migration and upgrading](https://github.com/Schero94/Magic-Sessionmanager#migration-and-upgrading) +- [Plugin hub overview](https://schero94.github.io/plugins/magic-sessionmanager/) diff --git a/docs/site/robots.txt b/docs/site/robots.txt new file mode 100644 index 0000000..db072fd --- /dev/null +++ b/docs/site/robots.txt @@ -0,0 +1,26 @@ +# Magic Session Manager documentation. Search engines and AI crawlers are welcome. +User-agent: * +Allow: / + +User-agent: Googlebot +Allow: / + +User-agent: Google-Extended +Allow: / + +User-agent: GPTBot +Allow: / + +User-agent: OAI-SearchBot +Allow: / + +User-agent: ClaudeBot +Allow: / + +User-agent: Claude-SearchBot +Allow: / + +User-agent: PerplexityBot +Allow: / + +Sitemap: https://schero94.github.io/Magic-Sessionmanager/sitemap.xml diff --git a/docs/site/site-extra.css b/docs/site/site-extra.css index 524d0e9..68faedd 100644 --- a/docs/site/site-extra.css +++ b/docs/site/site-extra.css @@ -1,353 +1,68 @@ -/* Page-specific styles for the Magic Session Manager project site. - site.css is the shared workbench theme and must stay byte-identical to - templates/plugin-pages/site.css; everything specific to this page, - including dark mode, lives here. */ +/* Magic Session Manager page styles. site.css is the shared theme, byte-identical + in every plugin docs site; this file holds the accent (taken from the plugin + icon) and the verb cards of the API section, which exist on this page only. */ :root { - --card-bg: var(--white); - --soft-bg: #f7f8fb; - --link: #4932c6; - --link-hover: #2d1d89; - --good: #1f7a4d; - --good-bg: #e8f6ee; - --bad: #b42318; - --bad-bg: #fdecea; - --open: #9a6700; - --open-bg: #fff6e4; + --accent: #3b37e6; + --accent-ink: #3430d0; + --on-accent: #ffffff; + --accent-soft: #e9e8fd; + --hero-accent: #a9a6ff; } -/* Badges are a list for screen readers; reset the list styles. */ -ul.badges { - margin: 1.25rem 0 0; - padding: 0; - list-style: none; -} - -.status-callout { - margin-top: 0; - margin-bottom: 2rem; -} - -.sub-title { - margin: 1.6rem 0 0.8rem; - font-size: 1.05rem; - letter-spacing: -0.015em; -} - -/* Screenshot gallery */ -.gallery { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 1rem; -} -.gallery-mobile { - grid-template-columns: repeat(2, minmax(0, 260px)); -} -.shot { - margin: 0; - overflow: hidden; - border: 1px solid var(--line); - border-radius: 14px; - background: var(--card-bg); - box-shadow: 0 8px 24px rgba(31, 43, 74, 0.05); -} -.shot-wide { - grid-column: span 2; -} -.shot a { - display: block; - line-height: 0; -} -.shot a:focus-visible { - outline-offset: -3px; -} -.shot img { - display: block; - width: 100%; - height: auto; - border-bottom: 1px solid var(--line); - background: var(--soft-bg); -} -.shot figcaption { - padding: 0.6rem 0.9rem; - color: var(--muted); - font-size: 0.86rem; - font-weight: 620; +@media (prefers-color-scheme: dark) { + :root { + --accent: #9c99ff; + --accent-ink: #b3b0ff; + --on-accent: #0e1016; + --accent-soft: #24234a; + } } -/* Verbs */ +/* HTTP verbs in the API section. */ .verb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 0.75rem; - margin: 0 0 1rem; + gap: var(--space-3); + margin: 0 0 var(--space-4); } .verb { - padding: 0.85rem 1rem; - border: 1px solid var(--line); - border-radius: 12px; - background: var(--card-bg); + padding: var(--space-4); + border-radius: var(--radius); + background: var(--surface); } .verb-name { display: inline-block; - margin-bottom: 0.3rem; - padding: 0.1rem 0.55rem; - border-radius: 6px; - color: #3821a1; - background: #eee9ff; - font-size: 0.85rem; + margin-bottom: var(--space-1); + padding: 0.1rem var(--space-2); + border-radius: var(--radius-s); + color: var(--accent-ink); + background: var(--accent-soft); + font-size: var(--text-s); font-weight: 750; } .verb p { margin: 0; - color: var(--muted); - font-size: 0.9rem; -} - -/* Install steps */ -.steps { - margin: 0 0 1rem; - padding-left: 1.3rem; -} -.steps li { - margin-bottom: 0.4rem; -} -.steps li p { - margin: 0 0 0.2rem; -} -.steps .code-card { - margin: 0.4rem 0 1rem; -} - -/* Tables */ -caption { - padding: 0.7rem 0.9rem; - color: var(--ink); - font-size: 0.86rem; - font-weight: 700; - text-align: left; -} -th[scope='row'] { - width: 12rem; - color: #40495f; - background: var(--soft-bg); - font-size: 0.86rem; -} -td[rowspan] { - color: var(--ink); - font-weight: 650; -} -.table-wrap { - margin: 1rem 0; -} -td code, -th code, -p code, -li code { - overflow-wrap: anywhere; -} - -/* Release and maintenance status */ -.status-grid { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 1rem; - margin: 0 0 1rem; -} -.status-card { - border-top-width: 4px; -} -.status-card ul { - margin: 0.4rem 0 0; - padding-left: 1.1rem; - color: var(--muted); - font-size: 0.9rem; -} -.status-card li { - margin-bottom: 0.3rem; -} -.status-card p { - margin-bottom: 0.2rem; -} -.status-bad { - border-top-color: var(--bad); -} -.status-good { - border-top-color: var(--good); -} -.status-open { - border-top-color: var(--open); -} -.status-bad h3 { - color: var(--bad); -} -.status-good h3 { - color: var(--good); -} -.status-open h3 { - color: var(--open); -} - -.link-list a { - background: var(--card-bg); + color: var(--ink-2); + font-size: var(--text-s); } @media (max-width: 820px) { - .verb-grid, - .status-grid { + .verb-grid { grid-template-columns: 1fr; } } +/* The long plugin name and four top links do not fit one bar on phones: + the changelog stays in the footer, the name hides on the narrowest screens + (the link keeps its accessible name). */ @media (max-width: 560px) { - /* Changelog and Releases stay reachable from the Releases section. */ - .top-links .top-link-wide { + .top-links a[href$='CHANGELOG.md'] { display: none; } - .gallery { - grid-template-columns: 1fr; - } - .shot-wide { - grid-column: auto; - } - .gallery-mobile { - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 0.6rem; - } - .gallery-mobile .shot figcaption { - font-size: 0.78rem; - } - th[scope='row'] { - width: auto; - } - .top-links { - gap: 0.55rem; - } - .brand span:last-child { - font-size: 0.84rem; - } } - -@media (max-width: 380px) { - .brand span:last-child { +@media (max-width: 400px) { + .brand span { display: none; } } - -/* Dark mode: follows the operating system setting. */ -@media (prefers-color-scheme: dark) { - :root { - color-scheme: dark; - --ink: #e9ecf5; - --muted: #a8b0c4; - --line: #2c3350; - --paper: #0f1322; - --white: #171c2f; - --card-bg: #171c2f; - --soft-bg: #1d2338; - --link: #a99bff; - --link-hover: #cfc6ff; - --good: #6fd29e; - --good-bg: #12301f; - --bad: #ff8a80; - --bad-bg: #3a1714; - --open: #f2c063; - --open-bg: #33270d; - } - a { - color: var(--link); - } - a:hover { - color: var(--link-hover); - } - .skip-link { - background: var(--white); - color: var(--ink); - } - .card { - box-shadow: none; - } - .side-nav a { - color: #c3c9da; - } - .side-nav a:hover { - color: var(--ink); - background: #252c48; - } - .number, - .verb-name { - color: #d9d2ff; - background: #2b2550; - } - .callout { - color: #cfe9ea; - background: #11292d; - } - .callout.warning { - color: #f4e2bf; - background: var(--open-bg); - } - .code-card { - border-color: var(--line); - background: #0b0e1a; - } - th { - color: #c3c9da; - background: var(--soft-bg); - } - td { - color: #b7bed0; - } - th[scope='row'] { - color: #c3c9da; - } - .link-list a { - border-color: var(--line); - } - .footer { - border-top-color: var(--line); - } - .shot { - box-shadow: none; - } -} - -/* FAQ */ -details.faq { - margin: 0 0 0.6rem; - padding: 0.75rem 1rem; - border: 1px solid var(--line); - border-radius: 12px; - background: var(--card-bg); -} -details.faq summary { - cursor: pointer; - font-weight: 700; -} -details.faq p { - margin: 0.5rem 0 0; - color: var(--muted); -} - -.brand-logo { - display: block; - flex: 0 0 auto; - width: 2rem; - height: 2rem; -} - -/* Project status badges in the hero: same row as the README. */ -.shields { - display: flex; - flex-wrap: wrap; - gap: 0.4rem; - margin: 1.25rem 0 0; -} -.shields a { - display: inline-flex; -} -.shields img { - display: block; - width: auto; - height: 20px; -} diff --git a/docs/site/site.css b/docs/site/site.css index 9b92b8b..418e4cc 100644 --- a/docs/site/site.css +++ b/docs/site/site.css @@ -1,102 +1,425 @@ +/* Shared theme for the Schero94 Strapi plugin documentation sites. + This file is byte-identical in every plugin repository (docs/site/site.css). + Plugin-specific colours and the few page-only components live in + docs/site/site-extra.css, linked after this file. */ + +/* 1. Tokens ---------------------------------------------------------------- */ :root { - color-scheme: light; - --ink: #151a2d; - --muted: #5f687c; - --line: #e1e6f0; - --paper: #f5f7fb; - --white: #fff; - --purple: #6d4aff; - --cyan: #32c6c8; - --lime: #c9f27b; - --radius: 18px; - font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + color-scheme: light dark; + + /* Spacing scale (4 px base). */ + --space-1: 0.25rem; + --space-2: 0.5rem; + --space-3: 0.75rem; + --space-4: 1rem; + --space-5: 1.5rem; + --space-6: 2rem; + --space-7: 3rem; + --space-8: 4.5rem; + --space-9: 6.5rem; + + /* Type scale. Body text is 17 px; one large display step for the h1. */ + --text-xs: 0.8125rem; + --text-s: 0.9375rem; + --text-m: 1.0625rem; + --text-l: 1.25rem; + --text-xl: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem); + --text-display: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem); + --leading-tight: 1.08; + --leading-snug: 1.3; + --leading-body: 1.65; + --measure: 68ch; + + --font-text: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; + + --radius-s: 4px; + --radius: 8px; + --page-max: 1240px; + --gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem); + --topbar-h: 3.75rem; + + /* Neutral colours, light. Each text pair meets WCAG AA (4.5:1) on --bg and --surface. */ + --bg: #f5f6f8; + --surface: #ffffff; + --surface-2: #eceef2; + --ink: #12151d; + --ink-2: #434a5a; + --line: #d9dde5; + --code-bg: #12151d; + --code-ink: #e8ebf2; + --code-muted: #a9b0c0; + --hero-bg: #12151d; + --hero-ink: #f4f5f8; + --hero-ink-2: #c4c9d6; + --note-bg: #e6f2f4; + --note-line: #1f7f8c; + --warn-bg: #fbf1dc; + --warn-line: #a5650a; + --good: #1d7a47; + --bad: #b42318; + --open: #8a5a00; + --focus: #0b6e7a; + + /* Accent. Overridden per plugin in site-extra.css. */ + --accent: #3d4bd6; + --accent-ink: #3340c0; + --on-accent: #ffffff; + --accent-soft: #e8eafb; + --hero-accent: #9aa6ff; + + /* Aliases kept for page-specific stylesheets written against the first theme. */ + --muted: var(--ink-2); + --paper: var(--bg); + --white: var(--surface); + --card-bg: var(--surface); + --soft-bg: var(--surface-2); + --link: var(--accent-ink); +} + +@media (prefers-color-scheme: dark) { + :root { + --bg: #0e1016; + --surface: #171a23; + --surface-2: #1f2330; + --ink: #eceef3; + --ink-2: #b1b8c8; + --line: #2e3443; + --code-bg: #090b10; + --code-ink: #e8ebf2; + --code-muted: #9aa2b4; + --hero-bg: #171a23; + --hero-ink: #f4f5f8; + --hero-ink-2: #c4c9d6; + --note-bg: #10282c; + --note-line: #5cc3cf; + --warn-bg: #2d2210; + --warn-line: #e6b24f; + --good: #6fd29e; + --bad: #ff8a80; + --open: #f2c063; + --focus: #7fd6e0; + --accent: #8f9bff; + --accent-ink: #aab3ff; + --on-accent: #0e1016; + --accent-soft: #232845; + } +} + +/* 2. Base ------------------------------------------------------------------ */ +*, +*::before, +*::after { box-sizing: border-box; } +html { + scroll-behavior: smooth; + scroll-padding-top: calc(var(--topbar-h) + var(--space-4)); + -webkit-text-size-adjust: 100%; + text-size-adjust: 100%; +} +body { + margin: 0; + background: var(--bg); + color: var(--ink); + font-family: var(--font-text); + font-size: var(--text-m); + line-height: var(--leading-body); font-synthesis: none; text-rendering: optimizeLegibility; + overflow-wrap: break-word; +} +img, svg, video { max-width: 100%; height: auto; } +h1, h2, h3, h4 { color: var(--ink); line-height: var(--leading-snug); text-wrap: balance; } +p, li { text-wrap: pretty; } +a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; } +a:hover { text-decoration-thickness: 2px; } +:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-s); } +code, pre, kbd { font-family: var(--font-code); } +code { font-size: 0.9em; } +:not(pre) > code { padding: 0.08em 0.32em; border-radius: var(--radius-s); background: var(--surface-2); overflow-wrap: anywhere; } +strong { font-weight: 680; } +.visually-hidden { + position: absolute !important; + width: 1px; + height: 1px; + overflow: hidden; + clip: rect(0 0 0 0); + clip-path: inset(50%); + white-space: nowrap; } -* { box-sizing: border-box; } -html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; } -body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; } -a { color: #4932c6; text-underline-offset: .18em; } -a:hover { color: #2d1d89; } -a:focus-visible, button:focus-visible { outline: 3px solid #16a8b5; outline-offset: 3px; border-radius: 6px; } -code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } -code { font-size: .92em; } - -.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10; padding: .65rem 1rem; border-radius: 8px; background: var(--white); color: var(--ink); } -.skip-link:focus { top: 1rem; } -.topbar { position: sticky; top: 0; z-index: 5; background: rgba(17, 22, 39, .97); color: #f7f8fc; border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(12px); } -.topbar-inner { max-width: 1220px; margin: 0 auto; padding: .8rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; } -.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; color: #fff; text-decoration: none; font-weight: 750; letter-spacing: -.02em; } -.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: 9px; background: linear-gradient(140deg, var(--purple), var(--cyan)); color: #fff; font-size: .8rem; } -.top-links { display: flex; align-items: center; gap: 1.15rem; } -.top-links a { color: #d7def0; font-size: .88rem; font-weight: 600; text-decoration: none; } -.top-links a:hover { color: #fff; } - -.hero-wrap { padding: 2.2rem 1.5rem 0; } -.hero { position: relative; overflow: hidden; max-width: 1220px; min-height: 300px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem); border-radius: 26px; color: #fff; background: radial-gradient(circle at 86% 20%, rgba(50,198,200,.42), transparent 28%), radial-gradient(circle at 70% 110%, rgba(109,74,255,.52), transparent 42%), linear-gradient(125deg, #171b31 0%, #242442 60%, #173748 100%); box-shadow: 0 20px 60px rgba(26,32,60,.16); } -.hero::after { position: absolute; right: 7%; top: 15%; width: 190px; height: 190px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.035), 0 0 0 58px rgba(255,255,255,.025); content: ""; pointer-events: none; } -.hero-copy { position: relative; z-index: 1; max-width: 760px; } -.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--lime); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; } -.eyebrow::before { width: 1.25rem; height: 2px; background: var(--lime); content: ""; } -.hero h1 { margin: .8rem 0 .65rem; max-width: 760px; font-size: clamp(2.35rem, 5vw, 4.35rem); line-height: 1.02; letter-spacing: -.055em; } -.hero p { max-width: 650px; margin: 0; color: #d8def0; font-size: clamp(1rem, 1.5vw, 1.16rem); } -.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.55rem; } -.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .65rem 1rem; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; background: rgba(255,255,255,.08); font-weight: 700; text-decoration: none; } -.button.primary { border-color: var(--lime); color: #151a2d; background: var(--lime); } -.button:hover { transform: translateY(-1px); color: #fff; background: rgba(255,255,255,.15); } -.button.primary:hover { color: #151a2d; background: #d8ff9a; } -.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; } -.badge { padding: .25rem .6rem; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #e8ecf7; background: rgba(9,13,27,.24); font-size: .76rem; font-weight: 650; } - -.layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); max-width: 1180px; margin: 0 auto; padding: 2.6rem 1.5rem 4rem; } -.side-nav { position: sticky; top: 5.7rem; align-self: start; display: grid; gap: .2rem; padding: .55rem; border: 1px solid var(--line); border-radius: 14px; background: var(--white); } -.side-nav a { padding: .55rem .7rem; border-radius: 8px; color: #4b5367; font-size: .87rem; font-weight: 620; text-decoration: none; } -.side-nav a:hover { color: var(--ink); background: #f0edff; } +/* 3. Skip link and top bar ------------------------------------------------- */ +.skip-link { + position: absolute; + left: var(--space-4); + top: -6rem; + z-index: 20; + padding: var(--space-3) var(--space-4); + border-radius: var(--radius); + background: var(--surface); + color: var(--ink); + font-weight: 650; +} +.skip-link:focus { top: var(--space-3); } +.topbar { position: sticky; top: 0; z-index: 10; background: var(--hero-bg); color: var(--hero-ink); } +.topbar-inner { + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--space-4); + max-width: var(--page-max); + min-height: var(--topbar-h); + margin: 0 auto; + padding: var(--space-2) var(--gutter); +} +.brand { display: flex; align-items: center; gap: var(--space-3); min-width: 0; color: var(--hero-ink); font-weight: 720; letter-spacing: -0.01em; text-decoration: none; } +.brand:hover { color: var(--hero-ink); } +.brand-logo, .brand-mark { display: block; flex: 0 0 auto; width: 2rem; height: 2rem; } +.top-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-1) var(--space-4); } +.top-links a { display: inline-flex; align-items: center; min-height: 2.25rem; color: var(--hero-ink-2); font-size: var(--text-s); font-weight: 600; text-decoration: none; } +.top-links a:hover { color: var(--hero-ink); text-decoration: underline; } +.topbar :focus-visible, .hero :focus-visible { outline-color: var(--hero-accent); } + +/* 4. Hero ------------------------------------------------------------------ */ +.hero-wrap { background: var(--hero-bg); color: var(--hero-ink); } +.hero { max-width: var(--page-max); margin: 0 auto; padding: var(--space-7) var(--gutter) var(--space-8); color: var(--hero-ink); } +.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: var(--space-7); } +.hero .hero-grid h1 { font-size: clamp(2.25rem, 1.5rem + 1.8vw, 3.125rem); } +.hero .hero-grid p { font-size: var(--text-m); } +.hero .hero-grid p.definition { font-size: var(--text-l); } +.hero-copy { max-width: 46rem; } +.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin: 0 0 var(--space-5); padding: 0; list-style: none; font-size: var(--text-s); color: var(--hero-ink-2); } +.crumbs li + li::before { margin-right: var(--space-2); content: "/"; color: var(--hero-ink-2); } +.crumbs a { color: var(--hero-ink-2); } +.crumbs a:hover { color: var(--hero-ink); } +.crumbs [aria-current] { color: var(--hero-ink); } +.eyebrow { display: block; margin: 0 0 var(--space-3); color: var(--hero-ink-2); font-size: var(--text-s); font-weight: 600; } +.hero h1 { margin: 0 0 var(--space-5); color: var(--hero-ink); font-size: var(--text-display); font-weight: 760; line-height: var(--leading-tight); letter-spacing: -0.025em; } +.hero p { max-width: 40rem; margin: 0 0 var(--space-4); color: var(--hero-ink-2); font-size: var(--text-l); line-height: 1.55; } +.hero p.definition, .hero .lead { color: var(--hero-ink); } +.hero code { color: var(--hero-ink); background: rgba(255, 255, 255, 0.1); } +.hero a:not(.button) { color: var(--hero-ink); } +.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-5) 0 0; } +.button { + display: inline-flex; + align-items: center; + justify-content: center; + min-height: 2.875rem; + padding: var(--space-2) var(--space-5); + border: 2px solid var(--hero-ink-2); + border-radius: var(--radius-s); + color: var(--hero-ink); + background: transparent; + font-size: var(--text-m); + font-weight: 680; + text-decoration: none; + transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease; +} +.button:hover { background: rgba(255, 255, 255, 0.1); color: var(--hero-ink); } +.button:active { transform: translateY(1px); } +.button.primary { border-color: var(--hero-accent); color: #0e1016; background: var(--hero-accent); } +.button.primary:hover { color: #0e1016; background: var(--hero-ink); border-color: var(--hero-ink); } +.hero-install, .install-line { + display: inline-flex; + align-items: center; + gap: var(--space-3); + max-width: 100%; + margin: var(--space-5) 0 0; + padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); + border-radius: var(--radius-s); + background: rgba(255, 255, 255, 0.08); + color: var(--hero-ink); + font-family: var(--font-code); + font-size: var(--text-s); + overflow-wrap: anywhere; +} +.badges { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: var(--space-6) 0 0; padding: 0; list-style: none; color: var(--hero-ink-2); font-size: var(--text-s); } +.badges li, .badge { display: inline; padding: 0; border: 0; background: none; color: var(--hero-ink-2); font-size: var(--text-s); font-weight: 600; } +.shields { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0 0; } +.shields a { display: inline-flex; } +.shields img { display: block; width: auto; height: 20px; } +.hero .hero-shot { margin: 0; background: rgba(255, 255, 255, 0.06); } + +/* 5. Page layout ----------------------------------------------------------- */ +.layout { + display: grid; + grid-template-columns: 13rem minmax(0, 1fr); + gap: var(--space-7); + max-width: var(--page-max); + margin: 0 auto; + padding: var(--space-7) var(--gutter) var(--space-8); +} +.layout:focus { outline: none; } +.side-nav { position: sticky; top: calc(var(--topbar-h) + var(--space-4)); align-self: start; display: grid; gap: 2px; max-height: calc(100vh - var(--topbar-h) - var(--space-6)); overflow-y: auto; } +.side-nav a { display: block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-s); color: var(--ink-2); font-size: var(--text-s); font-weight: 600; text-decoration: none; } +.side-nav a:hover { color: var(--ink); background: var(--surface-2); } .content { min-width: 0; } -.section { margin: 0 0 2.4rem; scroll-margin-top: 6rem; } -.section h2 { margin: 0 0 .6rem; font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.2; letter-spacing: -.035em; } -.section-lead { max-width: 780px; margin: 0 0 1.2rem; color: var(--muted); } -.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } -.card { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 24px rgba(31,43,74,.035); } -.card h3 { margin: 0 0 .4rem; font-size: 1.02rem; letter-spacing: -.015em; } -.card p { margin: 0; color: var(--muted); font-size: .93rem; } -.number { display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .75rem; border-radius: 10px; color: #3821a1; background: #eee9ff; font-weight: 800; } -.callout { margin: 1rem 0; padding: .9rem 1rem; border-left: 3px solid var(--cyan); border-radius: 0 10px 10px 0; color: #3c465c; background: #e9f9f9; } -.callout.warning { border-color: #e4a83b; background: #fff6e4; } -.code-card { overflow: hidden; margin: 1rem 0; border: 1px solid #272d44; border-radius: 14px; color: #f1f3fa; background: #171b2b; } -.code-card pre { overflow-x: auto; margin: 0; padding: 1rem 1.1rem; font-size: .88rem; line-height: 1.6; tab-size: 2; } -.code-label { display: flex; align-items: center; justify-content: space-between; padding: .55rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); color: #b8bfd3; font-size: .76rem; } -.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); } +.section { margin: 0 0 var(--space-8); scroll-margin-top: calc(var(--topbar-h) + var(--space-4)); } +.section:last-child { margin-bottom: 0; } +.section h2 { margin: 0 0 var(--space-4); font-size: var(--text-xl); line-height: 1.2; letter-spacing: -0.025em; } +.section h3, .sub-title, .subhead { margin: var(--space-6) 0 var(--space-3); font-size: var(--text-l); letter-spacing: -0.01em; } +.section > p, .section > ul, .section > ol, .section-lead, .lead { max-width: var(--measure); } +.section-lead { margin: 0 0 var(--space-5); color: var(--ink-2); font-size: var(--text-l); line-height: 1.55; } +.section p { margin: 0 0 var(--space-4); } +.section ul, .section ol { padding-left: 1.3rem; } +.section li { margin-bottom: var(--space-2); } + +/* 6. Definition, fit blocks and requirements ------------------------------- */ +.summary { margin: 0 0 var(--space-8); } +.definition { max-width: var(--measure); margin: 0 0 var(--space-5); font-size: var(--text-l); line-height: 1.55; } +.fit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin: 0; } +.fit { padding: var(--space-5); border-radius: var(--radius); background: var(--surface); } +.fit h2, .fit h3 { margin: 0 0 var(--space-3); font-size: var(--text-m); letter-spacing: 0; } +.fit ul { margin: 0; padding-left: 1.1rem; } +.fit li { margin-bottom: var(--space-2); font-size: var(--text-s); } +.fit-yes { box-shadow: inset 0 4px 0 var(--good); } +.fit-no { box-shadow: inset 0 4px 0 var(--bad); } +.fit-req { box-shadow: inset 0 4px 0 var(--accent); } + +/* 7. Cards, steps and lists ----------------------------------------------- */ +.card-grid, .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); } +.card { padding: var(--space-5); border-radius: var(--radius); background: var(--surface); } +.card h3 { margin: 0 0 var(--space-2); font-size: var(--text-m); line-height: var(--leading-snug); letter-spacing: -0.005em; } +.card p { margin: 0; color: var(--ink-2); font-size: var(--text-s); } +.card p + p { margin-top: var(--space-2); } +.card ul { margin: var(--space-2) 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: var(--text-s); } +.number { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; margin-bottom: var(--space-3); padding: 0 var(--space-2); border-radius: var(--radius-s); color: var(--accent-ink); background: var(--accent-soft); font-weight: 750; } +.section .steps { max-width: none; margin: 0 0 var(--space-5); padding-left: 1.4rem; } +.steps > li { margin-bottom: var(--space-4); padding-left: var(--space-2); } +.steps > li::marker { color: var(--accent-ink); font-weight: 750; } +.steps li p { margin: 0 0 var(--space-2); } +.steps .code-card { margin: var(--space-2) 0 var(--space-3); } +.check-list, .checklist, .checks { margin: 0 0 var(--space-4); padding: 0; list-style: none; } +.check-list li, .checklist li, .checks li { position: relative; margin-bottom: var(--space-2); padding-left: 1.6rem; } +.check-list li::before, .checklist li::before, .checks li::before { position: absolute; left: 0.15rem; top: 0.55em; width: 0.7rem; height: 0.4rem; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); content: ""; } +.link-list { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); } +.link-list a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: var(--space-2) var(--space-4); border-radius: var(--radius-s); background: var(--surface); font-size: var(--text-s); font-weight: 650; text-decoration: none; } +.link-list a:hover { background: var(--accent-soft); } + +/* 8. Callouts --------------------------------------------------------------- */ +.callout { max-width: var(--measure); margin: var(--space-4) 0; padding: var(--space-4) var(--space-5); border-left: 4px solid var(--note-line); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); background: var(--note-bg); } +.callout p { margin: 0; } +.callout p + p { margin-top: var(--space-2); } +.callout.warning { border-left-color: var(--warn-line); background: var(--warn-bg); } + +/* 9. Code ------------------------------------------------------------------ */ +.code-card { overflow: hidden; margin: var(--space-4) 0; border-radius: var(--radius); color: var(--code-ink); background: var(--code-bg); } +.code-card pre { overflow-x: auto; margin: 0; padding: var(--space-4) var(--space-5); font-size: 0.875rem; line-height: 1.6; tab-size: 2; } +.code-card code { padding: 0; color: inherit; background: none; font-size: inherit; } +.code-label { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 2.5rem; padding: var(--space-1) var(--space-2) var(--space-1) var(--space-5); background: rgba(255, 255, 255, 0.05); color: var(--code-muted); font-size: var(--text-xs); } +.copy-button { + min-height: 2rem; + padding: var(--space-1) var(--space-3); + border: 1px solid rgba(255, 255, 255, 0.25); + border-radius: var(--radius-s); + color: var(--code-ink); + background: transparent; + font: 600 var(--text-xs) / 1 var(--font-text); + cursor: pointer; +} +.copy-button:hover { background: rgba(255, 255, 255, 0.1); } +.copy-button { flex: 0 0 auto; white-space: nowrap; } +.hero-install code, .install-line code { padding: 0; color: inherit; background: none; font-size: inherit; } +.hero-install .copy-button, .install-line .copy-button { border-color: rgba(255, 255, 255, 0.3); } + +/* 10. Tables --------------------------------------------------------------- */ +.table-wrap { overflow-x: auto; margin: var(--space-4) 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); } table { width: 100%; border-collapse: collapse; text-align: left; } -th, td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; } -th { color: #40495f; background: #f7f8fb; font-size: .8rem; } -td { color: #555f74; font-size: .9rem; } -tr:last-child td { border-bottom: 0; } -.link-list { display: flex; flex-wrap: wrap; gap: .65rem; } -.link-list a { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .87rem; font-weight: 650; text-decoration: none; } -.footer { max-width: 1180px; margin: 0 auto; padding: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; } -.footer p { margin: .2rem 0; } +caption { padding: var(--space-3) var(--space-4); color: var(--ink); font-size: var(--text-s); font-weight: 700; text-align: left; } +th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); vertical-align: top; } +th { color: var(--ink); background: var(--surface-2); font-size: var(--text-s); font-weight: 680; } +td { color: var(--ink); font-size: var(--text-s); } +th[scope="row"] { min-width: 9rem; } +tr:last-child td, tr:last-child th { border-bottom: 0; } +td code, th code { overflow-wrap: break-word; } +/* 11. Screenshots ---------------------------------------------------------- */ +.hero-shot { margin: 0 0 var(--space-7); overflow: hidden; border-radius: var(--radius); background: var(--surface-2); } +.hero-shot img, .hero-shot picture, .shot picture { display: block; width: 100%; height: auto; } +.hero-shot figcaption, .shot figcaption { padding: var(--space-3) var(--space-4); color: var(--ink-2); font-size: var(--text-s); } +.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); margin: var(--space-4) 0; } +.gallery-mobile { grid-template-columns: repeat(3, minmax(0, 15rem)); } +.shot { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); } +.shot-wide { grid-column: 1 / -1; } +.shot a { display: block; line-height: 0; } +.shot a:focus-visible { outline-offset: -3px; } +.shot img { display: block; width: 100%; height: auto; background: var(--surface-2); } + +/* 12. FAQ ------------------------------------------------------------------ */ +.faq { display: grid; gap: var(--space-2); max-width: var(--measure); } +.faq details { border-radius: var(--radius); background: var(--surface); } +.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 3rem; padding: var(--space-3) var(--space-5); cursor: pointer; font-weight: 680; list-style: none; } +.faq summary::-webkit-details-marker { display: none; } +.faq summary::after { flex: 0 0 auto; color: var(--accent-ink); font-size: 1.4rem; font-weight: 400; line-height: 1; content: "+"; } +.faq details[open] summary::after { content: "\2212"; } +.faq details > :not(summary) { margin: 0; padding: 0 var(--space-5) var(--space-4); color: var(--ink-2); } +.faq details > p + p { padding-top: 0; } + +/* 13. Status cards --------------------------------------------------------- */ +.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin: 0 0 var(--space-4); } +.status-card { box-shadow: inset 0 4px 0 var(--line); } +.status-good { box-shadow: inset 0 4px 0 var(--good); } +.status-bad { box-shadow: inset 0 4px 0 var(--bad); } +.status-open { box-shadow: inset 0 4px 0 var(--open); } +.status-good h3 { color: var(--good); } +.status-bad h3 { color: var(--bad); } +.status-open h3 { color: var(--open); } + +/* 14. Footer --------------------------------------------------------------- */ +.footer { margin-top: var(--space-6); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-s); } +.footer-inner, .footer > p:first-child { max-width: var(--page-max); margin: 0 auto; } +.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--space-6); padding: var(--space-7) var(--gutter); } +.footer-name { margin: 0 0 var(--space-2); color: var(--ink); font-size: var(--text-l); font-weight: 720; } +.footer h2 { margin: 0 0 var(--space-3); color: var(--ink); font-size: var(--text-s); } +.footer ul { margin: 0; padding: 0; list-style: none; } +.footer li { margin-bottom: var(--space-2); } +.footer p { margin: 0 0 var(--space-2); } +.footer > p { max-width: var(--page-max); margin: 0 auto; padding: var(--space-2) var(--gutter); } + +/* 15. Responsive ----------------------------------------------------------- */ +@media (max-width: 1080px) { + .hero-grid { grid-template-columns: 1fr; gap: var(--space-6); } + .fit-grid { grid-template-columns: 1fr; } +} @media (max-width: 820px) { - .hero-wrap { padding: 1rem .85rem 0; } - .hero { min-height: 260px; border-radius: 20px; } - .hero::after { right: -4rem; top: 2rem; opacity: .55; } - .layout { grid-template-columns: 1fr; gap: 1.15rem; padding: 1.4rem .85rem 3rem; } - .side-nav { position: static; display: flex; overflow-x: auto; gap: .15rem; white-space: nowrap; scrollbar-width: thin; } - .side-nav a { flex: 0 0 auto; } + :root { --topbar-h: 3.5rem; } + .hero { padding: var(--space-6) var(--gutter) var(--space-7); } + .layout { grid-template-columns: 1fr; gap: var(--space-5); padding: var(--space-5) var(--gutter) var(--space-7); } + .side-nav { position: static; display: flex; flex-wrap: wrap; gap: var(--space-1); max-height: none; overflow: visible; } + .side-nav a { display: inline-flex; align-items: center; min-height: 2.25rem; background: var(--surface); } + .section { margin-bottom: var(--space-7); } + .status-grid { grid-template-columns: 1fr; } + .footer-inner { grid-template-columns: 1fr 1fr; } + .footer-inner > :first-child { grid-column: 1 / -1; } } @media (max-width: 560px) { - .topbar-inner { padding: .7rem .85rem; } - .top-links { gap: .65rem; } - .top-links a { font-size: .78rem; } - .brand { font-size: .9rem; } - .hero { padding: 1.7rem 1.25rem; } - .hero h1 { font-size: clamp(2.1rem, 11vw, 3rem); } - .card-grid { grid-template-columns: 1fr; } - .section { margin-bottom: 2rem; } - th, td { padding: .65rem; } + body { font-size: 1rem; } + .topbar-inner { gap: var(--space-2); } + .top-links { gap: 0 var(--space-3); } + .top-links a { font-size: var(--text-xs); } + .hero p { font-size: var(--text-m); } + .section-lead, .definition { font-size: var(--text-m); } + .card-grid, .cards, .gallery { grid-template-columns: 1fr; } + .gallery-mobile { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); } + .gallery-mobile .shot figcaption { padding: var(--space-2); font-size: var(--text-xs); } + .button { flex: 1 1 auto; } + .code-card pre { padding: var(--space-4); white-space: pre-wrap; overflow-wrap: anywhere; } + .code-label { padding-left: var(--space-4); } + th, td { padding: var(--space-2) var(--space-3); } + th[scope="row"] { min-width: 0; } + td code, th code { overflow-wrap: anywhere; } + .footer-inner { grid-template-columns: 1fr; } +} +@media (max-width: 380px) { + .brand span { font-size: var(--text-s); } } + +/* 16. Motion and print ----------------------------------------------------- */ @media (prefers-reduced-motion: reduce) { - *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } + html { scroll-behavior: auto; } + *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } +} +@media print { + .topbar, .side-nav, .skip-link, .copy-button, .shields { display: none !important; } + .layout { display: block; } + .hero-wrap, .hero { background: none; color: #000; } } diff --git a/docs/site/site.js b/docs/site/site.js new file mode 100644 index 0000000..af5014e --- /dev/null +++ b/docs/site/site.js @@ -0,0 +1,68 @@ +// Shared script for the Schero94 Strapi plugin documentation sites. +// Byte-identical in every plugin repository (docs/site/site.js), loaded with +// `defer`. It only adds "Copy" buttons to code blocks; the page works without it. +/* global window, document, navigator */ +(() => { + if (!navigator.clipboard || !window.isSecureContext) return; + + /** + * Adds a copy button that copies the text of `source` to the clipboard. + * @param {HTMLElement} host Element that receives the button. + * @param {HTMLElement} source Element whose text is copied. + * @param {string} label Accessible name, for example "Copy install command". + */ + const addButton = (host, source, label) => { + const button = document.createElement('button'); + button.type = 'button'; + button.className = 'copy-button'; + button.textContent = 'Copy'; + button.setAttribute('aria-label', label); + const status = document.createElement('span'); + status.className = 'visually-hidden'; + status.setAttribute('role', 'status'); + button.addEventListener('click', async () => { + try { + await navigator.clipboard.writeText(source.innerText.trim()); + button.textContent = 'Copied'; + status.textContent = 'Copied to the clipboard'; + } catch { + button.textContent = 'Select and copy'; + status.textContent = 'Copy failed. Select the text and copy it.'; + } + window.setTimeout(() => { + button.textContent = 'Copy'; + status.textContent = ''; + }, 2000); + }); + host.append(button, status); + }; + + for (const card of document.querySelectorAll('.code-card')) { + const code = card.querySelector('pre'); + if (!code) continue; + let label = card.querySelector('.code-label'); + if (!label) { + label = document.createElement('div'); + label.className = 'code-label'; + label.append(document.createElement('span')); + card.prepend(label); + } + const name = label.textContent.trim(); + addButton(label, code, name ? `Copy code: ${name}` : 'Copy code'); + } + + for (const line of document.querySelectorAll('.hero-install, .install-line')) { + const code = line.querySelector('code') || line; + if (line.tagName === 'CODE') { + // Wrap a bare so the button sits beside the command. + const wrap = document.createElement('span'); + wrap.className = line.className; + line.className = ''; + line.replaceWith(wrap); + wrap.append(line); + addButton(wrap, line, 'Copy install command'); + } else { + addButton(line, code, 'Copy install command'); + } + } +})(); diff --git a/docs/site/sitemap.xml b/docs/site/sitemap.xml new file mode 100644 index 0000000..28eee85 --- /dev/null +++ b/docs/site/sitemap.xml @@ -0,0 +1,6 @@ + + + + https://schero94.github.io/Magic-Sessionmanager/ + +