fix: change style, demo page visual looks as done

This commit is contained in:
2026-08-31 18:07:34 +05:00
parent d73b9056d7
commit 749b97cb4f
9 changed files with 18 additions and 15 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
line-height: normal; line-height: normal;
font-family: var(--font-mono); font-family: var(--font-mono);
font-size: 10px; font-size: 10px;
border: 1px solid var(--line); border: 0px solid var(--line);
color: var(--muted); color: var(--muted);
} }
.badge--accent { .badge--accent {
@@ -56,6 +56,7 @@
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
height: 32px; height: 32px;
border: 1px solid var(--line);
} }
.swatch { .swatch {
width: 14px; width: 14px;
@@ -27,6 +27,7 @@
gap: 9px; gap: 9px;
margin-top: 18px; margin-top: 18px;
display: flex; display: flex;
white-space: nowrap;
} }
.download-btn:hover { .download-btn:hover {
background: color-mix(in srgb, var(--blue) 88%, #000); background: color-mix(in srgb, var(--blue) 88%, #000);
@@ -4,13 +4,14 @@
interface Props { interface Props {
label: string; label: string;
caption: string; caption: string;
active: boolean;
children: Snippet; children: Snippet;
} }
let { label, caption, children }: Props = $props(); let { label, caption, active, children }: Props = $props();
</script> </script>
<div class="preview-tile"> <div class="preview-tile" class:active>
<div class="tile-canvas">{@render children()}</div> <div class="tile-canvas">{@render children()}</div>
<div class="tile-label"> <div class="tile-label">
<span>{label}</span> <span>{label}</span>
@@ -25,6 +26,9 @@
overflow: hidden; overflow: hidden;
border: 1px solid var(--line); border: 1px solid var(--line);
background: var(--background); background: var(--background);
&.active {
border-color: var(--blue);
}
} }
.tile-canvas { .tile-canvas {
width: 100%; width: 100%;
@@ -36,8 +36,6 @@
display: flex; display: flex;
height: 32px; height: 32px;
border: 1px solid var(--line); border: 1px solid var(--line);
overflow: hidden;
background: var(--background);
} }
.segment { .segment {
border: 0; border: 0;
+1 -3
View File
@@ -49,13 +49,11 @@
min-height: 138px; min-height: 138px;
border: 1px solid var(--line); border: 1px solid var(--line);
background: var(--panel); background: var(--panel);
overflow: hidden;
} }
.step-index { .step-index {
font: 11px var(--font-mono); font: 11px var(--font-mono);
color: var(--blue); color: var(--blue);
padding: 17px 0 0px 15px; padding: 17px 0 0px 15px;
border-right: 1px solid var(--line);
} }
.step-body { .step-body {
padding: 15px 18px 18px; padding: 15px 18px 18px;
@@ -65,7 +63,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 15px; gap: 15px;
border-bottom: 1px solid var(--line); border-color: var(--line);
} }
.step-type { .step-type {
color: var(--muted); color: var(--muted);
+1 -3
View File
@@ -30,7 +30,7 @@
width: 32px; width: 32px;
height: 18px; height: 18px;
border: 1px solid var(--line); border: 1px solid var(--line);
border-radius: 999px; border-radius: 0;
background: var(--background); background: var(--background);
cursor: pointer; cursor: pointer;
padding: 0; padding: 0;
@@ -40,8 +40,6 @@
border-color: var(--blue); border-color: var(--blue);
} }
.toggle-knob { .toggle-knob {
border-radius: 50%;
background: var(--foreground);
transition: transform 0.12s ease; transition: transform 0.12s ease;
} }
.toggle.on .toggle-knob { .toggle.on .toggle-knob {
+1 -1
View File
@@ -103,6 +103,7 @@
.nav a { .nav a {
color: var(--muted); color: var(--muted);
font: 10px var(--font-mono); font: 10px var(--font-mono);
white-space: nowrap;
text-decoration: none; text-decoration: none;
} }
.nav a:hover { .nav a:hover {
@@ -125,7 +126,6 @@
display: flex; display: flex;
align-items: center; align-items: center;
border: 1px solid var(--line); border: 1px solid var(--line);
overflow: hidden;
} }
.lang-btn { .lang-btn {
border: 0; border: 0;
+6 -3
View File
@@ -28,7 +28,7 @@
let outlineWidth = $state(2); let outlineWidth = $state(2);
let outlineColor = $state("#16202B"); let outlineColor = $state("#16202B");
let radius = $state(18); let radius = $state(18);
let preserveAspect = $state(true); let preserveAspect = $state(false);
const previewTiles = [ const previewTiles = [
{ label: "SOURCE", caption: "original.png · 1200 × 800", bg: "#8d9aa5" }, { label: "SOURCE", caption: "original.png · 1200 × 800", bg: "#8d9aa5" },
@@ -204,10 +204,13 @@
<PreviewStack pad="16px 0"> <PreviewStack pad="16px 0">
{#each previewTiles as tile (tile.label)} {#each previewTiles as tile (tile.label)}
<PreviewTile label={tile.label} caption={tile.caption}> <PreviewTile
label={tile.label}
caption={tile.caption}
active={tile.active || false}
>
<div <div
class="image-preview" class="image-preview"
class:active={tile.active}
style="background:{tile.bg}; border-radius:{tile.radius ?? style="background:{tile.bg}; border-radius:{tile.radius ??
'0'}; box-shadow:{tile.ring ?? 'none'};" '0'}; box-shadow:{tile.ring ?? 'none'};"
> >