fix: update style, resolve old css leaks issue
This commit is contained in:
+245
-243
@@ -1,281 +1,283 @@
|
|||||||
:root {
|
@layer app {
|
||||||
color-scheme: light;
|
:root {
|
||||||
|
color-scheme: light;
|
||||||
|
|
||||||
--bg: #f6f7f9;
|
--bg: #f6f7f9;
|
||||||
--surface: #ffffff;
|
--surface: #ffffff;
|
||||||
--text: #1b1e24;
|
--text: #1b1e24;
|
||||||
--text-muted: #5c6470;
|
--text-muted: #5c6470;
|
||||||
--accent: #2563eb;
|
--accent: #2563eb;
|
||||||
--accent-hover: #1d4ed8;
|
--accent-hover: #1d4ed8;
|
||||||
--accent-contrast: #ffffff;
|
--accent-contrast: #ffffff;
|
||||||
--link: var(--accent);
|
--link: var(--accent);
|
||||||
--border: #dfe2e8;
|
--border: #dfe2e8;
|
||||||
--danger: #e5484d;
|
--danger: #e5484d;
|
||||||
--danger-strong: #b3261e;
|
--danger-strong: #b3261e;
|
||||||
--check-a: #eceff3;
|
--check-a: #eceff3;
|
||||||
--check-b: #ffffff;
|
--check-b: #ffffff;
|
||||||
|
|
||||||
--space-1: 0.25rem;
|
--space-1: 0.25rem;
|
||||||
--space-2: 0.5rem;
|
--space-2: 0.5rem;
|
||||||
--space-3: 1rem;
|
--space-3: 1rem;
|
||||||
--space-4: 1.5rem;
|
--space-4: 1.5rem;
|
||||||
--space-5: 2.5rem;
|
--space-5: 2.5rem;
|
||||||
|
|
||||||
--radius-s: 6px;
|
--radius-s: 6px;
|
||||||
--radius-m: 10px;
|
--radius-m: 10px;
|
||||||
|
|
||||||
--text-xs: 0.8rem;
|
--text-xs: 0.8rem;
|
||||||
--text-s: 0.85rem;
|
--text-s: 0.85rem;
|
||||||
--text-m: 0.95rem;
|
--text-m: 0.95rem;
|
||||||
--text-l: 1.1rem;
|
--text-l: 1.1rem;
|
||||||
--text-xl: 1.25rem;
|
--text-xl: 1.25rem;
|
||||||
--text-xxl: 1.75rem;
|
--text-xxl: 1.75rem;
|
||||||
--leading-tight: 1.25;
|
--leading-tight: 1.25;
|
||||||
|
|
||||||
--shadow-card: 0 4px 14px rgb(37 99 235 / 12%);
|
--shadow-card: 0 4px 14px rgb(37 99 235 / 12%);
|
||||||
--transition-fast: 120ms ease;
|
--transition-fast: 120ms ease;
|
||||||
|
|
||||||
--control-height: 2.4rem;
|
--control-height: 2.4rem;
|
||||||
--control-max-width: 16rem;
|
--control-max-width: 16rem;
|
||||||
|
|
||||||
--font-sans:
|
--font-sans:
|
||||||
system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
|
system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
|
||||||
sans-serif;
|
sans-serif;
|
||||||
--font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
|
--font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] {
|
[data-theme="dark"] {
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
|
|
||||||
--bg: #12151a;
|
--bg: #12151a;
|
||||||
--surface: #1b2027;
|
--surface: #1b2027;
|
||||||
--text: #e6e9ee;
|
--text: #e6e9ee;
|
||||||
--text-muted: #98a1ad;
|
--text-muted: #98a1ad;
|
||||||
--accent-hover: #4c85f0;
|
--accent-hover: #4c85f0;
|
||||||
--link: #6ea0ff;
|
--link: #6ea0ff;
|
||||||
--border: #303842;
|
--border: #303842;
|
||||||
--danger: #ff7479;
|
--danger: #ff7479;
|
||||||
--danger-strong: #ff8589;
|
--danger-strong: #ff8589;
|
||||||
--check-a: #232830;
|
--check-a: #232830;
|
||||||
--check-b: #171b21;
|
--check-b: #171b21;
|
||||||
|
|
||||||
--shadow-card: 0 4px 14px rgb(0 0 0 / 45%);
|
--shadow-card: 0 4px 14px rgb(0 0 0 / 45%);
|
||||||
}
|
}
|
||||||
|
|
||||||
*,
|
*,
|
||||||
*::before,
|
*::before,
|
||||||
*::after {
|
*::after {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-sans);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
min-height: 100dvh;
|
min-height: 100dvh;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: var(--text-xxl);
|
font-size: var(--text-xxl);
|
||||||
line-height: var(--leading-tight);
|
line-height: var(--leading-tight);
|
||||||
letter-spacing: -0.01em;
|
letter-spacing: -0.01em;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: var(--text-xl);
|
font-size: var(--text-xl);
|
||||||
line-height: var(--leading-tight);
|
line-height: var(--leading-tight);
|
||||||
}
|
}
|
||||||
|
|
||||||
p,
|
p,
|
||||||
label {
|
label {
|
||||||
font-size: var(--text-m);
|
font-size: var(--text-m);
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--link);
|
color: var(--link);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
button,
|
button,
|
||||||
input,
|
input,
|
||||||
select {
|
select {
|
||||||
font: inherit;
|
font: inherit;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
:focus-visible {
|
:focus-visible {
|
||||||
outline: 2px solid var(--accent);
|
outline: 2px solid var(--accent);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
border-radius: var(--radius-s);
|
border-radius: var(--radius-s);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-muted {
|
.text-muted {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-caption {
|
.text-caption {
|
||||||
font-size: var(--text-s);
|
font-size: var(--text-s);
|
||||||
}
|
}
|
||||||
|
|
||||||
.heading-section {
|
.heading-section {
|
||||||
font-size: var(--text-l);
|
font-size: var(--text-l);
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
background: var(--surface);
|
background: var(--surface);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: var(--radius-m);
|
border-radius: var(--radius-m);
|
||||||
}
|
}
|
||||||
|
|
||||||
.control {
|
.control {
|
||||||
padding: var(--space-1) var(--space-2);
|
padding: var(--space-1) var(--space-2);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: var(--radius-s);
|
border-radius: var(--radius-s);
|
||||||
background: var(--surface);
|
background: var(--surface);
|
||||||
max-width: var(--control-max-width);
|
max-width: var(--control-max-width);
|
||||||
}
|
}
|
||||||
|
|
||||||
input.control[type="number"] {
|
input.control[type="number"] {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-banner {
|
.error-banner {
|
||||||
padding: var(--space-2) var(--space-3);
|
padding: var(--space-2) var(--space-3);
|
||||||
border: 1px solid var(--danger);
|
border: 1px solid var(--danger);
|
||||||
border-radius: var(--radius-s);
|
border-radius: var(--radius-s);
|
||||||
background: color-mix(in srgb, var(--danger) 8%, var(--surface));
|
background: color-mix(in srgb, var(--danger) 8%, var(--surface));
|
||||||
color: var(--danger-strong);
|
color: var(--danger-strong);
|
||||||
font-size: var(--text-s);
|
font-size: var(--text-s);
|
||||||
}
|
}
|
||||||
|
|
||||||
.visually-hidden {
|
.visually-hidden {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin: -1px;
|
margin: -1px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
clip: rect(0 0 0 0);
|
clip: rect(0 0 0 0);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-stage {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
||||||
gap: var(--space-4);
|
|
||||||
padding: var(--space-4);
|
|
||||||
align-items: start;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tool-stage.single {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tool-stage .cell {
|
|
||||||
min-width: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--space-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tool-stage .cell + .cell {
|
|
||||||
border-left: 1px solid var(--border);
|
|
||||||
padding-left: var(--space-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-media {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
min-height: 14rem;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chain-stack {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--space-3);
|
|
||||||
margin-top: var(--space-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.edge-legend {
|
|
||||||
position: absolute;
|
|
||||||
top: -0.65em;
|
|
||||||
padding: 0 var(--space-2);
|
|
||||||
background: var(--surface);
|
|
||||||
color: var(--text-muted);
|
|
||||||
font-size: var(--text-xs);
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.04em;
|
|
||||||
line-height: 1.3;
|
|
||||||
white-space: nowrap;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.params-sep {
|
|
||||||
position: relative;
|
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
margin: 0 var(--space-4);
|
|
||||||
padding-bottom: var(--space-3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Панель этапа для инлайн-раскладки: исходник | параметры | результат */
|
|
||||||
.pane {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pane-legend {
|
|
||||||
top: -0.65em;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.actions-row {
|
|
||||||
display: flex;
|
|
||||||
gap: var(--space-1);
|
|
||||||
align-items: stretch;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.actions-row > button {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 48rem) {
|
|
||||||
.tool-stage {
|
.tool-stage {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: var(--space-4);
|
||||||
|
padding: var(--space-4);
|
||||||
|
align-items: start;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-stage.single {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tool-stage .cell {
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-2);
|
||||||
|
}
|
||||||
|
|
||||||
.tool-stage .cell + .cell {
|
.tool-stage .cell + .cell {
|
||||||
border-left: none;
|
border-left: 1px solid var(--border);
|
||||||
padding-left: 0;
|
padding-left: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-media {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 14rem;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chain-stack {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-3);
|
||||||
|
margin-top: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.edge-legend {
|
||||||
|
position: absolute;
|
||||||
|
top: -0.65em;
|
||||||
|
padding: 0 var(--space-2);
|
||||||
|
background: var(--surface);
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
line-height: 1.3;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.params-sep {
|
||||||
|
position: relative;
|
||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid var(--border);
|
||||||
padding-top: var(--space-4);
|
margin: 0 var(--space-4);
|
||||||
|
padding-bottom: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Панель этапа для инлайн-раскладки: исходник | параметры | результат */
|
||||||
|
.pane {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pane-legend {
|
||||||
|
top: -0.65em;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-row {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--space-1);
|
||||||
|
align-items: stretch;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-row > button {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 48rem) {
|
||||||
|
.tool-stage {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-stage .cell + .cell {
|
||||||
|
border-left: none;
|
||||||
|
padding-left: 0;
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
padding-top: var(--space-4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { resolve } from "$app/paths";
|
||||||
import { ArrowUpRight } from "@lucide/svelte";
|
import { ArrowUpRight } from "@lucide/svelte";
|
||||||
import type { Component } from "svelte";
|
import type { Component } from "svelte";
|
||||||
import Icon from "./Icon.svelte";
|
import Icon from "./Icon.svelte";
|
||||||
import { resolve } from "$app/paths";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
@@ -12,9 +12,11 @@
|
|||||||
icon?: Component<{ size?: number; class?: string }>;
|
icon?: Component<{ size?: number; class?: string }>;
|
||||||
}
|
}
|
||||||
let { title, href, description, index, icon }: Props = $props();
|
let { title, href, description, index, icon }: Props = $props();
|
||||||
|
|
||||||
|
let normalizedHref = $derived(href === "#" ? "/" : href);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a class="tool-card" href={resolve(href)}>
|
<a class="tool-card" href={resolve(normalizedHref)}>
|
||||||
{#if icon}<span class="tool-icon"><Icon {icon} size={19} /></span>{/if}
|
{#if icon}<span class="tool-icon"><Icon {icon} size={19} /></span>{/if}
|
||||||
<span class="tool-copy">
|
<span class="tool-copy">
|
||||||
<strong>{title}</strong>
|
<strong>{title}</strong>
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
font: 600 14px var(--font-mono);
|
font: 600 14px var(--font-mono);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.brand-mark {
|
.brand-mark {
|
||||||
background: var(--blue);
|
background: var(--blue);
|
||||||
@@ -101,7 +102,7 @@
|
|||||||
}
|
}
|
||||||
.nav a {
|
.nav a {
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
font: 12px var(--font-mono);
|
font: 10px var(--font-mono);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.nav a:hover {
|
.nav a:hover {
|
||||||
|
|||||||
+100
-72
@@ -5,76 +5,104 @@
|
|||||||
@import "@fontsource/ibm-plex-mono/400.css";
|
@import "@fontsource/ibm-plex-mono/400.css";
|
||||||
@import "@fontsource/ibm-plex-mono/500.css";
|
@import "@fontsource/ibm-plex-mono/500.css";
|
||||||
|
|
||||||
/* Минимальный reset (новый дизайн грузится только на preview-маршрутах). */
|
/* Порядок cascade-слоёв (дубль из корневого +layout.svelte — идемпотентен и
|
||||||
*,
|
страхует случай, когда design2.css грузится раньше корневого layout): */
|
||||||
*::before,
|
@layer app, design;
|
||||||
*::after {
|
|
||||||
box-sizing: border-box;
|
/* Новый дизайн — слой design. В слое design правила выигрывают у того же
|
||||||
}
|
правила из слоя app (старый app.css) по слою, а не по порядку <link>,
|
||||||
html,
|
поэтому утечка app.css на /preview при SPA-переходе не перебивает design2. */
|
||||||
body {
|
@layer design {
|
||||||
margin: 0;
|
/* Минимальный reset (новый дизайн грузится только на preview-маршрутах). */
|
||||||
padding: 0;
|
*,
|
||||||
}
|
*::before,
|
||||||
|
*::after {
|
||||||
/* Базовая типографика и палитра: без этого весь текст наследует UA-дефолт
|
box-sizing: border-box;
|
||||||
(Times New Roman / чёрный), что даёт сотни расхождений с рефом. */
|
}
|
||||||
html {
|
html,
|
||||||
color-scheme: light dark;
|
body {
|
||||||
font-family: var(--font-sans);
|
margin: 0;
|
||||||
-webkit-text-size-adjust: 100%;
|
padding: 0;
|
||||||
}
|
}
|
||||||
body {
|
|
||||||
font-family: var(--font-sans);
|
/* Базовая типографика и палитра: без этого весь текст наследует UA-дефолт
|
||||||
color: var(--foreground);
|
(Times New Roman / чёрный), что даёт сотни расхождений с рефом. */
|
||||||
background: var(--background);
|
html {
|
||||||
-webkit-font-smoothing: antialiased;
|
color-scheme: light dark;
|
||||||
text-rendering: optimizeLegibility;
|
font-family: var(--font-sans);
|
||||||
}
|
-webkit-text-size-adjust: 100%;
|
||||||
|
}
|
||||||
/* Форм-контролы не наследуют шрифт семьи по умолчанию (браузер ставит Arial). */
|
body {
|
||||||
button,
|
font-family: var(--font-sans);
|
||||||
input,
|
color: var(--foreground);
|
||||||
select,
|
background: var(--background);
|
||||||
textarea,
|
-webkit-font-smoothing: antialiased;
|
||||||
optgroup {
|
text-rendering: optimizeLegibility;
|
||||||
font: inherit;
|
}
|
||||||
}
|
|
||||||
|
/* Форм-контролы не наследуют шрифт семьи по умолчанию (браузер ставит Arial). */
|
||||||
/* Новый дизайн: токены (§2 плана redesign).
|
button,
|
||||||
Файл грузится только layout'ом новой ветки (preview/+layout), поэтому
|
input,
|
||||||
глобально не конфликтует со старым app.css. */
|
select,
|
||||||
|
textarea,
|
||||||
:root {
|
optgroup {
|
||||||
--font-sans: "IBM Plex Sans", sans-serif;
|
font: inherit;
|
||||||
--font-mono: "IBM Plex Mono", monospace;
|
}
|
||||||
|
|
||||||
--background: #eef1f4;
|
/* Перебивки глобальных правил старого app.css (слой app ниже), чтобы при
|
||||||
--panel: #f8fafb;
|
утечке app.css на /preview новый дизайн не получал старую типографику.
|
||||||
--foreground: #17212b;
|
Пустые — заполни при необходимости. */
|
||||||
--muted: #6d7883;
|
a,
|
||||||
--line: #cbd3da;
|
a:hover {
|
||||||
|
/* color: inherit; text-decoration: none; */
|
||||||
--blue: #1769d2;
|
}
|
||||||
--cyan: #00a8c7;
|
h1,
|
||||||
--amber: #bd7411;
|
h2 {
|
||||||
--success: rgb(35, 131, 84);
|
/* font-size: revert; line-height: revert; letter-spacing: revert; */
|
||||||
--success2: rgb(37, 169, 106);
|
}
|
||||||
--danger: #e5484d;
|
p,
|
||||||
|
label {
|
||||||
--radius: 4px;
|
/* font-size: revert; */
|
||||||
}
|
}
|
||||||
|
:focus-visible {
|
||||||
[data-theme="dark"] {
|
/* outline: revert; */
|
||||||
--background: #11171d;
|
}
|
||||||
--panel: #182129;
|
|
||||||
--foreground: #e8eef2;
|
/* Новый дизайн: токены (§2 плана redesign).
|
||||||
--muted: #91a0ac;
|
Файл грузится только layout'ом новой ветки (preview/+layout), поэтому
|
||||||
--line: #33414c;
|
глобально не конфликтует со старым app.css. */
|
||||||
|
|
||||||
--blue: #54a2ff;
|
:root {
|
||||||
--cyan: #00a8c7;
|
--font-sans: "IBM Plex Sans", sans-serif;
|
||||||
--amber: #bd7411;
|
--font-mono: "IBM Plex Mono", monospace;
|
||||||
--success: #25a96a;
|
|
||||||
--danger: #ff7479;
|
--background: #eef1f4;
|
||||||
|
--panel: #f8fafb;
|
||||||
|
--foreground: #17212b;
|
||||||
|
--muted: #6d7883;
|
||||||
|
--line: #cbd3da;
|
||||||
|
|
||||||
|
--blue: #1769d2;
|
||||||
|
--cyan: #00a8c7;
|
||||||
|
--amber: #bd7411;
|
||||||
|
--success: rgb(35, 131, 84);
|
||||||
|
--success2: rgb(37, 169, 106);
|
||||||
|
--danger: #e5484d;
|
||||||
|
|
||||||
|
--radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] {
|
||||||
|
--background: #11171d;
|
||||||
|
--panel: #182129;
|
||||||
|
--foreground: #e8eef2;
|
||||||
|
--muted: #91a0ac;
|
||||||
|
--line: #33414c;
|
||||||
|
|
||||||
|
--blue: #54a2ff;
|
||||||
|
--cyan: #00a8c7;
|
||||||
|
--amber: #bd7411;
|
||||||
|
--success: #25a96a;
|
||||||
|
--danger: #ff7479;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,3 +17,12 @@
|
|||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{@render children()}
|
{@render children()}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Порядок cascade-слоёв для всего документа (грузится на всех маршрутах):
|
||||||
|
app = старый дизайн ((old)), design = новый (preview/*). design выигрывает
|
||||||
|
у app на совпадающих правилах независимо от порядка <link> / истории
|
||||||
|
SPA-навигации. Содержимое слоёв — в app.css (@layer app) и design2.css
|
||||||
|
(@layer design). */
|
||||||
|
@layer app, design;
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import Badge from "$lib/components/kit/Badge.svelte";
|
||||||
|
import Button from "$lib/components/kit/Button.svelte";
|
||||||
|
import CheckboxField from "$lib/components/kit/CheckboxField.svelte";
|
||||||
|
import CheckerCanvas from "$lib/components/kit/CheckerCanvas.svelte";
|
||||||
|
import CodeBlock from "$lib/components/kit/CodeBlock.svelte";
|
||||||
|
import ColorField from "$lib/components/kit/ColorField.svelte";
|
||||||
|
import DownloadButton from "$lib/components/kit/DownloadButton.svelte";
|
||||||
|
import EmptyState from "$lib/components/kit/EmptyState.svelte";
|
||||||
|
import IconButton from "$lib/components/kit/IconButton.svelte";
|
||||||
|
import ImageCard from "$lib/components/kit/ImageCard.svelte";
|
||||||
|
import MetaList from "$lib/components/kit/MetaList.svelte";
|
||||||
import Panel from "$lib/components/kit/Panel.svelte";
|
import Panel from "$lib/components/kit/Panel.svelte";
|
||||||
import PanelHeading from "$lib/components/kit/PanelHeading.svelte";
|
import PanelHeading from "$lib/components/kit/PanelHeading.svelte";
|
||||||
|
import PreviewTile from "$lib/components/kit/PreviewTile.svelte";
|
||||||
|
import Segmented from "$lib/components/kit/Segmented.svelte";
|
||||||
|
import SelectField from "$lib/components/kit/SelectField.svelte";
|
||||||
import SettingGroup from "$lib/components/kit/SettingGroup.svelte";
|
import SettingGroup from "$lib/components/kit/SettingGroup.svelte";
|
||||||
import SettingsFooter from "$lib/components/kit/SettingsFooter.svelte";
|
import SettingsFooter from "$lib/components/kit/SettingsFooter.svelte";
|
||||||
import MetaList from "$lib/components/kit/MetaList.svelte";
|
|
||||||
import Badge from "$lib/components/kit/Badge.svelte";
|
|
||||||
import Segmented from "$lib/components/kit/Segmented.svelte";
|
|
||||||
import StepCard from "$lib/components/kit/StepCard.svelte";
|
|
||||||
import ToolCard from "$lib/components/kit/ToolCard.svelte";
|
|
||||||
import ImageCard from "$lib/components/kit/ImageCard.svelte";
|
|
||||||
import PreviewTile from "$lib/components/kit/PreviewTile.svelte";
|
|
||||||
import CheckerCanvas from "$lib/components/kit/CheckerCanvas.svelte";
|
|
||||||
import StatusLine from "$lib/components/kit/StatusLine.svelte";
|
|
||||||
import Button from "$lib/components/kit/Button.svelte";
|
|
||||||
import IconButton from "$lib/components/kit/IconButton.svelte";
|
|
||||||
import SliderField from "$lib/components/kit/SliderField.svelte";
|
import SliderField from "$lib/components/kit/SliderField.svelte";
|
||||||
import ColorField from "$lib/components/kit/ColorField.svelte";
|
import StatusLine from "$lib/components/kit/StatusLine.svelte";
|
||||||
|
import StepCard from "$lib/components/kit/StepCard.svelte";
|
||||||
import TextField from "$lib/components/kit/TextField.svelte";
|
import TextField from "$lib/components/kit/TextField.svelte";
|
||||||
import SelectField from "$lib/components/kit/SelectField.svelte";
|
|
||||||
import CheckboxField from "$lib/components/kit/CheckboxField.svelte";
|
|
||||||
import Toggle from "$lib/components/kit/Toggle.svelte";
|
import Toggle from "$lib/components/kit/Toggle.svelte";
|
||||||
import EmptyState from "$lib/components/kit/EmptyState.svelte";
|
import ToolCard from "$lib/components/kit/ToolCard.svelte";
|
||||||
import CodeBlock from "$lib/components/kit/CodeBlock.svelte";
|
import { Download, ImageOff, Palette, Plus, Trash2 } from "@lucide/svelte";
|
||||||
import DownloadButton from "$lib/components/kit/DownloadButton.svelte";
|
|
||||||
import { Plus, Trash2, Download, ImageOff, Palette } from "@lucide/svelte";
|
|
||||||
|
|
||||||
let mode = $state("preview");
|
let mode = $state("preview");
|
||||||
let radius = $state(8);
|
let radius = $state(8);
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
</SettingGroup>
|
</SettingGroup>
|
||||||
</div>
|
</div>
|
||||||
<SettingsFooter>
|
<SettingsFooter>
|
||||||
<DownloadButton label="Download PNG" size="1.2 MB" onclick={() => {}} />
|
<DownloadButton label="Download PNG" onclick={() => {}} />
|
||||||
</SettingsFooter>
|
</SettingsFooter>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
||||||
@@ -174,10 +174,10 @@
|
|||||||
<ImageCard label="result.png · 512×512">
|
<ImageCard label="result.png · 512×512">
|
||||||
<CheckerCanvas size="sm" />
|
<CheckerCanvas size="sm" />
|
||||||
</ImageCard>
|
</ImageCard>
|
||||||
<PreviewTile label="tile-01">
|
<PreviewTile label="tile-01" caption="caption-01">
|
||||||
<CheckerCanvas size="sm" />
|
<CheckerCanvas size="sm" />
|
||||||
</PreviewTile>
|
</PreviewTile>
|
||||||
<PreviewTile label="tile-02">
|
<PreviewTile label="tile-02" caption="caption-01">
|
||||||
<CheckerCanvas size="sm" />
|
<CheckerCanvas size="sm" />
|
||||||
</PreviewTile>
|
</PreviewTile>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user