new tools modules & sass opti
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s
This commit is contained in:
parent
821e8e0a36
commit
9e275e0167
24 changed files with 3266 additions and 2372 deletions
12
README.md
12
README.md
|
|
@ -96,6 +96,8 @@ Chaque outil possède son propre fichier de composant :
|
||||||
- `website/src/features/toolboxes/modules/NotepadModule.jsx`
|
- `website/src/features/toolboxes/modules/NotepadModule.jsx`
|
||||||
- `website/src/features/toolboxes/modules/ChecklistModule.jsx`
|
- `website/src/features/toolboxes/modules/ChecklistModule.jsx`
|
||||||
- `website/src/features/toolboxes/modules/ScreenshotsModule.jsx`
|
- `website/src/features/toolboxes/modules/ScreenshotsModule.jsx`
|
||||||
|
- `website/src/features/toolboxes/modules/LinksModule.jsx`
|
||||||
|
- `website/src/features/toolboxes/modules/CountersModule.jsx`
|
||||||
|
|
||||||
Pour ajouter ou maintenir un outil :
|
Pour ajouter ou maintenir un outil :
|
||||||
|
|
||||||
|
|
@ -126,7 +128,17 @@ Pour ajouter ou maintenir un outil :
|
||||||
│ └── toolboxes/
|
│ └── toolboxes/
|
||||||
│ └── modules/
|
│ └── modules/
|
||||||
└── styles/
|
└── styles/
|
||||||
|
├── _base.scss
|
||||||
|
├── _cards.scss
|
||||||
|
├── _games.scss
|
||||||
|
├── _home.scss
|
||||||
|
├── _icons.scss
|
||||||
|
├── _mhwilds.scss
|
||||||
|
├── _overlays.scss
|
||||||
|
├── _responsive.scss
|
||||||
|
├── _shell.scss
|
||||||
├── _tokens.scss
|
├── _tokens.scss
|
||||||
|
├── _toolboxes.scss
|
||||||
└── main.scss
|
└── main.scss
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@ test("react application defines the expected local toolbox primitives", async ()
|
||||||
const source = await readFile("website/src/main.jsx", "utf8");
|
const source = await readFile("website/src/main.jsx", "utf8");
|
||||||
const styles = await readFile("website/src/styles/main.scss", "utf8");
|
const styles = await readFile("website/src/styles/main.scss", "utf8");
|
||||||
const styleTokens = await readFile("website/src/styles/_tokens.scss", "utf8");
|
const styleTokens = await readFile("website/src/styles/_tokens.scss", "utf8");
|
||||||
|
const styleBase = await readFile("website/src/styles/_base.scss", "utf8");
|
||||||
|
const styleToolboxes = await readFile("website/src/styles/_toolboxes.scss", "utf8");
|
||||||
|
const styleIcons = await readFile("website/src/styles/_icons.scss", "utf8");
|
||||||
|
const styleMhwilds = await readFile("website/src/styles/_mhwilds.scss", "utf8");
|
||||||
|
const styleResponsive = await readFile("website/src/styles/_responsive.scss", "utf8");
|
||||||
const iconComponent = await readFile("website/src/components/Icon.jsx", "utf8");
|
const iconComponent = await readFile("website/src/components/Icon.jsx", "utf8");
|
||||||
const gamesPage = await readFile("website/src/features/games/GamesPage.jsx", "utf8");
|
const gamesPage = await readFile("website/src/features/games/GamesPage.jsx", "utf8");
|
||||||
const gameRoute = await readFile("website/src/features/games/GameRoute.jsx", "utf8");
|
const gameRoute = await readFile("website/src/features/games/GameRoute.jsx", "utf8");
|
||||||
|
|
@ -27,12 +32,25 @@ test("react application defines the expected local toolbox primitives", async ()
|
||||||
const notepadModule = await readFile("website/src/features/toolboxes/modules/NotepadModule.jsx", "utf8");
|
const notepadModule = await readFile("website/src/features/toolboxes/modules/NotepadModule.jsx", "utf8");
|
||||||
const checklistModule = await readFile("website/src/features/toolboxes/modules/ChecklistModule.jsx", "utf8");
|
const checklistModule = await readFile("website/src/features/toolboxes/modules/ChecklistModule.jsx", "utf8");
|
||||||
const screenshotsModule = await readFile("website/src/features/toolboxes/modules/ScreenshotsModule.jsx", "utf8");
|
const screenshotsModule = await readFile("website/src/features/toolboxes/modules/ScreenshotsModule.jsx", "utf8");
|
||||||
|
const linksModule = await readFile("website/src/features/toolboxes/modules/LinksModule.jsx", "utf8");
|
||||||
|
const countersModule = await readFile("website/src/features/toolboxes/modules/CountersModule.jsx", "utf8");
|
||||||
|
|
||||||
assert.match(source, /sokkog:toolboxes/);
|
assert.match(source, /sokkog:toolboxes/);
|
||||||
assert.match(source, /sokkog:game-toolbox-links/);
|
assert.match(source, /sokkog:game-toolbox-links/);
|
||||||
assert.match(source, /styles\/main\.scss/);
|
assert.match(source, /styles\/main\.scss/);
|
||||||
assert.match(styles, /@use "tokens"/);
|
assert.match(styles, /@use "tokens"/);
|
||||||
|
assert.match(styles, /@use "toolboxes"/);
|
||||||
|
assert.match(styles, /@use "mhwilds"/);
|
||||||
assert.match(styleTokens, /--gradient-brand/);
|
assert.match(styleTokens, /--gradient-brand/);
|
||||||
|
assert.match(styleBase, /\.card-icon-button,\n\.drawer-action-button/);
|
||||||
|
assert.match(styleBase, /\.import-icon-button/);
|
||||||
|
assert.match(styleToolboxes, /\.module-icon-abacus/);
|
||||||
|
assert.match(styleIcons, /ui-icon-drag/);
|
||||||
|
assert.match(styleIcons, /ui-icon-dropdown/);
|
||||||
|
assert.match(styleIcons, /ui-icon-flip/);
|
||||||
|
assert.match(styleMhwilds, /\.mhwilds-card/);
|
||||||
|
assert.match(styleMhwilds, /\.mhwilds-flip-indicator/);
|
||||||
|
assert.match(styleResponsive, /@media \(max-width: 760px\)/);
|
||||||
assert.match(source, /features\/toolboxes\/modules\/index\.jsx/);
|
assert.match(source, /features\/toolboxes\/modules\/index\.jsx/);
|
||||||
assert.match(source, /features\/games\/GamesPage\.jsx/);
|
assert.match(source, /features\/games\/GamesPage\.jsx/);
|
||||||
assert.match(source, /features\/games\/GameRoute\.jsx/);
|
assert.match(source, /features\/games\/GameRoute\.jsx/);
|
||||||
|
|
@ -44,17 +62,32 @@ test("react application defines the expected local toolbox primitives", async ()
|
||||||
assert.match(mhwildsListing, /export function MhwildsListing/);
|
assert.match(mhwildsListing, /export function MhwildsListing/);
|
||||||
assert.match(mhwildsFilters, /export function MhwildsFilters/);
|
assert.match(mhwildsFilters, /export function MhwildsFilters/);
|
||||||
assert.match(monsterCard, /export function MonsterCard/);
|
assert.match(monsterCard, /export function MonsterCard/);
|
||||||
|
assert.match(monsterCard, /ui-icon-flip/);
|
||||||
assert.match(endemicCard, /export function EndemicCard/);
|
assert.match(endemicCard, /export function EndemicCard/);
|
||||||
assert.match(damageTable, /rowIndex/);
|
assert.match(damageTable, /rowIndex/);
|
||||||
assert.match(moduleRegistry, /export const TOOLBOX_MODULES/);
|
assert.match(moduleRegistry, /export const TOOLBOX_MODULES/);
|
||||||
|
assert.match(moduleRegistry, /export function AddToolControls/);
|
||||||
assert.match(moduleRegistry, /export function ToolboxModules/);
|
assert.match(moduleRegistry, /export function ToolboxModules/);
|
||||||
assert.match(moduleRegistry, /MODULE_COMPONENTS/);
|
assert.match(moduleRegistry, /MODULE_COMPONENTS/);
|
||||||
assert.match(moduleRegistry, /notepad:/);
|
assert.match(moduleRegistry, /notepad:/);
|
||||||
assert.match(moduleRegistry, /checklist:/);
|
assert.match(moduleRegistry, /checklist:/);
|
||||||
assert.match(moduleRegistry, /screenshots:/);
|
assert.match(moduleRegistry, /screenshots:/);
|
||||||
|
assert.match(moduleRegistry, /links:/);
|
||||||
|
assert.match(moduleRegistry, /counters:/);
|
||||||
|
assert.match(moduleRegistry, /editable: false/);
|
||||||
|
assert.match(moduleRegistry, /module-edit-button/);
|
||||||
assert.match(notepadModule, /export function NotepadModule/);
|
assert.match(notepadModule, /export function NotepadModule/);
|
||||||
assert.match(checklistModule, /export function ChecklistModule/);
|
assert.match(checklistModule, /export function ChecklistModule/);
|
||||||
assert.match(screenshotsModule, /export function ScreenshotsModule/);
|
assert.match(screenshotsModule, /export function ScreenshotsModule/);
|
||||||
|
assert.match(linksModule, /export function LinksModule/);
|
||||||
|
assert.match(countersModule, /export function CountersModule/);
|
||||||
|
assert.match(checklistModule, /editing &&/);
|
||||||
|
assert.match(screenshotsModule, /editing &&/);
|
||||||
|
assert.match(linksModule, /editing &&/);
|
||||||
|
assert.match(countersModule, /editing &&/);
|
||||||
|
assert.match(countersModule, /counter-actions/);
|
||||||
|
assert.match(linksModule, /normalizeUrl/);
|
||||||
|
assert.match(linksModule, /copyText/);
|
||||||
assert.match(source, /DEFAULT_SITE_CONTENT/);
|
assert.match(source, /DEFAULT_SITE_CONTENT/);
|
||||||
assert.match(source, /\/data\/site\.json/);
|
assert.match(source, /\/data\/site\.json/);
|
||||||
assert.match(source, /APP_STORAGE_LIMIT_BYTES/);
|
assert.match(source, /APP_STORAGE_LIMIT_BYTES/);
|
||||||
|
|
@ -63,17 +96,30 @@ test("react application defines the expected local toolbox primitives", async ()
|
||||||
assert.match(source, /role="progressbar"/);
|
assert.match(source, /role="progressbar"/);
|
||||||
assert.match(source, /function createGlobalExportPayload/);
|
assert.match(source, /function createGlobalExportPayload/);
|
||||||
assert.match(source, /async function importAllToolboxes/);
|
assert.match(source, /async function importAllToolboxes/);
|
||||||
|
assert.match(source, /import-icon-button/);
|
||||||
assert.match(source, /function LinkToolboxModal/);
|
assert.match(source, /function LinkToolboxModal/);
|
||||||
assert.doesNotMatch(source, /description: _description/);
|
assert.doesNotMatch(source, /description: _description/);
|
||||||
assert.match(source, /function CreateToolboxModal/);
|
assert.match(source, /function CreateToolboxModal/);
|
||||||
assert.match(source, /const getToolboxGameId/);
|
assert.match(source, /const getToolboxGameId/);
|
||||||
assert.match(source, /dragon\.png/);
|
assert.match(source, /dragon\.png/);
|
||||||
assert.match(source, /getToolboxGame\(toolbox\)/);
|
assert.match(source, /getToolboxGame\(toolbox\)/);
|
||||||
|
assert.match(source, /toolbox-card-cover-link/);
|
||||||
assert.match(source, /moduleColumns/);
|
assert.match(source, /moduleColumns/);
|
||||||
assert.match(source, /function ToolboxView/);
|
assert.match(source, /function ToolboxView/);
|
||||||
assert.match(moduleRegistry, /onDragStart/);
|
assert.match(moduleRegistry, /onDragStart/);
|
||||||
|
assert.match(moduleRegistry, /onPointerDown/);
|
||||||
|
assert.match(moduleRegistry, /setPointerCapture/);
|
||||||
|
assert.match(moduleRegistry, /elementFromPoint/);
|
||||||
|
assert.match(moduleRegistry, /tool-add-card/);
|
||||||
|
assert.match(moduleRegistry, /tool-quick-add-button/);
|
||||||
|
assert.match(moduleRegistry, /tool-add-quick-toggle/);
|
||||||
|
assert.match(moduleRegistry, /Icon name="dropdown"/);
|
||||||
|
assert.match(moduleRegistry, /aria-expanded=\{quickOpen\}/);
|
||||||
|
assert.doesNotMatch(source, /<select value="" onChange=\{\(event\) => addModule/);
|
||||||
assert.match(source, /qtyTarget/);
|
assert.match(source, /qtyTarget/);
|
||||||
assert.match(source, /qtyCurrent/);
|
assert.match(source, /qtyCurrent/);
|
||||||
|
assert.match(source, /normalizeLinksData/);
|
||||||
|
assert.match(source, /normalizeCountersData/);
|
||||||
assert.match(checklistModule, /ChecklistItem/);
|
assert.match(checklistModule, /ChecklistItem/);
|
||||||
assert.match(screenshotsModule, /clipboardData/);
|
assert.match(screenshotsModule, /clipboardData/);
|
||||||
assert.match(source, /async function addScreenshotFiles/);
|
assert.match(source, /async function addScreenshotFiles/);
|
||||||
|
|
@ -126,6 +172,8 @@ test("legacy svg icons are available for reuse", async () => {
|
||||||
await readFile("website/public/static/icons/checklist.svg", "utf8");
|
await readFile("website/public/static/icons/checklist.svg", "utf8");
|
||||||
await readFile("website/public/static/icons/close.svg", "utf8");
|
await readFile("website/public/static/icons/close.svg", "utf8");
|
||||||
await readFile("website/public/static/icons/columns.svg", "utf8");
|
await readFile("website/public/static/icons/columns.svg", "utf8");
|
||||||
|
await readFile("website/public/static/icons/copy.svg", "utf8");
|
||||||
|
await readFile("website/public/static/icons/abacus.svg", "utf8");
|
||||||
await readFile("website/public/static/icons/export.svg", "utf8");
|
await readFile("website/public/static/icons/export.svg", "utf8");
|
||||||
await readFile("website/public/static/icons/notepad.svg", "utf8");
|
await readFile("website/public/static/icons/notepad.svg", "utf8");
|
||||||
await readFile("website/public/static/icons/picture.svg", "utf8");
|
await readFile("website/public/static/icons/picture.svg", "utf8");
|
||||||
|
|
|
||||||
2
website/public/static/icons/abacus.svg
Normal file
2
website/public/static/icons/abacus.svg
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1"><path d="M21,2a1,1,0,0,0-1,1V6H16V5a1,1,0,0,0-2,0V6H12V5a1,1,0,0,0-2,0V6H8V5A1,1,0,0,0,6,5V6H4V3A1,1,0,0,0,2,3V19a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V3A1,1,0,0,0,21,2ZM20,19a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V16H6v1a1,1,0,0,0,2,0V16h2v1a1,1,0,0,0,2,0V16h4v1a1,1,0,0,0,2,0V16h2Zm0-5H18V13a1,1,0,0,0-2,0v1H12V13a1,1,0,0,0-2,0v1H8V13a1,1,0,0,0-2,0v1H4V8H6V9A1,1,0,0,0,8,9V8h2V9a1,1,0,0,0,2,0V8h2V9a1,1,0,0,0,2,0V8h4Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 655 B |
14
website/public/static/icons/drag.svg
Normal file
14
website/public/static/icons/drag.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="Interface / Drag_Vertical">
|
||||||
|
<g id="Vector">
|
||||||
|
<path d="M14 18C14 18.5523 14.4477 19 15 19C15.5523 19 16 18.5523 16 18C16 17.4477 15.5523 17 15 17C14.4477 17 14 17.4477 14 18Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M8 18C8 18.5523 8.44772 19 9 19C9.55228 19 10 18.5523 10 18C10 17.4477 9.55228 17 9 17C8.44772 17 8 17.4477 8 18Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M14 12C14 12.5523 14.4477 13 15 13C15.5523 13 16 12.5523 16 12C16 11.4477 15.5523 11 15 11C14.4477 11 14 11.4477 14 12Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M8 12C8 12.5523 8.44772 13 9 13C9.55228 13 10 12.5523 10 12C10 11.4477 9.55228 11 9 11C8.44772 11 8 11.4477 8 12Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M14 6C14 6.55228 14.4477 7 15 7C15.5523 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5C14.4477 5 14 5.44772 14 6Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M8 6C8 6.55228 8.44772 7 9 7C9.55228 7 10 6.55228 10 6C10 5.44772 9.55228 5 9 5C8.44772 5 8 5.44772 8 6Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
6
website/public/static/icons/dropdown.svg
Normal file
6
website/public/static/icons/dropdown.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg fill="#000000" width="800px" height="800px" viewBox="-6.5 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<title>dropdown</title>
|
||||||
|
<path d="M18.813 11.406l-7.906 9.906c-0.75 0.906-1.906 0.906-2.625 0l-7.906-9.906c-0.75-0.938-0.375-1.656 0.781-1.656h16.875c1.188 0 1.531 0.719 0.781 1.656z"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 444 B |
4
website/public/static/icons/flip.svg
Normal file
4
website/public/static/icons/flip.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M3 8H16.5C18.9853 8 21 10.0147 21 12.5C21 14.9853 18.9853 17 16.5 17H3M3 8L6 5M3 8L6 11" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 411 B |
|
|
@ -24,6 +24,9 @@ export function MonsterCard({ monster, t }) {
|
||||||
>
|
>
|
||||||
<div className="mhwilds-card-inner">
|
<div className="mhwilds-card-inner">
|
||||||
<div className="mhwilds-card-face mhwilds-card-front">
|
<div className="mhwilds-card-face mhwilds-card-front">
|
||||||
|
<span className="mhwilds-flip-indicator" aria-hidden="true">
|
||||||
|
<span className="ui-icon ui-icon-flip" />
|
||||||
|
</span>
|
||||||
<div className="mhwilds-card-art">
|
<div className="mhwilds-card-art">
|
||||||
<img src={assetPath(monster.name)} alt={t(monster.name, { capitalize: true })} loading="lazy" />
|
<img src={assetPath(monster.name)} alt={t(monster.name, { capitalize: true })} loading="lazy" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -35,6 +38,9 @@ export function MonsterCard({ monster, t }) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mhwilds-card-face mhwilds-card-back">
|
<div className="mhwilds-card-face mhwilds-card-back">
|
||||||
|
<span className="mhwilds-flip-indicator" aria-hidden="true">
|
||||||
|
<span className="ui-icon ui-icon-flip" />
|
||||||
|
</span>
|
||||||
<div className="mhwilds-card-body">
|
<div className="mhwilds-card-body">
|
||||||
<p className="eyebrow">Détails</p>
|
<p className="eyebrow">Détails</p>
|
||||||
<h2>{t(monster.name, { capitalize: true })}</h2>
|
<h2>{t(monster.name, { capitalize: true })}</h2>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
export function ChecklistModule({ toolboxId, moduleId, context }) {
|
export function ChecklistModule({ toolboxId, moduleId, context, editing }) {
|
||||||
const data = context.normalizeChecklistData(context.getModuleData(toolboxId, moduleId, { items: [] }));
|
const data = context.normalizeChecklistData(context.getModuleData(toolboxId, moduleId, { items: [] }));
|
||||||
const [label, setLabel] = useState("");
|
const [label, setLabel] = useState("");
|
||||||
const [qty, setQty] = useState(1);
|
const [qty, setQty] = useState(1);
|
||||||
|
|
@ -20,11 +20,13 @@ export function ChecklistModule({ toolboxId, moduleId, context }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form className="inline-form checklist-add-form" onSubmit={addItem}>
|
{editing && (
|
||||||
|
<form className="inline-form checklist-add-form module-add-panel" onSubmit={addItem}>
|
||||||
<input name="label" placeholder="Nouvel item" value={label} onChange={(event) => setLabel(event.target.value)} />
|
<input name="label" placeholder="Nouvel item" value={label} onChange={(event) => setLabel(event.target.value)} />
|
||||||
<input className="checklist-qty-input" name="qty" type="number" min="1" value={qty} onChange={(event) => setQty(event.target.value)} aria-label="Quantité cible" />
|
<input className="checklist-qty-input" name="qty" type="number" min="1" value={qty} onChange={(event) => setQty(event.target.value)} aria-label="Quantité cible" />
|
||||||
<button className="primary">Ajouter</button>
|
<button className="primary">Ajouter</button>
|
||||||
</form>
|
</form>
|
||||||
|
)}
|
||||||
<ul className="checklist">
|
<ul className="checklist">
|
||||||
{data.items.map((item) => (
|
{data.items.map((item) => (
|
||||||
<ChecklistItem key={item.id} item={item} toolboxId={toolboxId} moduleId={moduleId} context={context} items={data.items} save={save} />
|
<ChecklistItem key={item.id} item={item} toolboxId={toolboxId} moduleId={moduleId} context={context} items={data.items} save={save} />
|
||||||
|
|
|
||||||
55
website/src/features/toolboxes/modules/CountersModule.jsx
Normal file
55
website/src/features/toolboxes/modules/CountersModule.jsx
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
import { useState } from "react";
|
||||||
|
import { Icon } from "../../../components/Icon.jsx";
|
||||||
|
|
||||||
|
export function CountersModule({ toolboxId, moduleId, context, editing }) {
|
||||||
|
const data = context.normalizeCountersData(context.getModuleData(toolboxId, moduleId, { counters: [] }));
|
||||||
|
const [label, setLabel] = useState("");
|
||||||
|
|
||||||
|
function save(counters) {
|
||||||
|
context.setModuleData(toolboxId, moduleId, { counters });
|
||||||
|
}
|
||||||
|
|
||||||
|
function addCounter(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const cleanLabel = label.trim();
|
||||||
|
if (!cleanLabel) return;
|
||||||
|
|
||||||
|
save([...data.counters, { id: context.uid("counter"), label: cleanLabel, value: 0 }]);
|
||||||
|
setLabel("");
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateCounter(counterId, updater) {
|
||||||
|
save(data.counters.map((counter) => counter.id === counterId ? updater(counter) : counter));
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{editing && (
|
||||||
|
<form className="inline-form counters-add-form module-add-panel" onSubmit={addCounter}>
|
||||||
|
<input name="label" placeholder="Nom du compteur" value={label} onChange={(event) => setLabel(event.target.value)} />
|
||||||
|
<button className="primary">Ajouter</button>
|
||||||
|
</form>
|
||||||
|
)}
|
||||||
|
<div className="counters-grid">
|
||||||
|
{data.counters.map((counter) => (
|
||||||
|
<article className="counter-item" key={counter.id}>
|
||||||
|
<div>
|
||||||
|
<strong>{counter.value}</strong>
|
||||||
|
<span>{counter.label}</span>
|
||||||
|
</div>
|
||||||
|
<div className="counter-actions">
|
||||||
|
<button type="button" onClick={() => updateCounter(counter.id, (item) => ({ ...item, value: item.value - 1 }))} aria-label={`Décrémenter ${counter.label}`}>-</button>
|
||||||
|
<button type="button" onClick={() => updateCounter(counter.id, (item) => ({ ...item, value: item.value + 1 }))} aria-label={`Incrémenter ${counter.label}`}>+</button>
|
||||||
|
<button type="button" onClick={() => updateCounter(counter.id, (item) => ({ ...item, value: 0 }))} aria-label={`Réinitialiser ${counter.label}`} title="Réinitialiser">
|
||||||
|
<Icon name="rubber" />
|
||||||
|
</button>
|
||||||
|
<button type="button" className="danger" onClick={() => save(data.counters.filter((item) => item.id !== counter.id))} aria-label={`Supprimer ${counter.label}`} title="Supprimer">
|
||||||
|
<Icon name="trash" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
67
website/src/features/toolboxes/modules/LinksModule.jsx
Normal file
67
website/src/features/toolboxes/modules/LinksModule.jsx
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
import { useState } from "react";
|
||||||
|
import { Icon } from "../../../components/Icon.jsx";
|
||||||
|
|
||||||
|
export function LinksModule({ toolboxId, moduleId, context, editing }) {
|
||||||
|
const data = context.normalizeLinksData(context.getModuleData(toolboxId, moduleId, { links: [] }));
|
||||||
|
const [title, setTitle] = useState("");
|
||||||
|
const [url, setUrl] = useState("");
|
||||||
|
const [copiedId, setCopiedId] = useState("");
|
||||||
|
|
||||||
|
function save(links) {
|
||||||
|
context.setModuleData(toolboxId, moduleId, { links });
|
||||||
|
}
|
||||||
|
|
||||||
|
function addLink(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const cleanUrl = context.normalizeUrl(url);
|
||||||
|
if (!cleanUrl) return;
|
||||||
|
|
||||||
|
save([
|
||||||
|
...data.links,
|
||||||
|
{
|
||||||
|
id: context.uid("link"),
|
||||||
|
title: title.trim(),
|
||||||
|
url: cleanUrl
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
setTitle("");
|
||||||
|
setUrl("");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function copyUrl(link) {
|
||||||
|
const copied = await context.copyText(link.url);
|
||||||
|
if (!copied) return;
|
||||||
|
setCopiedId(link.id);
|
||||||
|
window.setTimeout(() => setCopiedId(""), 1400);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{editing && (
|
||||||
|
<form className="inline-form links-add-form module-add-panel" onSubmit={addLink}>
|
||||||
|
<input name="title" placeholder="Nom du lien" value={title} onChange={(event) => setTitle(event.target.value)} />
|
||||||
|
<input name="url" placeholder="https://..." value={url} onChange={(event) => setUrl(event.target.value)} />
|
||||||
|
<button className="primary">Ajouter</button>
|
||||||
|
</form>
|
||||||
|
)}
|
||||||
|
<ul className="links-list">
|
||||||
|
{data.links.map((link) => (
|
||||||
|
<li className="link-item" key={link.id}>
|
||||||
|
<a href={link.url} target="_blank" rel="noreferrer" title={link.url}>
|
||||||
|
<strong>{link.title || context.hostnameFromUrl(link.url)}</strong>
|
||||||
|
<span>{link.url}</span>
|
||||||
|
</a>
|
||||||
|
<div>
|
||||||
|
<button type="button" onClick={() => copyUrl(link)} aria-label={`Copier ${link.title || link.url}`} title={copiedId === link.id ? "Copié" : "Copier"}>
|
||||||
|
<Icon name="copy" />
|
||||||
|
</button>
|
||||||
|
<button type="button" className="danger" onClick={() => save(data.links.filter((item) => item.id !== link.id))} aria-label={`Supprimer ${link.title || link.url}`} title="Supprimer">
|
||||||
|
<Icon name="trash" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
export function ScreenshotsModule({ toolboxId, moduleId, context }) {
|
export function ScreenshotsModule({ toolboxId, moduleId, context, editing }) {
|
||||||
const data = context.getModuleData(toolboxId, moduleId, { shots: [] });
|
const data = context.getModuleData(toolboxId, moduleId, { shots: [] });
|
||||||
const [dragOver, setDragOver] = useState(false);
|
const [dragOver, setDragOver] = useState(false);
|
||||||
|
|
||||||
|
|
@ -12,6 +12,8 @@ export function ScreenshotsModule({ toolboxId, moduleId, context }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{editing && (
|
||||||
|
<div className="module-add-panel">
|
||||||
<label
|
<label
|
||||||
className={`dropzone ${dragOver ? "is-drag-over" : ""}`}
|
className={`dropzone ${dragOver ? "is-drag-over" : ""}`}
|
||||||
onDragOver={(event) => {
|
onDragOver={(event) => {
|
||||||
|
|
@ -53,6 +55,8 @@ export function ScreenshotsModule({ toolboxId, moduleId, context }) {
|
||||||
>
|
>
|
||||||
Coller une image ici
|
Coller une image ici
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="shots">
|
<div className="shots">
|
||||||
{data.shots.map((shot) => (
|
{data.shots.map((shot) => (
|
||||||
<figure key={shot.id}>
|
<figure key={shot.id}>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
import { createPortal } from "react-dom";
|
||||||
|
import { Icon } from "../../../components/Icon.jsx";
|
||||||
import { ChecklistModule } from "./ChecklistModule.jsx";
|
import { ChecklistModule } from "./ChecklistModule.jsx";
|
||||||
|
import { CountersModule } from "./CountersModule.jsx";
|
||||||
|
import { LinksModule } from "./LinksModule.jsx";
|
||||||
import { NotepadModule } from "./NotepadModule.jsx";
|
import { NotepadModule } from "./NotepadModule.jsx";
|
||||||
import { ScreenshotsModule } from "./ScreenshotsModule.jsx";
|
import { ScreenshotsModule } from "./ScreenshotsModule.jsx";
|
||||||
|
|
||||||
const MODULE_COMPONENTS = {
|
const MODULE_COMPONENTS = {
|
||||||
notepad: { label: "Bloc notes", icon: "notepad", Component: NotepadModule },
|
notepad: { label: "Bloc notes", icon: "notepad", Component: NotepadModule, editable: false },
|
||||||
checklist: { label: "Checklist", icon: "checklist", Component: ChecklistModule },
|
checklist: { label: "Checklist", icon: "checklist", Component: ChecklistModule, editable: true },
|
||||||
screenshots: { label: "Screenshots", icon: "picture", Component: ScreenshotsModule }
|
screenshots: { label: "Screenshots", icon: "picture", Component: ScreenshotsModule, editable: true },
|
||||||
|
links: { label: "Liens", icon: "link", Component: LinksModule, editable: true },
|
||||||
|
counters: { label: "Compteurs", icon: "abacus", Component: CountersModule, editable: true }
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TOOLBOX_MODULES = Object.fromEntries(Object.entries(MODULE_COMPONENTS).map(([type, module]) => [
|
export const TOOLBOX_MODULES = Object.fromEntries(Object.entries(MODULE_COMPONENTS).map(([type, module]) => [
|
||||||
|
|
@ -13,11 +20,183 @@ export const TOOLBOX_MODULES = Object.fromEntries(Object.entries(MODULE_COMPONEN
|
||||||
{ label: module.label, icon: module.icon }
|
{ label: module.label, icon: module.icon }
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
export function AddToolControls({ onAdd }) {
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
|
const [quickOpen, setQuickOpen] = useState(false);
|
||||||
|
const controlsRef = useRef(null);
|
||||||
|
const modules = Object.entries(TOOLBOX_MODULES);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!quickOpen) return undefined;
|
||||||
|
|
||||||
|
function handlePointerDown(event) {
|
||||||
|
if (!controlsRef.current?.contains(event.target)) setQuickOpen(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleKeyDown(event) {
|
||||||
|
if (event.key === "Escape") setQuickOpen(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener("pointerdown", handlePointerDown);
|
||||||
|
document.addEventListener("keydown", handleKeyDown);
|
||||||
|
return () => {
|
||||||
|
document.removeEventListener("pointerdown", handlePointerDown);
|
||||||
|
document.removeEventListener("keydown", handleKeyDown);
|
||||||
|
};
|
||||||
|
}, [quickOpen]);
|
||||||
|
|
||||||
|
function addTool(type) {
|
||||||
|
onAdd(type);
|
||||||
|
setOpen(false);
|
||||||
|
setQuickOpen(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
className="tool-add-controls"
|
||||||
|
ref={controlsRef}
|
||||||
|
onMouseLeave={() => setQuickOpen(false)}
|
||||||
|
onFocusCapture={(event) => {
|
||||||
|
if (event.target.closest(".tool-add-quick-toggle")) setQuickOpen(true);
|
||||||
|
}}
|
||||||
|
onBlurCapture={(event) => {
|
||||||
|
if (!event.currentTarget.contains(event.relatedTarget)) setQuickOpen(false);
|
||||||
|
}}
|
||||||
|
aria-label="Ajouter un outil"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
className="primary tool-add-modal-button"
|
||||||
|
type="button"
|
||||||
|
onClick={() => {
|
||||||
|
setQuickOpen(false);
|
||||||
|
setOpen(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Ajouter un outil
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className={`primary tool-add-quick-toggle ${quickOpen ? "active" : ""}`}
|
||||||
|
type="button"
|
||||||
|
onMouseEnter={() => setQuickOpen(true)}
|
||||||
|
onClick={() => setQuickOpen((value) => !value)}
|
||||||
|
aria-label="Afficher l'ajout rapide"
|
||||||
|
aria-expanded={quickOpen}
|
||||||
|
title="Ajout rapide"
|
||||||
|
>
|
||||||
|
<Icon name="dropdown" />
|
||||||
|
</button>
|
||||||
|
<div className={`tool-quick-add ${quickOpen ? "is-open" : ""}`} aria-label="Ajout rapide">
|
||||||
|
{modules.map(([type, module]) => (
|
||||||
|
<button
|
||||||
|
key={type}
|
||||||
|
className="tool-quick-add-button"
|
||||||
|
type="button"
|
||||||
|
onClick={() => onAdd(type)}
|
||||||
|
aria-label={`Ajouter ${module.label}`}
|
||||||
|
title={module.label}
|
||||||
|
>
|
||||||
|
<span className="module-icon" aria-hidden="true">
|
||||||
|
<span className={`module-icon-svg module-icon-${module.icon}`} />
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{open && createPortal(
|
||||||
|
<div className="tool-add-modal-root" role="dialog" aria-modal="true" aria-labelledby="tool-add-modal-title">
|
||||||
|
<div className="confirm-backdrop" onClick={() => setOpen(false)} />
|
||||||
|
<section className="confirm-modal tool-add-modal">
|
||||||
|
<header>
|
||||||
|
<h2 id="tool-add-modal-title">Ajouter un outil</h2>
|
||||||
|
<button className="drawer-close-button" type="button" onClick={() => setOpen(false)} aria-label="Fermer" title="Fermer">
|
||||||
|
<Icon name="close" />
|
||||||
|
</button>
|
||||||
|
</header>
|
||||||
|
<div className="tool-add-grid">
|
||||||
|
{modules.map(([type, module]) => (
|
||||||
|
<button key={type} className="tool-add-card" type="button" onClick={() => addTool(type)}>
|
||||||
|
<span className="module-icon" aria-hidden="true">
|
||||||
|
<span className={`module-icon-svg module-icon-${module.icon}`} />
|
||||||
|
</span>
|
||||||
|
<span>{module.label}</span>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>,
|
||||||
|
document.body
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export function ToolboxModules({ toolbox, moduleColumns, context, onRename, onDelete, onMove }) {
|
export function ToolboxModules({ toolbox, moduleColumns, context, onRename, onDelete, onMove }) {
|
||||||
|
const [draggingModuleId, setDraggingModuleId] = useState("");
|
||||||
|
const [dropTarget, setDropTarget] = useState({ id: "", placement: "before" });
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!draggingModuleId) return undefined;
|
||||||
|
|
||||||
|
function getDropTarget(event) {
|
||||||
|
const element = document.elementFromPoint(event.clientX, event.clientY);
|
||||||
|
const target = element?.closest?.(".module");
|
||||||
|
if (!target || target.dataset.toolboxId !== toolbox.id || target.dataset.moduleId === draggingModuleId) {
|
||||||
|
return { id: "", placement: "before" };
|
||||||
|
}
|
||||||
|
const rect = target.getBoundingClientRect();
|
||||||
|
return {
|
||||||
|
id: target.dataset.moduleId,
|
||||||
|
placement: event.clientY > rect.top + rect.height / 2 ? "after" : "before"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePointerMove(event) {
|
||||||
|
setDropTarget(getDropTarget(event));
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePointerUp(event) {
|
||||||
|
const target = getDropTarget(event);
|
||||||
|
if (target.id) onMove(draggingModuleId, target.id, target.placement);
|
||||||
|
setDraggingModuleId("");
|
||||||
|
setDropTarget({ id: "", placement: "before" });
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("pointermove", handlePointerMove);
|
||||||
|
window.addEventListener("pointerup", handlePointerUp, { once: true });
|
||||||
|
window.addEventListener("pointercancel", handlePointerUp, { once: true });
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("pointermove", handlePointerMove);
|
||||||
|
window.removeEventListener("pointerup", handlePointerUp);
|
||||||
|
window.removeEventListener("pointercancel", handlePointerUp);
|
||||||
|
};
|
||||||
|
}, [draggingModuleId, onMove, toolbox.id]);
|
||||||
|
|
||||||
|
function startModuleDrag(event, moduleId) {
|
||||||
|
if (event.button !== 0) return;
|
||||||
|
event.preventDefault();
|
||||||
|
event.currentTarget.setPointerCapture?.(event.pointerId);
|
||||||
|
setDraggingModuleId(moduleId);
|
||||||
|
setDropTarget({ id: "", placement: "before" });
|
||||||
|
}
|
||||||
|
|
||||||
if (moduleColumns === 1) {
|
if (moduleColumns === 1) {
|
||||||
return (
|
return (
|
||||||
<section className="modules" data-toolbox-id={toolbox.id} data-layout-cols={moduleColumns}>
|
<section className="modules" data-toolbox-id={toolbox.id} data-layout-cols={moduleColumns}>
|
||||||
{toolbox.modules.map((module) => <ModuleShell key={module.id} toolbox={toolbox} module={module} context={context} onRename={onRename} onDelete={onDelete} onMove={onMove} />)}
|
{toolbox.modules.map((module) => (
|
||||||
|
<ModuleShell
|
||||||
|
key={module.id}
|
||||||
|
toolbox={toolbox}
|
||||||
|
module={module}
|
||||||
|
context={context}
|
||||||
|
draggingModuleId={draggingModuleId}
|
||||||
|
dropTarget={dropTarget}
|
||||||
|
onDragStart={startModuleDrag}
|
||||||
|
onRename={onRename}
|
||||||
|
onDelete={onDelete}
|
||||||
|
onMove={onMove}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -29,77 +208,80 @@ export function ToolboxModules({ toolbox, moduleColumns, context, onRename, onDe
|
||||||
<section className="modules" data-toolbox-id={toolbox.id} data-layout-cols={moduleColumns}>
|
<section className="modules" data-toolbox-id={toolbox.id} data-layout-cols={moduleColumns}>
|
||||||
{columns.map((modules, index) => (
|
{columns.map((modules, index) => (
|
||||||
<div className="module-column" key={index}>
|
<div className="module-column" key={index}>
|
||||||
{modules.map((module) => <ModuleShell key={module.id} toolbox={toolbox} module={module} context={context} onRename={onRename} onDelete={onDelete} onMove={onMove} />)}
|
{modules.map((module) => (
|
||||||
|
<ModuleShell
|
||||||
|
key={module.id}
|
||||||
|
toolbox={toolbox}
|
||||||
|
module={module}
|
||||||
|
context={context}
|
||||||
|
draggingModuleId={draggingModuleId}
|
||||||
|
dropTarget={dropTarget}
|
||||||
|
onDragStart={startModuleDrag}
|
||||||
|
onRename={onRename}
|
||||||
|
onDelete={onDelete}
|
||||||
|
onMove={onMove}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ModuleShell({ toolbox, module, context, onRename, onDelete, onMove }) {
|
function ModuleShell({ toolbox, module, context, draggingModuleId, dropTarget, onDragStart, onRename, onDelete }) {
|
||||||
const definition = MODULE_COMPONENTS[module.type] || MODULE_COMPONENTS.notepad;
|
const definition = MODULE_COMPONENTS[module.type] || MODULE_COMPONENTS.notepad;
|
||||||
const Component = definition.Component;
|
const Component = definition.Component;
|
||||||
const label = definition.label || module.type;
|
const label = definition.label || module.type;
|
||||||
|
const [editing, setEditing] = useState(false);
|
||||||
function handleDragStart(event) {
|
const isDragging = draggingModuleId === module.id;
|
||||||
if (event.target.closest("button, input, select, textarea, [contenteditable='true']")) {
|
const isDropTarget = dropTarget.id === module.id;
|
||||||
event.preventDefault();
|
const className = [
|
||||||
return;
|
"module",
|
||||||
}
|
isDragging ? "is-dragging" : "",
|
||||||
event.currentTarget.classList.add("is-dragging");
|
isDropTarget ? "is-drop-target" : "",
|
||||||
event.dataTransfer.effectAllowed = "move";
|
isDropTarget && dropTarget.placement === "after" ? "drop-after" : ""
|
||||||
event.dataTransfer.setData("text/plain", module.id);
|
].filter(Boolean).join(" ");
|
||||||
}
|
|
||||||
|
|
||||||
function handleDragOver(event) {
|
|
||||||
const fromModuleId = event.dataTransfer.getData("text/plain");
|
|
||||||
if (!fromModuleId || fromModuleId === module.id) return;
|
|
||||||
event.preventDefault();
|
|
||||||
event.dataTransfer.dropEffect = "move";
|
|
||||||
event.currentTarget.classList.add("is-drop-target");
|
|
||||||
const rect = event.currentTarget.getBoundingClientRect();
|
|
||||||
event.currentTarget.classList.toggle("drop-after", event.clientY > rect.top + rect.height / 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleDrop(event) {
|
|
||||||
const fromModuleId = event.dataTransfer.getData("text/plain");
|
|
||||||
if (!fromModuleId || fromModuleId === module.id) return;
|
|
||||||
event.preventDefault();
|
|
||||||
const rect = event.currentTarget.getBoundingClientRect();
|
|
||||||
onMove(fromModuleId, module.id, event.clientY > rect.top + rect.height / 2 ? "after" : "before");
|
|
||||||
}
|
|
||||||
|
|
||||||
function clearDragClasses(event) {
|
|
||||||
event.currentTarget.classList.remove("is-dragging", "is-drop-target", "drop-after");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article
|
<article
|
||||||
className="module"
|
className={className}
|
||||||
data-toolbox-id={toolbox.id}
|
data-toolbox-id={toolbox.id}
|
||||||
data-module-id={module.id}
|
data-module-id={module.id}
|
||||||
draggable
|
|
||||||
onDragStart={handleDragStart}
|
|
||||||
onDragOver={handleDragOver}
|
|
||||||
onDragLeave={clearDragClasses}
|
|
||||||
onDrop={handleDrop}
|
|
||||||
onDragEnd={clearDragClasses}
|
|
||||||
>
|
>
|
||||||
<header>
|
<header>
|
||||||
<div>
|
<div>
|
||||||
<span className="module-drag-handle" aria-hidden="true" title="Déplacer l'outil" />
|
<button
|
||||||
|
className="module-drag-handle"
|
||||||
|
type="button"
|
||||||
|
onPointerDown={(event) => onDragStart(event, module.id)}
|
||||||
|
aria-label={`Déplacer ${module.title || label}`}
|
||||||
|
title="Déplacer"
|
||||||
|
>
|
||||||
|
<Icon name="drag" />
|
||||||
|
</button>
|
||||||
<span className="module-icon" aria-hidden="true">
|
<span className="module-icon" aria-hidden="true">
|
||||||
<span className={`module-icon-svg module-icon-${definition.icon || "notepad"}`} />
|
<span className={`module-icon-svg module-icon-${definition.icon || "notepad"}`} />
|
||||||
</span>
|
</span>
|
||||||
<EditableModuleTitle value={module.title || label} fallback={label} onSave={(title) => onRename(module.id, title)} />
|
<EditableModuleTitle value={module.title || label} fallback={label} onSave={(title) => onRename(module.id, title)} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
{definition.editable && (
|
||||||
|
<button
|
||||||
|
className={`module-edit-button ${editing ? "active" : ""}`}
|
||||||
|
onClick={() => setEditing((value) => !value)}
|
||||||
|
aria-label={`${editing ? "Masquer" : "Afficher"} l'ajout de ${module.title || label}`}
|
||||||
|
aria-pressed={editing}
|
||||||
|
title={editing ? "Masquer l'ajout" : "Ajouter"}
|
||||||
|
>
|
||||||
|
<Icon name="edit" />
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
<button className="module-delete-button danger" onClick={() => onDelete(module.id)} aria-label={`Retirer ${module.title || label}`} title="Retirer">
|
<button className="module-delete-button danger" onClick={() => onDelete(module.id)} aria-label={`Retirer ${module.title || label}`} title="Retirer">
|
||||||
<span className="ui-icon ui-icon-trash" aria-hidden="true" />
|
<span className="ui-icon ui-icon-trash" aria-hidden="true" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<Component toolboxId={toolbox.id} moduleId={module.id} context={context} />
|
<Component toolboxId={toolbox.id} moduleId={module.id} context={context} editing={editing} />
|
||||||
</article>
|
</article>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import "./styles/main.scss";
|
||||||
import { Icon } from "./components/Icon.jsx";
|
import { Icon } from "./components/Icon.jsx";
|
||||||
import { GameRoute } from "./features/games/GameRoute.jsx";
|
import { GameRoute } from "./features/games/GameRoute.jsx";
|
||||||
import { GamesPage } from "./features/games/GamesPage.jsx";
|
import { GamesPage } from "./features/games/GamesPage.jsx";
|
||||||
import { ToolboxModules, TOOLBOX_MODULES } from "./features/toolboxes/modules/index.jsx";
|
import { AddToolControls, ToolboxModules, TOOLBOX_MODULES } from "./features/toolboxes/modules/index.jsx";
|
||||||
|
|
||||||
const STORAGE_KEYS = {
|
const STORAGE_KEYS = {
|
||||||
registry: "sokkog:toolboxes",
|
registry: "sokkog:toolboxes",
|
||||||
|
|
@ -14,7 +14,7 @@ const STORAGE_KEYS = {
|
||||||
const APP_STORAGE_PREFIX = "sokkog:";
|
const APP_STORAGE_PREFIX = "sokkog:";
|
||||||
const APP_STORAGE_LIMIT_BYTES = 5 * 1024 * 1024;
|
const APP_STORAGE_LIMIT_BYTES = 5 * 1024 * 1024;
|
||||||
const APP_STORAGE_WARNING_RATIO = 0.85;
|
const APP_STORAGE_WARNING_RATIO = 0.85;
|
||||||
const ID_PREFIXES = { tbx: "t", mod: "m", item: "i", shot: "s" };
|
const ID_PREFIXES = { tbx: "t", mod: "m", item: "i", shot: "s", link: "l", counter: "c" };
|
||||||
const ID_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
const ID_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||||
|
|
||||||
const DEFAULT_SITE_CONTENT = {
|
const DEFAULT_SITE_CONTENT = {
|
||||||
|
|
@ -223,6 +223,60 @@ function normalizeChecklistData(data) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function normalizeUrl(value) {
|
||||||
|
const cleanValue = String(value || "").trim();
|
||||||
|
if (!cleanValue) return "";
|
||||||
|
|
||||||
|
try {
|
||||||
|
const url = new URL(cleanValue.includes("://") ? cleanValue : `https://${cleanValue}`);
|
||||||
|
if (url.protocol !== "http:" && url.protocol !== "https:") return "";
|
||||||
|
return url.href;
|
||||||
|
} catch {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hostnameFromUrl(value) {
|
||||||
|
try {
|
||||||
|
return new URL(value).hostname.replace(/^www\./, "");
|
||||||
|
} catch {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeLinksData(data) {
|
||||||
|
return {
|
||||||
|
links: (data?.links || [])
|
||||||
|
.map((link) => {
|
||||||
|
const url = normalizeUrl(link?.url);
|
||||||
|
if (!url) return null;
|
||||||
|
return {
|
||||||
|
id: link?.id || uid("link"),
|
||||||
|
title: String(link?.title || "").trim(),
|
||||||
|
url
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.filter(Boolean)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeCounterValue(value) {
|
||||||
|
const parsed = Number.parseInt(value, 10);
|
||||||
|
return Number.isFinite(parsed) ? parsed : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeCountersData(data) {
|
||||||
|
return {
|
||||||
|
counters: (data?.counters || [])
|
||||||
|
.map((counter) => ({
|
||||||
|
id: counter?.id || uid("counter"),
|
||||||
|
label: String(counter?.label || "").trim(),
|
||||||
|
value: normalizeCounterValue(counter?.value)
|
||||||
|
}))
|
||||||
|
.filter((counter) => counter.label)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function compactChecklistItemForStorage(item) {
|
function compactChecklistItemForStorage(item) {
|
||||||
const normalized = normalizeChecklistItem(item);
|
const normalized = normalizeChecklistItem(item);
|
||||||
const compact = { id: normalized.id, label: normalized.label };
|
const compact = { id: normalized.id, label: normalized.label };
|
||||||
|
|
@ -246,6 +300,25 @@ function compactModuleDataForStorage(type, value) {
|
||||||
.map((shot) => ({ id: shot.id || uid("shot"), dataUrl: shot.dataUrl }));
|
.map((shot) => ({ id: shot.id || uid("shot"), dataUrl: shot.dataUrl }));
|
||||||
return shots.length ? { shots } : null;
|
return shots.length ? { shots } : null;
|
||||||
}
|
}
|
||||||
|
if (type === "links") {
|
||||||
|
const links = normalizeLinksData(value).links.map((link) => {
|
||||||
|
const compact = {
|
||||||
|
id: link.id,
|
||||||
|
url: link.url
|
||||||
|
};
|
||||||
|
if (link.title) compact.title = link.title;
|
||||||
|
return compact;
|
||||||
|
});
|
||||||
|
return links.length ? { links } : null;
|
||||||
|
}
|
||||||
|
if (type === "counters") {
|
||||||
|
const counters = normalizeCountersData(value).counters.map((counter) => ({
|
||||||
|
id: counter.id,
|
||||||
|
label: counter.label,
|
||||||
|
value: counter.value
|
||||||
|
}));
|
||||||
|
return counters.length ? { counters } : null;
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -277,6 +350,15 @@ function remapModuleDataForExport(type, data, nextId) {
|
||||||
if (type === "screenshots") {
|
if (type === "screenshots") {
|
||||||
return { shots: compact.shots.map((shot) => ({ ...shot, id: nextId("shot") })) };
|
return { shots: compact.shots.map((shot) => ({ ...shot, id: nextId("shot") })) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type === "links") {
|
||||||
|
return { links: compact.links.map((link) => ({ ...link, id: nextId("link") })) };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type === "counters") {
|
||||||
|
return { counters: compact.counters.map((counter) => ({ ...counter, id: nextId("counter") })) };
|
||||||
|
}
|
||||||
|
|
||||||
return compact;
|
return compact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -386,6 +468,15 @@ function openImageInNewTab(dataUrl) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function copyText(value) {
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(value);
|
||||||
|
return true;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function useHashRoute() {
|
function useHashRoute() {
|
||||||
const [route, setRoute] = useState(currentRoute);
|
const [route, setRoute] = useState(currentRoute);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -762,7 +853,7 @@ function Shell({ route, content, games, toolboxes, links, actions, children }) {
|
||||||
<span className="badge">{content.sidebar.badge}</span>
|
<span className="badge">{content.sidebar.badge}</span>
|
||||||
<p>{content.sidebar.note}</p>
|
<p>{content.sidebar.note}</p>
|
||||||
<div className="sidebar-storage-actions" aria-label="Actions globales de stockage">
|
<div className="sidebar-storage-actions" aria-label="Actions globales de stockage">
|
||||||
<ImportButton className="sidebar-action-button" title="Importer tout" ariaLabel="Importer toutes les toolboxes" onFile={actions.importAllToolboxes} icon="import" />
|
<ImportButton className="sidebar-action-button import-icon-button" title="Importer tout" ariaLabel="Importer toutes les toolboxes" onFile={actions.importAllToolboxes} icon="import" />
|
||||||
<button className="sidebar-action-button" onClick={actions.exportAllToolboxes} aria-label="Exporter toutes les toolboxes" title="Exporter tout"><Icon name="export" /></button>
|
<button className="sidebar-action-button" onClick={actions.exportAllToolboxes} aria-label="Exporter toutes les toolboxes" title="Exporter tout"><Icon name="export" /></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -901,9 +992,15 @@ function StorageHelpCard({ help }) {
|
||||||
function ToolboxCard({ toolbox, game, actions }) {
|
function ToolboxCard({ toolbox, game, actions }) {
|
||||||
return (
|
return (
|
||||||
<article className="card toolbox-card">
|
<article className="card toolbox-card">
|
||||||
<div className={`card-cover ${game?.image ? "toolbox-card-cover" : ""}`} style={{ "--game-cover": game?.cover || "var(--gradient-nebula)", background: game?.image ? "" : "var(--gradient-nebula)" }}>
|
<a
|
||||||
|
className={`card-cover toolbox-card-cover-link ${game?.image ? "toolbox-card-cover" : ""}`}
|
||||||
|
href={`#/toolbox/${toolbox.id}`}
|
||||||
|
aria-label={`Ouvrir ${toolbox.name}`}
|
||||||
|
title={`Ouvrir ${toolbox.name}`}
|
||||||
|
style={{ "--game-cover": game?.cover || "var(--gradient-nebula)", background: game?.image ? "" : "var(--gradient-nebula)" }}
|
||||||
|
>
|
||||||
{game?.image && <img src={game.image} alt={game.title} loading="lazy" />}
|
{game?.image && <img src={game.image} alt={game.title} loading="lazy" />}
|
||||||
</div>
|
</a>
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<p className="eyebrow">{game ? game.title : "Toolbox libre"}</p>
|
<p className="eyebrow">{game ? game.title : "Toolbox libre"}</p>
|
||||||
<h2>{toolbox.name}</h2>
|
<h2>{toolbox.name}</h2>
|
||||||
|
|
@ -936,6 +1033,11 @@ function ToolboxView({ toolbox, embedded, actions, updateToolbox, updateModuleDa
|
||||||
const moduleContext = {
|
const moduleContext = {
|
||||||
getModuleData,
|
getModuleData,
|
||||||
normalizeChecklistData,
|
normalizeChecklistData,
|
||||||
|
normalizeLinksData,
|
||||||
|
normalizeCountersData,
|
||||||
|
normalizeUrl,
|
||||||
|
hostnameFromUrl,
|
||||||
|
copyText,
|
||||||
clampQty,
|
clampQty,
|
||||||
uid,
|
uid,
|
||||||
setModuleData: updateModuleData,
|
setModuleData: updateModuleData,
|
||||||
|
|
@ -971,10 +1073,7 @@ function ToolboxView({ toolbox, embedded, actions, updateToolbox, updateModuleDa
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="actions">
|
<div className="actions">
|
||||||
<select value="" onChange={(event) => addModule(event.target.value)} aria-label="Ajouter un outil">
|
<AddToolControls onAdd={addModule} />
|
||||||
<option value="">Ajouter un outil</option>
|
|
||||||
{Object.entries(TOOLBOX_MODULES).map(([type, module]) => <option key={type} value={type}>{module.label}</option>)}
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{!embedded && (
|
{!embedded && (
|
||||||
|
|
@ -1053,7 +1152,7 @@ function ToolboxDrawer({ gameId, toolboxes, links, actions, updateToolbox, updat
|
||||||
<div>
|
<div>
|
||||||
<p className="eyebrow">Toolbox liée</p>
|
<p className="eyebrow">Toolbox liée</p>
|
||||||
<div className="drawer-toolbox-actions" aria-label="Actions toolbox liée">
|
<div className="drawer-toolbox-actions" aria-label="Actions toolbox liée">
|
||||||
<ImportButton className="drawer-action-button" ariaLabel="Importer une toolbox" title="Importer" icon="import" onFile={(file) => actions.importToolbox(file, gameId)} />
|
<ImportButton className="drawer-action-button import-icon-button" ariaLabel="Importer une toolbox" title="Importer" icon="import" onFile={(file) => actions.importToolbox(file, gameId)} />
|
||||||
<button className="drawer-action-button" onClick={() => actions.setLinkModalGameId(gameId)} aria-label="Lier une toolbox" title="Lier"><Icon name="link" /></button>
|
<button className="drawer-action-button" onClick={() => actions.setLinkModalGameId(gameId)} aria-label="Lier une toolbox" title="Lier"><Icon name="link" /></button>
|
||||||
<button className="drawer-action-button" onClick={() => actions.exportToolbox(selectedId)} disabled={!selectedId} aria-label="Exporter la toolbox liée" title="Exporter"><Icon name="export" /></button>
|
<button className="drawer-action-button" onClick={() => actions.exportToolbox(selectedId)} disabled={!selectedId} aria-label="Exporter la toolbox liée" title="Exporter"><Icon name="export" /></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
206
website/src/styles/_base.scss
Normal file
206
website/src/styles/_base.scss
Normal file
|
|
@ -0,0 +1,206 @@
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
min-height: 100%;
|
||||||
|
background: var(--color-bg-page);
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
min-height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
background: var(--gradient-page);
|
||||||
|
font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
||||||
|
line-height: 1.55;
|
||||||
|
}
|
||||||
|
|
||||||
|
body::before {
|
||||||
|
content: "";
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: -1;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.23;
|
||||||
|
background-image:
|
||||||
|
radial-gradient(circle, rgba(255, 255, 255, 0.52) 1px, transparent 1px),
|
||||||
|
radial-gradient(circle, rgba(139, 92, 246, 0.38) 1px, transparent 1px);
|
||||||
|
background-position: 0 0, 35px 60px;
|
||||||
|
background-size: 90px 90px, 140px 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
.button,
|
||||||
|
select,
|
||||||
|
input,
|
||||||
|
textarea,
|
||||||
|
.import-button {
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(21, 26, 48, 0.92);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font: inherit;
|
||||||
|
transition:
|
||||||
|
transform var(--duration-fast) var(--ease-standard),
|
||||||
|
border-color var(--duration-fast) var(--ease-standard),
|
||||||
|
background-color var(--duration-fast) var(--ease-standard),
|
||||||
|
box-shadow var(--duration-fast) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
.button,
|
||||||
|
.import-button {
|
||||||
|
display: inline-flex;
|
||||||
|
min-height: 42px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 0 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover,
|
||||||
|
.button:hover,
|
||||||
|
.import-button:hover {
|
||||||
|
border-color: var(--color-border-hover);
|
||||||
|
background: var(--color-bg-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active,
|
||||||
|
.button:active,
|
||||||
|
.import-button:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
:focus-visible {
|
||||||
|
outline: 2px solid var(--color-accent-cyan);
|
||||||
|
outline-offset: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-options::-webkit-scrollbar,
|
||||||
|
.drawer-panel::-webkit-scrollbar,
|
||||||
|
.damage-table-wrap::-webkit-scrollbar,
|
||||||
|
.legacy-scrollbar::-webkit-scrollbar {
|
||||||
|
background-color: transparent;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-options::-webkit-scrollbar-track,
|
||||||
|
.drawer-panel::-webkit-scrollbar-track,
|
||||||
|
.damage-table-wrap::-webkit-scrollbar-track,
|
||||||
|
.legacy-scrollbar::-webkit-scrollbar-track {
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-options::-webkit-scrollbar-thumb,
|
||||||
|
.drawer-panel::-webkit-scrollbar-thumb,
|
||||||
|
.damage-table-wrap::-webkit-scrollbar-thumb,
|
||||||
|
.legacy-scrollbar::-webkit-scrollbar-thumb {
|
||||||
|
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.5, rgb(79, 26, 114)), color-stop(1, rgb(44, 1, 135)));
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary {
|
||||||
|
border-color: transparent;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
box-shadow: 0 8px 22px rgba(99, 102, 241, 0.22);
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary:hover {
|
||||||
|
border-color: transparent;
|
||||||
|
filter: brightness(1.08);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 10px 28px rgba(139, 92, 246, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ghost {
|
||||||
|
border-color: transparent;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.danger {
|
||||||
|
color: var(--color-danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
.danger:hover {
|
||||||
|
border-color: rgba(251, 113, 133, 0.32);
|
||||||
|
background: var(--color-danger-soft);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-action-button,
|
||||||
|
.import-icon-button,
|
||||||
|
.toolbox-icon-button,
|
||||||
|
.card-icon-button,
|
||||||
|
.drawer-action-button,
|
||||||
|
.drawer-close-button,
|
||||||
|
.filter-reset-button,
|
||||||
|
.screenshot-viewer-button,
|
||||||
|
.module-edit-button,
|
||||||
|
.module-delete-button,
|
||||||
|
.shot-delete-button,
|
||||||
|
.tool-quick-add-button {
|
||||||
|
display: inline-flex;
|
||||||
|
width: 40px;
|
||||||
|
min-width: 40px;
|
||||||
|
min-height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(21, 26, 48, 0.88);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
transition:
|
||||||
|
transform var(--duration-fast) var(--ease-standard),
|
||||||
|
border-color var(--duration-fast) var(--ease-standard),
|
||||||
|
background-color var(--duration-fast) var(--ease-standard),
|
||||||
|
box-shadow var(--duration-fast) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-action-button:hover,
|
||||||
|
.import-icon-button:hover,
|
||||||
|
.card-icon-button:hover,
|
||||||
|
.drawer-action-button:hover,
|
||||||
|
.drawer-close-button:hover,
|
||||||
|
.filter-reset-button:hover,
|
||||||
|
.screenshot-viewer-button:hover,
|
||||||
|
.module-edit-button:hover,
|
||||||
|
.module-delete-button:hover,
|
||||||
|
.shot-delete-button:hover,
|
||||||
|
.tool-quick-add-button:hover {
|
||||||
|
border-color: var(--color-border-hover);
|
||||||
|
background: var(--color-bg-hover);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon-button.danger,
|
||||||
|
.module-delete-button.danger,
|
||||||
|
.shot-delete-button.danger {
|
||||||
|
border-color: rgba(251, 113, 133, 0.2);
|
||||||
|
color: var(--color-danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon-button.danger:hover,
|
||||||
|
.module-delete-button.danger:hover,
|
||||||
|
.shot-delete-button.danger:hover {
|
||||||
|
border-color: rgba(251, 113, 133, 0.46);
|
||||||
|
background: var(--color-danger-soft);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 10px 24px rgba(251, 113, 133, 0.12);
|
||||||
|
}
|
||||||
322
website/src/styles/_cards.scss
Normal file
322
website/src/styles/_cards.scss
Normal file
|
|
@ -0,0 +1,322 @@
|
||||||
|
.section-grid,
|
||||||
|
.cards,
|
||||||
|
.info-grid,
|
||||||
|
.modules {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--space-4);
|
||||||
|
margin-top: var(--space-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-grid,
|
||||||
|
.info-grid {
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards {
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature,
|
||||||
|
.info-panel,
|
||||||
|
.module,
|
||||||
|
.empty,
|
||||||
|
.card {
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(16, 20, 38, 0.88);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature,
|
||||||
|
.info-panel,
|
||||||
|
.empty {
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature,
|
||||||
|
.card,
|
||||||
|
.module,
|
||||||
|
.info-panel {
|
||||||
|
transition:
|
||||||
|
transform var(--duration-fast) var(--ease-standard),
|
||||||
|
border-color var(--duration-fast) var(--ease-standard),
|
||||||
|
background-color var(--duration-fast) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature:hover,
|
||||||
|
.card:hover,
|
||||||
|
.module:hover,
|
||||||
|
.info-panel:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
border-color: var(--color-border-hover);
|
||||||
|
background: rgba(21, 26, 48, 0.96);
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature strong {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-heading,
|
||||||
|
.toolbox-head {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-cover {
|
||||||
|
min-height: 124px;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-actions {
|
||||||
|
margin-top: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card {
|
||||||
|
display: flex;
|
||||||
|
min-height: 292px;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card .card-cover {
|
||||||
|
flex: 0 0 124px;
|
||||||
|
height: 124px;
|
||||||
|
min-height: 124px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card-cover-link {
|
||||||
|
display: block;
|
||||||
|
outline-offset: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card-cover-link:hover img,
|
||||||
|
.toolbox-card-cover-link:focus-visible img {
|
||||||
|
transform: scale(1.035);
|
||||||
|
filter: brightness(1.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card-cover-link img {
|
||||||
|
transition:
|
||||||
|
transform var(--duration-normal) var(--ease-standard),
|
||||||
|
filter var(--duration-normal) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card .card-body {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card .card-actions {
|
||||||
|
margin-top: auto;
|
||||||
|
padding-top: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-page {
|
||||||
|
display: flex;
|
||||||
|
min-height: calc(100vh - 68px - var(--space-8) - var(--space-12));
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-embedded {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-card {
|
||||||
|
position: relative;
|
||||||
|
min-height: 292px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-color: rgba(34, 211, 238, 0.22);
|
||||||
|
background:
|
||||||
|
linear-gradient(135deg, rgba(34, 211, 238, 0.1), transparent 38%),
|
||||||
|
rgba(10, 13, 29, 0.84);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-card::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0 auto 0 0;
|
||||||
|
width: 3px;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-card .card-body {
|
||||||
|
display: flex;
|
||||||
|
min-height: 100%;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-heading {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 36px minmax(0, 1fr);
|
||||||
|
gap: 10px;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-mark {
|
||||||
|
display: grid;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
place-items: center;
|
||||||
|
border: 1px solid rgba(34, 211, 238, 0.32);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(34, 211, 238, 0.1);
|
||||||
|
color: var(--color-accent-cyan);
|
||||||
|
box-shadow: 0 0 22px rgba(34, 211, 238, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-mark::before {
|
||||||
|
content: "";
|
||||||
|
width: 19px;
|
||||||
|
height: 19px;
|
||||||
|
background: currentColor;
|
||||||
|
mask: url("/static/icons/save.svg") center / contain no-repeat;
|
||||||
|
-webkit-mask: url("/static/icons/save.svg") center / contain no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-card h2 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-card .eyebrow {
|
||||||
|
color: var(--color-accent-cyan);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-intro {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: var(--font-size-xs);
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-card p,
|
||||||
|
.storage-help-card ul {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-list {
|
||||||
|
display: grid;
|
||||||
|
gap: 7px;
|
||||||
|
margin-top: 18px;
|
||||||
|
padding: 10px 0 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-list li {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 22px minmax(0, 1fr);
|
||||||
|
gap: 8px;
|
||||||
|
align-items: start;
|
||||||
|
padding: 8px 9px;
|
||||||
|
border: 1px solid rgba(150, 165, 205, 0.12);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(7, 10, 24, 0.45);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-list span {
|
||||||
|
display: grid;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
background: rgba(139, 92, 246, 0.18);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--font-size-xs);
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-help-list p {
|
||||||
|
align-self: center;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: var(--font-size-xs);
|
||||||
|
line-height: 1.32;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--space-3);
|
||||||
|
margin-top: auto;
|
||||||
|
padding: var(--space-4);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(10, 13, 29, 0.78);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-page > .storage-quota,
|
||||||
|
.drawer-content > .storage-quota {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota > div:first-child {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-4);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota strong {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota-track {
|
||||||
|
width: 100%;
|
||||||
|
height: 9px;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid rgba(150, 165, 205, 0.14);
|
||||||
|
border-radius: var(--radius-pill);
|
||||||
|
background: rgba(5, 7, 17, 0.82);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota-track span {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: inherit;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
box-shadow: 0 0 18px rgba(99, 102, 241, 0.32);
|
||||||
|
transition: width var(--duration-normal) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota-warning {
|
||||||
|
border-color: rgba(251, 191, 36, 0.34);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota-warning .storage-quota-track span {
|
||||||
|
background: linear-gradient(135deg, #fbbf24, #f97316);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota-danger {
|
||||||
|
border-color: rgba(251, 113, 133, 0.42);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-quota-danger .storage-quota-track span {
|
||||||
|
background: linear-gradient(135deg, #fb7185, #d946ef);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon-button {
|
||||||
|
flex: 0 0 40px;
|
||||||
|
}
|
||||||
41
website/src/styles/_games.scss
Normal file
41
website/src/styles/_games.scss
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
.game-card .card-cover {
|
||||||
|
min-height: 170px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-card-cover {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background:
|
||||||
|
var(--game-cover),
|
||||||
|
rgba(5, 7, 17, 0.72);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-card-cover {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background:
|
||||||
|
var(--game-cover),
|
||||||
|
rgba(5, 7, 17, 0.72);
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-card-cover img,
|
||||||
|
.toolbox-card-cover img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: inherit;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-flex;
|
||||||
|
min-height: 24px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
border-radius: var(--radius-pill);
|
||||||
|
background: var(--color-primary-soft);
|
||||||
|
color: #b69cff;
|
||||||
|
font-size: var(--font-size-xs);
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 3px 9px;
|
||||||
|
}
|
||||||
238
website/src/styles/_home.scss
Normal file
238
website/src/styles/_home.scss
Normal file
|
|
@ -0,0 +1,238 @@
|
||||||
|
.hero,
|
||||||
|
.game-hero {
|
||||||
|
position: relative;
|
||||||
|
display: grid;
|
||||||
|
min-height: 360px;
|
||||||
|
align-items: end;
|
||||||
|
gap: var(--space-6);
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-xl);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
padding: var(--space-10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero::after,
|
||||||
|
.game-hero::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
background:
|
||||||
|
linear-gradient(135deg, rgba(5, 7, 17, 0.1), rgba(5, 7, 17, 0.52)),
|
||||||
|
radial-gradient(circle at 82% 16%, rgba(34, 211, 238, 0.18), transparent 30%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero > *,
|
||||||
|
.game-hero > * {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
|
||||||
|
background:
|
||||||
|
var(--gradient-nebula),
|
||||||
|
linear-gradient(135deg, rgba(16, 20, 38, 0.98), rgba(5, 7, 17, 0.96));
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-hero {
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
max-width: 820px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
font-size: clamp(2rem, 4vw, var(--font-size-4xl));
|
||||||
|
line-height: 1.05;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
li,
|
||||||
|
small,
|
||||||
|
span {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.eyebrow {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: var(--color-accent-cyan);
|
||||||
|
font-size: var(--font-size-xs);
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: 0;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions,
|
||||||
|
.card-actions,
|
||||||
|
.toolbar {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar-stack {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar-stack > div {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-panel {
|
||||||
|
padding: var(--space-5);
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.14);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(16, 20, 38, 0.72);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-panel span {
|
||||||
|
display: block;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
font-size: 56px;
|
||||||
|
font-weight: 800;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-visual {
|
||||||
|
display: grid;
|
||||||
|
align-self: center;
|
||||||
|
justify-self: stretch;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 320px;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-visual img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-height: 520px;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.34));
|
||||||
|
}
|
||||||
|
|
||||||
|
.origin-section {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.65fr);
|
||||||
|
gap: var(--space-6);
|
||||||
|
margin-top: var(--space-6);
|
||||||
|
padding: var(--space-6);
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.14);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(16, 20, 38, 0.42);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.origin-copy {
|
||||||
|
min-width: 0;
|
||||||
|
padding-right: var(--space-6);
|
||||||
|
border-right: 2px solid rgba(34, 211, 238, 0.66);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-dialogue {
|
||||||
|
position: relative;
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-line {
|
||||||
|
width: fit-content;
|
||||||
|
max-width: min(74ch, 86%);
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px 11px;
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.14);
|
||||||
|
border-radius: 8px;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
line-height: 1.35;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-line-user {
|
||||||
|
justify-self: end;
|
||||||
|
background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(37, 99, 235, 0.18));
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-line-app {
|
||||||
|
justify-self: start;
|
||||||
|
max-width: min(62ch, 68%);
|
||||||
|
background: rgba(7, 10, 24, 0.48);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-line i {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-caption {
|
||||||
|
display: block;
|
||||||
|
margin-top: 4px;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-size: var(--font-size-xs);
|
||||||
|
font-style: italic;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-stats {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 12px;
|
||||||
|
align-self: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-stats {
|
||||||
|
align-self: center;
|
||||||
|
justify-self: end;
|
||||||
|
width: min(420px, 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-stats article {
|
||||||
|
min-height: 118px;
|
||||||
|
padding: var(--space-4);
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.14);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background:
|
||||||
|
linear-gradient(145deg, rgba(34, 211, 238, 0.08), transparent 52%),
|
||||||
|
rgba(7, 10, 24, 0.52);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-stats strong {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
font-size: 44px;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 0.95;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-stats span {
|
||||||
|
display: block;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.35;
|
||||||
|
}
|
||||||
99
website/src/styles/_icons.scss
Normal file
99
website/src/styles/_icons.scss
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
.ui-icon {
|
||||||
|
display: block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background: currentColor;
|
||||||
|
mask-position: center;
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: contain;
|
||||||
|
-webkit-mask-position: center;
|
||||||
|
-webkit-mask-repeat: no-repeat;
|
||||||
|
-webkit-mask-size: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-open {
|
||||||
|
mask-image: url("/static/icons/open.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/open.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-zoom {
|
||||||
|
mask-image: url("/static/icons/zoom.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/zoom.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-save {
|
||||||
|
mask-image: url("/static/icons/save.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/save.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-export {
|
||||||
|
mask-image: url("/static/icons/export.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/export.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-import {
|
||||||
|
mask-image: url("/static/icons/import.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/import.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-link {
|
||||||
|
mask-image: url("/static/icons/link.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/link.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-edit {
|
||||||
|
mask-image: url("/static/icons/edit.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/edit.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-copy {
|
||||||
|
mask-image: url("/static/icons/copy.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/copy.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-drag {
|
||||||
|
mask-image: url("/static/icons/drag.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/drag.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-dropdown {
|
||||||
|
mask-image: url("/static/icons/dropdown.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/dropdown.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-flip {
|
||||||
|
mask-image: url("/static/icons/flip.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/flip.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-rows {
|
||||||
|
mask-image: url("/static/icons/rows.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/rows.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-columns {
|
||||||
|
mask-image: url("/static/icons/columns.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/columns.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-close {
|
||||||
|
mask-image: url("/static/icons/close.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/close.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-rubber {
|
||||||
|
mask-image: url("/static/icons/rubber.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/rubber.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon-trash {
|
||||||
|
mask-image: url("/static/icons/trashcan.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/trashcan.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||||
|
gap: var(--space-4);
|
||||||
|
margin-top: var(--space-6);
|
||||||
|
}
|
||||||
444
website/src/styles/_mhwilds.scss
Normal file
444
website/src/styles/_mhwilds.scss
Normal file
|
|
@ -0,0 +1,444 @@
|
||||||
|
.mhwilds-hero {
|
||||||
|
background:
|
||||||
|
linear-gradient(135deg, rgba(139, 92, 246, 0.86), rgba(99, 102, 241, 0.76), rgba(34, 211, 238, 0.58)),
|
||||||
|
var(--color-bg-surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-home-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(240px, 380px));
|
||||||
|
justify-content: center;
|
||||||
|
gap: var(--space-4);
|
||||||
|
margin-top: var(--space-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-home-card {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
min-height: 230px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-home-card img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 120px;
|
||||||
|
object-fit: contain;
|
||||||
|
padding: var(--space-4);
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
background: rgba(5, 7, 17, 0.28);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-home-card strong,
|
||||||
|
.mhwilds-home-card span {
|
||||||
|
margin-inline: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-home-card strong {
|
||||||
|
margin-top: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-home-card span {
|
||||||
|
margin-bottom: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-heading p {
|
||||||
|
max-width: 70ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-title-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-title-row h1 {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.results-count {
|
||||||
|
display: inline-flex;
|
||||||
|
min-height: 28px;
|
||||||
|
align-items: center;
|
||||||
|
padding: 4px 10px;
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.16);
|
||||||
|
border-radius: var(--radius-pill);
|
||||||
|
background: rgba(5, 7, 17, 0.34);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-layout {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
|
||||||
|
gap: var(--space-5);
|
||||||
|
margin-top: var(--space-6);
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-filters {
|
||||||
|
position: sticky;
|
||||||
|
top: 92px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-panel {
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-xl);
|
||||||
|
background: rgba(16, 20, 38, 0.72);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
padding: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-panel-head,
|
||||||
|
.filter-logic {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-panel-head {
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-logic {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-panel-head h2 {
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-reset-button {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-reset-button:hover {
|
||||||
|
background: rgba(21, 26, 48, 0.96);
|
||||||
|
}
|
||||||
|
|
||||||
|
.field.compact {
|
||||||
|
padding: var(--space-4) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-logic {
|
||||||
|
min-height: 42px;
|
||||||
|
margin-bottom: var(--space-4);
|
||||||
|
padding: 8px 10px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(5, 7, 17, 0.36);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-logic button {
|
||||||
|
min-height: 30px;
|
||||||
|
padding: 0 12px;
|
||||||
|
background: var(--color-primary-soft);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
font-weight: 800;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-options {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
max-height: calc(100vh - 360px);
|
||||||
|
overflow: auto;
|
||||||
|
margin-right: -6px;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 22px 24px 1fr;
|
||||||
|
min-height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 7px 9px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-pill);
|
||||||
|
background: rgba(5, 7, 17, 0.32);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip:hover,
|
||||||
|
.filter-chip.active {
|
||||||
|
border-color: var(--color-primary-border);
|
||||||
|
background: var(--color-primary-soft);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip input {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
min-height: 18px;
|
||||||
|
accent-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip img {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip span {
|
||||||
|
overflow: hidden;
|
||||||
|
color: inherit;
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-grid {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.monster-grid {
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.endemic-grid {
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card {
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(16, 20, 38, 0.88);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
transition:
|
||||||
|
transform var(--duration-fast) var(--ease-standard),
|
||||||
|
border-color var(--duration-fast) var(--ease-standard),
|
||||||
|
background-color var(--duration-fast) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
border-color: var(--color-border-hover);
|
||||||
|
background: rgba(21, 26, 48, 0.96);
|
||||||
|
}
|
||||||
|
|
||||||
|
.monster-card {
|
||||||
|
height: 285px;
|
||||||
|
overflow: visible;
|
||||||
|
cursor: pointer;
|
||||||
|
perspective: 1200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monster-card:hover,
|
||||||
|
.monster-card:focus-visible {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-inner {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
transform-style: preserve-3d;
|
||||||
|
transition: transform 420ms var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.monster-card.is-flipped .mhwilds-card-inner {
|
||||||
|
transform: rotateY(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-face {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
display: flex;
|
||||||
|
overflow: hidden;
|
||||||
|
flex-direction: column;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(16, 20, 38, 0.92);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
backface-visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-flip-indicator {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
z-index: 2;
|
||||||
|
display: grid;
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
place-items: center;
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.2);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(7, 10, 24, 0.62);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
pointer-events: none;
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-flip-indicator .ui-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-front {
|
||||||
|
transform: rotateY(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-back {
|
||||||
|
transform: rotateY(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.monster-card:hover .mhwilds-card-face {
|
||||||
|
border-color: var(--color-border-hover);
|
||||||
|
background: rgba(21, 26, 48, 0.98);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-art {
|
||||||
|
display: grid;
|
||||||
|
min-height: 112px;
|
||||||
|
place-items: center;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.16), transparent 46%),
|
||||||
|
rgba(5, 7, 17, 0.36);
|
||||||
|
}
|
||||||
|
|
||||||
|
.endemic-card .mhwilds-card-art {
|
||||||
|
min-height: 104px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-art img {
|
||||||
|
max-width: min(78%, 230px);
|
||||||
|
max-height: 92px;
|
||||||
|
object-fit: contain;
|
||||||
|
filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.44));
|
||||||
|
}
|
||||||
|
|
||||||
|
.endemic-card .mhwilds-card-art img {
|
||||||
|
max-height: 78px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-body {
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-body h2 {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monster-card .eyebrow {
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-back .mhwilds-card-body {
|
||||||
|
padding: 10px 12px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-card-back .eyebrow {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-icon-row {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 92px 1fr;
|
||||||
|
gap: var(--space-2);
|
||||||
|
align-items: start;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-icon-row > span {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-size: 0.82rem;
|
||||||
|
line-height: 1.25;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-icon-row > div {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-icon-row img {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-icon-row em {
|
||||||
|
display: inline-grid;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
place-items: center;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.damage-table-wrap {
|
||||||
|
min-height: 0;
|
||||||
|
max-height: 218px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
margin: 0 10px 10px;
|
||||||
|
padding: 0;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.damage-table {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-spacing: 0;
|
||||||
|
table-layout: fixed;
|
||||||
|
font-size: 0.62rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.damage-table th,
|
||||||
|
.damage-table td {
|
||||||
|
width: 9%;
|
||||||
|
padding: 2px 1px;
|
||||||
|
border-right: 1px solid var(--color-border);
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.damage-table th:first-child,
|
||||||
|
.damage-table td:first-child {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
width: 26%;
|
||||||
|
max-width: 26%;
|
||||||
|
overflow: hidden;
|
||||||
|
border-left: 1px solid var(--color-border);
|
||||||
|
background: var(--color-bg-surface-alt);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
text-align: left;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.damage-table th {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background: rgba(21, 26, 48, 0.96);
|
||||||
|
}
|
||||||
|
|
||||||
|
.damage-table th:first-child {
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.damage-table img {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-nav {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
267
website/src/styles/_overlays.scss
Normal file
267
website/src/styles/_overlays.scss
Normal file
|
|
@ -0,0 +1,267 @@
|
||||||
|
.screenshot-viewer-root {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 110;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.screenshot-viewer-backdrop {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: rgba(2, 3, 9, 0.64);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.screenshot-viewer {
|
||||||
|
position: relative;
|
||||||
|
display: grid;
|
||||||
|
width: min(1120px, calc(100vw - 32px));
|
||||||
|
max-height: calc(100vh - 48px);
|
||||||
|
gap: var(--space-4);
|
||||||
|
padding: var(--space-4);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-xl);
|
||||||
|
background: rgba(16, 20, 38, 0.96);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.screenshot-viewer header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: var(--space-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.screenshot-viewer-button {
|
||||||
|
flex: 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screenshot-viewer img {
|
||||||
|
display: block;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: calc(100vh - 170px);
|
||||||
|
justify-self: center;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer[aria-hidden="true"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-backdrop {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 40;
|
||||||
|
background: rgba(2, 3, 9, 0.42);
|
||||||
|
backdrop-filter: blur(2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-panel {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0 0 0 auto;
|
||||||
|
z-index: 50;
|
||||||
|
width: min(720px, 94vw);
|
||||||
|
min-width: 360px;
|
||||||
|
max-width: 94vw;
|
||||||
|
overflow: auto;
|
||||||
|
border-left: 1px solid var(--color-border);
|
||||||
|
background: rgba(7, 9, 19, 0.96);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-content {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
min-height: 100%;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-resize-handle {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: -18px;
|
||||||
|
width: 14px;
|
||||||
|
height: 72px;
|
||||||
|
border-radius: var(--radius-pill);
|
||||||
|
cursor: ew-resize;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-resize-handle::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 5px;
|
||||||
|
width: 4px;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: inherit;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
opacity: 0.72;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.is-resizing-drawer,
|
||||||
|
body.is-resizing-drawer * {
|
||||||
|
cursor: ew-resize !important;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-panel > .drawer-content > header {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-4);
|
||||||
|
margin-bottom: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-toolbox-actions {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: var(--space-2);
|
||||||
|
margin-top: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-action-button {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-action-button:disabled {
|
||||||
|
color: var(--color-text-disabled);
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.56;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-close-button {
|
||||||
|
flex: 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-panel .modules {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-modal-root {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 100;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-modal-root {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 130;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-backdrop {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: rgba(2, 3, 9, 0.62);
|
||||||
|
backdrop-filter: blur(6px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-modal {
|
||||||
|
position: relative;
|
||||||
|
width: min(520px, calc(100vw - 32px));
|
||||||
|
max-height: calc(100vh - 48px);
|
||||||
|
overflow: auto;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-xl);
|
||||||
|
background: rgba(16, 20, 38, 0.96);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-modal h2 {
|
||||||
|
margin-bottom: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-modal p {
|
||||||
|
margin-bottom: var(--space-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-modal footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-modal {
|
||||||
|
width: min(560px, calc(100vw - 32px));
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-modal header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-4);
|
||||||
|
margin-bottom: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-modal h2 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
gap: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-card {
|
||||||
|
display: grid;
|
||||||
|
height: 98px;
|
||||||
|
min-width: 0;
|
||||||
|
align-content: center;
|
||||||
|
justify-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: var(--space-3);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(21, 26, 48, 0.72);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-card span:last-child {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-card .module-icon {
|
||||||
|
flex: 0 0 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-card:hover {
|
||||||
|
border-color: var(--color-border-hover);
|
||||||
|
background: var(--color-bg-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-create-modal form,
|
||||||
|
.toolbox-link-modal form {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-create-modal .field,
|
||||||
|
.toolbox-link-modal .field {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-danger {
|
||||||
|
border-color: rgba(251, 113, 133, 0.34);
|
||||||
|
background: var(--color-danger);
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
208
website/src/styles/_responsive.scss
Normal file
208
website/src/styles/_responsive.scss
Normal file
|
|
@ -0,0 +1,208 @@
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
animation-duration: 0.01ms !important;
|
||||||
|
animation-iteration-count: 1 !important;
|
||||||
|
transition-duration: 0.01ms !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.app-shell {
|
||||||
|
grid-template-columns: 72px minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
padding: var(--space-4) 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand span:last-child,
|
||||||
|
.nav-item strong,
|
||||||
|
.sidebar-note {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand,
|
||||||
|
.nav-item {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 760px) {
|
||||||
|
.app-shell {
|
||||||
|
display: block;
|
||||||
|
padding-bottom: 76px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar,
|
||||||
|
.page-heading,
|
||||||
|
.toolbox-head,
|
||||||
|
.module header {
|
||||||
|
align-items: stretch;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar {
|
||||||
|
padding: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar-actions {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar-actions > * {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero,
|
||||||
|
.game-hero,
|
||||||
|
.origin-section,
|
||||||
|
.section-grid,
|
||||||
|
.info-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero,
|
||||||
|
.game-hero {
|
||||||
|
min-height: auto;
|
||||||
|
padding: var(--space-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-visual {
|
||||||
|
justify-self: center;
|
||||||
|
width: min(320px, 100%);
|
||||||
|
min-height: 240px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-visual img {
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.origin-section {
|
||||||
|
padding: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-dialogue {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.origin-copy {
|
||||||
|
padding-right: 0;
|
||||||
|
padding-bottom: var(--space-5);
|
||||||
|
border-right: 0;
|
||||||
|
border-bottom: 2px solid rgba(34, 211, 238, 0.66);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-line {
|
||||||
|
max-width: 92%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-line-app {
|
||||||
|
max-width: 92%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-stats {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
width: min(100% - 24px, 1180px);
|
||||||
|
padding-top: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules,
|
||||||
|
.modules[data-layout-cols="1"],
|
||||||
|
.modules[data-layout-cols="2"] {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-column {
|
||||||
|
display: contents;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-home-grid,
|
||||||
|
.mhwilds-layout {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mhwilds-filters {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-options {
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-form {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-modal {
|
||||||
|
width: min(420px, calc(100vw - 32px));
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-nav {
|
||||||
|
position: fixed;
|
||||||
|
right: 12px;
|
||||||
|
bottom: 12px;
|
||||||
|
left: 12px;
|
||||||
|
z-index: 60;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 52px 1fr;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-xl);
|
||||||
|
background: rgba(11, 14, 27, 0.9);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-nav a,
|
||||||
|
.mobile-nav button {
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 0 8px;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-nav a {
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-nav a.active {
|
||||||
|
background: var(--color-primary-soft);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-panel {
|
||||||
|
min-width: 0;
|
||||||
|
width: min(720px, 94vw);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-resize-handle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.home-stats {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
185
website/src/styles/_shell.scss
Normal file
185
website/src/styles/_shell.scss
Normal file
|
|
@ -0,0 +1,185 @@
|
||||||
|
.app-shell {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 248px minmax(0, 1fr);
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-5);
|
||||||
|
padding: var(--space-5);
|
||||||
|
border-right: 1px solid var(--color-border);
|
||||||
|
background: rgba(11, 14, 27, 0.82);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-mark {
|
||||||
|
display: block;
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.28));
|
||||||
|
mask: url("/static/icons/controller.svg") center / contain no-repeat;
|
||||||
|
-webkit-mask: url("/static/icons/controller.svg") center / contain no-repeat;
|
||||||
|
transition: transform 0.8s var(--ease-standard), filter var(--duration-normal) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand:hover .brand-mark {
|
||||||
|
filter: drop-shadow(0 0 22px rgba(139, 92, 246, 0.42));
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item {
|
||||||
|
display: flex;
|
||||||
|
min-height: 42px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
transition: var(--duration-normal) var(--ease-standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-icon {
|
||||||
|
display: block;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
background: var(--color-accent-cyan);
|
||||||
|
mask-position: center;
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: 20px 20px;
|
||||||
|
-webkit-mask-position: center;
|
||||||
|
-webkit-mask-repeat: no-repeat;
|
||||||
|
-webkit-mask-size: 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-icon-home {
|
||||||
|
mask-image: url("/static/icons/home.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/home.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-icon-toolbox {
|
||||||
|
mask-image: url("/static/icons/toolbox.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/toolbox.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-icon-controller {
|
||||||
|
mask-image: url("/static/icons/controller.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/controller.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item strong {
|
||||||
|
color: inherit;
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item:hover {
|
||||||
|
background: var(--color-bg-hover);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item.active {
|
||||||
|
border-color: var(--color-primary-border);
|
||||||
|
background: var(--color-primary-soft);
|
||||||
|
box-shadow: inset 3px 0 0 var(--color-primary);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-note {
|
||||||
|
margin-top: auto;
|
||||||
|
padding: var(--space-4);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(16, 20, 38, 0.62);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-note p {
|
||||||
|
margin: 10px 0 0;
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-storage-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--space-2);
|
||||||
|
margin-top: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-action-button {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-shell {
|
||||||
|
display: flex;
|
||||||
|
min-height: 100vh;
|
||||||
|
min-width: 0;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
display: flex;
|
||||||
|
min-height: 68px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-4);
|
||||||
|
padding: 0 var(--space-8);
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
background: rgba(7, 9, 19, 0.78);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar strong {
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar .eyebrow {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-icon-button {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-icon-button img {
|
||||||
|
width: 21px;
|
||||||
|
height: 21px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
width: min(1600px, calc(100% - 64px));
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: var(--space-8) 0 var(--space-12);
|
||||||
|
}
|
||||||
640
website/src/styles/_toolboxes.scss
Normal file
640
website/src/styles/_toolboxes.scss
Normal file
|
|
@ -0,0 +1,640 @@
|
||||||
|
.toolbox-head {
|
||||||
|
position: relative;
|
||||||
|
z-index: 30;
|
||||||
|
overflow: visible;
|
||||||
|
padding: var(--space-6);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-xl);
|
||||||
|
background: rgba(16, 20, 38, 0.76);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-title {
|
||||||
|
width: fit-content;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 3px 6px;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbox-title:focus {
|
||||||
|
background: rgba(7, 10, 24, 0.72);
|
||||||
|
outline: 1px solid rgba(34, 211, 238, 0.72);
|
||||||
|
outline-offset: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-controls {
|
||||||
|
position: relative;
|
||||||
|
z-index: 80;
|
||||||
|
display: inline-flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-modal-button {
|
||||||
|
min-height: 40px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-quick-toggle {
|
||||||
|
width: 42px;
|
||||||
|
min-width: 42px;
|
||||||
|
min-height: 40px;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0;
|
||||||
|
border-left: 1px solid rgba(255, 255, 255, 0.18);
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-quick-toggle .ui-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
transition: transform 140ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-add-quick-toggle.active .ui-icon {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-quick-add {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 8px);
|
||||||
|
right: 0;
|
||||||
|
z-index: 120;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-end;
|
||||||
|
width: max-content;
|
||||||
|
max-width: min(280px, calc(100vw - 48px));
|
||||||
|
gap: 6px;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(12, 15, 32, 0.96);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transform: translateY(-4px);
|
||||||
|
transition:
|
||||||
|
opacity 140ms ease,
|
||||||
|
transform 140ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-quick-add.is-open {
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: auto;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-quick-add::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
right: 18px;
|
||||||
|
bottom: 100%;
|
||||||
|
border-right: 7px solid transparent;
|
||||||
|
border-bottom: 7px solid rgba(12, 15, 32, 0.96);
|
||||||
|
border-left: 7px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-quick-add::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-quick-add-button,
|
||||||
|
.tool-add-card {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-quick-add-button {
|
||||||
|
background: rgba(21, 26, 48, 0.72);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-toolbar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules {
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules[data-layout-cols="1"] {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules[data-layout-cols="2"] {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-column {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--space-4);
|
||||||
|
align-content: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module.is-dragging {
|
||||||
|
cursor: grabbing;
|
||||||
|
opacity: 0.58;
|
||||||
|
transform: scale(0.99);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module.is-drop-target {
|
||||||
|
border-color: rgba(34, 211, 238, 0.72);
|
||||||
|
box-shadow:
|
||||||
|
var(--shadow-sm),
|
||||||
|
inset 0 3px 0 rgba(34, 211, 238, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module.is-drop-target.drop-after {
|
||||||
|
box-shadow:
|
||||||
|
var(--shadow-sm),
|
||||||
|
inset 0 -3px 0 rgba(34, 211, 238, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-3);
|
||||||
|
padding: var(--space-4);
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module header > div {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module header h2 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-switch {
|
||||||
|
display: inline-grid;
|
||||||
|
grid-template-columns: repeat(2, 38px);
|
||||||
|
gap: 4px;
|
||||||
|
padding: 4px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(5, 7, 17, 0.48);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-switch button {
|
||||||
|
min-height: 34px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-switch button.active {
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
color: white;
|
||||||
|
box-shadow: var(--shadow-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-drag-handle {
|
||||||
|
display: inline-grid;
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
flex: 0 0 34px;
|
||||||
|
place-items: center;
|
||||||
|
padding: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
cursor: grab;
|
||||||
|
opacity: 0.62;
|
||||||
|
touch-action: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-drag-handle .ui-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module:hover .module-drag-handle,
|
||||||
|
.module:focus-within .module-drag-handle {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-drag-handle:active {
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-title {
|
||||||
|
min-width: 80px;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 4px 6px;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-title:focus {
|
||||||
|
background: rgba(7, 10, 24, 0.72);
|
||||||
|
outline: 1px solid rgba(34, 211, 238, 0.72);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-edit-button,
|
||||||
|
.module-delete-button {
|
||||||
|
flex: 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-edit-button {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-edit-button.active {
|
||||||
|
border-color: var(--color-primary-border);
|
||||||
|
background: var(--color-primary-soft);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-icon {
|
||||||
|
display: grid;
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
box-shadow: var(--shadow-primary);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-icon-svg {
|
||||||
|
display: block;
|
||||||
|
width: 19px;
|
||||||
|
height: 19px;
|
||||||
|
background: white;
|
||||||
|
mask-position: center;
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: contain;
|
||||||
|
-webkit-mask-position: center;
|
||||||
|
-webkit-mask-repeat: no-repeat;
|
||||||
|
-webkit-mask-size: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-icon-notepad {
|
||||||
|
mask-image: url("/static/icons/notepad.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/notepad.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-icon-checklist {
|
||||||
|
mask-image: url("/static/icons/checklist.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/checklist.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-icon-picture {
|
||||||
|
mask-image: url("/static/icons/picture.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/picture.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-icon-link {
|
||||||
|
mask-image: url("/static/icons/link.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/link.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-icon-abacus {
|
||||||
|
mask-image: url("/static/icons/abacus.svg");
|
||||||
|
-webkit-mask-image: url("/static/icons/abacus.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.notepad {
|
||||||
|
display: block;
|
||||||
|
width: calc(100% - 32px);
|
||||||
|
min-height: 240px;
|
||||||
|
margin: var(--space-4);
|
||||||
|
padding: var(--space-4);
|
||||||
|
resize: vertical;
|
||||||
|
line-height: 1.6;
|
||||||
|
background: rgba(5, 7, 17, 0.56);
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-form,
|
||||||
|
.field {
|
||||||
|
display: grid;
|
||||||
|
gap: 10px;
|
||||||
|
padding: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-form {
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-add-form {
|
||||||
|
grid-template-columns: minmax(0, 1fr) 76px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-qty-input {
|
||||||
|
padding-inline: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 0 14px;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
padding-block: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input::placeholder,
|
||||||
|
textarea::placeholder {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus,
|
||||||
|
select:focus,
|
||||||
|
textarea:focus {
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
margin: var(--space-4) 0 0;
|
||||||
|
padding: 0 var(--space-4) var(--space-4);
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 42px;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-item-main {
|
||||||
|
display: flex;
|
||||||
|
min-height: 42px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 0 12px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(5, 7, 17, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist input[type="checkbox"] {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
width: 20px;
|
||||||
|
min-height: 20px;
|
||||||
|
height: 20px;
|
||||||
|
accent-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-item.is-complete .checklist-item-main > span {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-qty-controls {
|
||||||
|
display: inline-flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-qty-controls button {
|
||||||
|
width: 28px;
|
||||||
|
min-width: 28px;
|
||||||
|
min-height: 28px;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checklist-qty-controls small {
|
||||||
|
min-width: 42px;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links-add-form {
|
||||||
|
grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links-list {
|
||||||
|
display: grid;
|
||||||
|
gap: 10px;
|
||||||
|
margin: var(--space-4);
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-add-panel + .links-list,
|
||||||
|
.module-add-panel + .checklist,
|
||||||
|
.module-add-panel + .counters-grid {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counters-add-form {
|
||||||
|
grid-template-columns: minmax(0, 1fr) auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counters-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
margin: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-item {
|
||||||
|
display: grid;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.12);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background:
|
||||||
|
linear-gradient(135deg, rgba(139, 92, 246, 0.08), transparent 58%),
|
||||||
|
rgba(7, 10, 24, 0.42);
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-item > div:first-child {
|
||||||
|
display: grid;
|
||||||
|
gap: 3px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-item strong {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: 34px;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 0.95;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-item span {
|
||||||
|
overflow: hidden;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
font-weight: 800;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-actions {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-actions button {
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 34px;
|
||||||
|
padding: 0;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) auto;
|
||||||
|
gap: 10px;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid rgba(165, 180, 252, 0.12);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(7, 10, 24, 0.42);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-item a {
|
||||||
|
display: grid;
|
||||||
|
min-width: 0;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-item strong,
|
||||||
|
.link-item span {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-item strong {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-item span {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-size: var(--font-size-xs);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-item > div {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-item button {
|
||||||
|
width: 40px;
|
||||||
|
min-width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
min-height: 40px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropzone {
|
||||||
|
display: grid;
|
||||||
|
min-height: 74px;
|
||||||
|
margin: var(--space-4);
|
||||||
|
place-items: center;
|
||||||
|
border: 1px dashed rgba(139, 92, 246, 0.52);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: var(--color-primary-soft);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropzone:hover {
|
||||||
|
border-color: var(--color-accent-cyan);
|
||||||
|
background: rgba(34, 211, 238, 0.1);
|
||||||
|
box-shadow: 0 0 30px rgba(34, 211, 238, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropzone.is-drag-over {
|
||||||
|
border-color: var(--color-accent-cyan);
|
||||||
|
background: rgba(34, 211, 238, 0.14);
|
||||||
|
box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.paste-target {
|
||||||
|
min-height: 46px;
|
||||||
|
margin: 0 var(--space-4) var(--space-4);
|
||||||
|
padding: 12px 14px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: rgba(5, 7, 17, 0.44);
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.paste-target:focus {
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
outline: none;
|
||||||
|
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shots {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||||
|
gap: var(--space-3);
|
||||||
|
padding: 0 var(--space-4) var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shots figure {
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: rgba(5, 7, 17, 0.38);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shot-preview {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shot-preview:hover {
|
||||||
|
transform: none;
|
||||||
|
box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.28);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shots img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
aspect-ratio: 16 / 9;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: var(--color-bg-deep);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shot-delete-button {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue