mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-14 21:46:35 +00:00
fix: update preview styles
This commit is contained in:
@@ -9,17 +9,18 @@
|
|||||||
let { settings, preview }: Props = $props();
|
let { settings, preview }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="ws">
|
<div class="page-grid">
|
||||||
<section class="ws-settings">{@render settings()}</section>
|
<section class="ws-settings">{@render settings()}</section>
|
||||||
{@render preview()}
|
{@render preview()}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.ws {
|
.page-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1.05fr) minmax(520px, 0.95fr);
|
grid-template-columns: minmax(0, 1.05fr) minmax(520px, 0.95fr);
|
||||||
align-items: start;
|
align-items: start;
|
||||||
gap: 56px;
|
gap: 56px;
|
||||||
|
width: 100%;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding: 60px clamp(24px, 4vw, 72px) 72px;
|
padding: 60px clamp(24px, 4vw, 72px) 72px;
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
.ws {
|
.page-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
gap: var(--ws-gap-mobile);
|
gap: var(--ws-gap-mobile);
|
||||||
padding: 36px 16px 48px;
|
padding: 36px 16px 48px;
|
||||||
|
|||||||
@@ -15,8 +15,15 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.preview-stack {
|
.preview-stack {
|
||||||
display: grid;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-template-columns: 1fr;
|
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
@media (max-width: 1100px) {
|
||||||
|
.preview-stack {
|
||||||
|
grid-template-columns: repeat(3, minmax(220px, 1fr));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -20,33 +20,51 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.preview-tile {
|
.preview-tile {
|
||||||
display: flex;
|
width: 100%;
|
||||||
flex-direction: column;
|
min-width: 0;
|
||||||
gap: 0.3rem;
|
overflow: hidden;
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: var(--radius);
|
background: var(--background);
|
||||||
padding: 0.4rem;
|
|
||||||
background: var(--panel);
|
|
||||||
}
|
}
|
||||||
.tile-canvas {
|
.tile-canvas {
|
||||||
border-radius: var(--radius);
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 260px;
|
||||||
|
min-height: clamp(300px, 22vw, 430px);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
min-height: 120px;
|
aspect-ratio: 1.35;
|
||||||
|
background-color: #e4e8eb;
|
||||||
|
background-image:
|
||||||
|
linear-gradient(45deg, #d2d8dc 25%, #0000 25%),
|
||||||
|
linear-gradient(-45deg, #d2d8dc 25%, #0000 25%),
|
||||||
|
linear-gradient(45deg, #0000 75%, #d2d8dc 75%),
|
||||||
|
linear-gradient(-45deg, #0000 75%, #d2d8dc 75%);
|
||||||
|
background-position:
|
||||||
|
0 0,
|
||||||
|
0 7px,
|
||||||
|
7px -7px,
|
||||||
|
-7px 0;
|
||||||
|
background-size: 14px 14px;
|
||||||
|
place-items: center;
|
||||||
|
padding: 16px;
|
||||||
|
display: grid;
|
||||||
}
|
}
|
||||||
.tile-label {
|
.tile-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 0.5rem;
|
gap: 8px;
|
||||||
|
padding: 8px;
|
||||||
|
border-top: 1px solid var(--line);
|
||||||
|
font: 9px var(--font-mono);
|
||||||
|
color: var(--blue);
|
||||||
}
|
}
|
||||||
.tile-label span {
|
.tile-label span {
|
||||||
font: 10px var(--font-mono);
|
font: 10px var(--font-mono);
|
||||||
letter-spacing: 0.08em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: var(--blue);
|
color: var(--blue);
|
||||||
}
|
}
|
||||||
.tile-label b {
|
.tile-label b {
|
||||||
font: 400 10px var(--font-mono);
|
font: 400 10px var(--font-mono);
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -206,7 +206,7 @@
|
|||||||
{#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}>
|
||||||
<div
|
<div
|
||||||
class="ph"
|
class="image-preview"
|
||||||
class:active={tile.active}
|
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'};"
|
||||||
@@ -254,10 +254,12 @@
|
|||||||
font: 11px var(--font-mono);
|
font: 11px var(--font-mono);
|
||||||
}
|
}
|
||||||
.preview-panel {
|
.preview-panel {
|
||||||
|
min-width: 0;
|
||||||
|
margin-top: 0;
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
background: var(--panel);
|
background: var(--panel);
|
||||||
|
align-self: start;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
min-width: 0;
|
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 24px;
|
top: 24px;
|
||||||
}
|
}
|
||||||
@@ -280,18 +282,21 @@
|
|||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
}
|
}
|
||||||
.ph {
|
.image-preview {
|
||||||
|
min-width: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
aspect-ratio: 1.5;
|
||||||
|
color: #16202b;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
aspect-ratio: 1.35;
|
font: 600 10px var(--font-mono);
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
color: #16202b;
|
display: flex;
|
||||||
font: 600 10px var(--font-mono);
|
|
||||||
}
|
}
|
||||||
.ph.active {
|
.image-preview.active {
|
||||||
border-color: var(--blue);
|
border-color: var(--blue);
|
||||||
}
|
}
|
||||||
.sample-icon {
|
.sample-icon {
|
||||||
|
|||||||
Reference in New Issue
Block a user