Skip to content

Commit 83a0444

Browse files
committed
fix: keep storage panel below sticky toolbar
1 parent b7bbdb5 commit 83a0444

2 files changed

Lines changed: 52 additions & 44 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dc-code-paste",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"private": true,
55
"type": "module",
66
"scripts": {

src/routes/+page.svelte

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,6 +2348,7 @@
23482348
</script>
23492349

23502350
<main class="workspace">
2351+
<div class="toolbar-shell">
23512352
<section class="toolbar" aria-label="글 편집 도구">
23522353
<div class="tool-group command-group">
23532354
<button
@@ -2970,43 +2971,6 @@
29702971
{/if}
29712972
</section>
29722973

2973-
{#if isMarkdownPanelOpen}
2974-
<section class="markdown-panel" aria-label="Markdown import">
2975-
<textarea
2976-
class="markdown-input"
2977-
bind:value={markdownDraft}
2978-
aria-label="Markdown 원문"
2979-
spellcheck="false"
2980-
placeholder={`# 제목\n\n본문과 [링크](https://example.com)\n\n\`\`\`cpp\nint main() {}\n\`\`\``}
2981-
oninput={() => (markdownImportState = "idle")}
2982-
></textarea>
2983-
<div class="markdown-actions">
2984-
<button
2985-
class="markdown-import-button"
2986-
type="button"
2987-
aria-label="Markdown 적용하기"
2988-
onclick={importMarkdownDraft}
2989-
>
2990-
<FileText size={16} />
2991-
<span>적용하기</span>
2992-
</button>
2993-
<button
2994-
class="markdown-clear-button"
2995-
type="button"
2996-
aria-label="Markdown 비우기"
2997-
onclick={clearMarkdownDraft}
2998-
>
2999-
<Trash2 size={15} />
3000-
<span>비우기</span>
3001-
</button>
3002-
<span
3003-
class:error={markdownImportState === "error"}
3004-
class="markdown-status">{markdownImportStateLabel}</span
3005-
>
3006-
</div>
3007-
</section>
3008-
{/if}
3009-
30102974
{#if isStoragePanelOpen}
30112975
<div id="storage-panel" class="storage-panel">
30122976
<section class="preset-panel" aria-label="프리셋">
@@ -3199,6 +3163,44 @@
31993163
</section>
32003164
</div>
32013165
{/if}
3166+
</div>
3167+
3168+
{#if isMarkdownPanelOpen}
3169+
<section class="markdown-panel" aria-label="Markdown import">
3170+
<textarea
3171+
class="markdown-input"
3172+
bind:value={markdownDraft}
3173+
aria-label="Markdown 원문"
3174+
spellcheck="false"
3175+
placeholder={`# 제목\n\n본문과 [링크](https://example.com)\n\n\`\`\`cpp\nint main() {}\n\`\`\``}
3176+
oninput={() => (markdownImportState = "idle")}
3177+
></textarea>
3178+
<div class="markdown-actions">
3179+
<button
3180+
class="markdown-import-button"
3181+
type="button"
3182+
aria-label="Markdown 적용하기"
3183+
onclick={importMarkdownDraft}
3184+
>
3185+
<FileText size={16} />
3186+
<span>적용하기</span>
3187+
</button>
3188+
<button
3189+
class="markdown-clear-button"
3190+
type="button"
3191+
aria-label="Markdown 비우기"
3192+
onclick={clearMarkdownDraft}
3193+
>
3194+
<Trash2 size={15} />
3195+
<span>비우기</span>
3196+
</button>
3197+
<span
3198+
class:error={markdownImportState === "error"}
3199+
class="markdown-status">{markdownImportStateLabel}</span
3200+
>
3201+
</div>
3202+
</section>
3203+
{/if}
32023204

32033205
<section class="workbench">
32043206
<div class="editor-panel">
@@ -3337,24 +3339,29 @@
33373339
padding: 10px 0 34px;
33383340
}
33393341
3340-
.toolbar {
3342+
.toolbar-shell {
33413343
position: sticky;
33423344
top: 8px;
33433345
z-index: 20;
33443346
display: grid;
3345-
grid-template-columns: auto minmax(0, 1fr) auto;
3346-
gap: 9px 10px;
3347-
align-items: stretch;
3347+
gap: 10px;
33483348
max-height: calc(100vh - 16px);
33493349
margin-bottom: 12px;
33503350
overflow: auto;
33513351
overscroll-behavior: contain;
3352+
scrollbar-gutter: stable;
3353+
}
3354+
3355+
.toolbar {
3356+
display: grid;
3357+
grid-template-columns: auto minmax(0, 1fr) auto;
3358+
gap: 9px 10px;
3359+
align-items: stretch;
33523360
padding: 10px;
33533361
border: 1px solid var(--line);
33543362
border-radius: 8px;
33553363
background: color-mix(in oklch, var(--panel) 98%, oklch(0% 0 0 / 0));
33563364
box-shadow: 0 18px 44px oklch(0% 0 0 / 0.18);
3357-
scrollbar-gutter: stable;
33583365
}
33593366
33603367
.tool-group {
@@ -3708,9 +3715,10 @@
37083715
}
37093716
37103717
.storage-panel {
3718+
grid-column: 1 / -1;
37113719
display: grid;
37123720
gap: 10px;
3713-
margin-bottom: 12px;
3721+
margin: 0;
37143722
}
37153723
37163724
.preset-panel,

0 commit comments

Comments
 (0)