refac: folders

This commit is contained in:
Timothy Jaeryang Baek
2025-09-15 18:33:57 -05:00
parent 3f27d9ada1
commit 3ec1efb6e0
6 changed files with 138 additions and 131 deletions
@@ -432,15 +432,17 @@
{/if}
{:else}
<div
class="sticky {stickyButtonsClassName} left-0 right-0 py-2 pr-3 flex items-center justify-between w-full z-10 text-xs text-black dark:text-white"
class="absolute left-0 right-0 py-2.5 pr-3 text-text-300 pl-4.5 text-xs font-medium dark:text-white"
>
<div class="text-text-300 pl-4.5 text-xs font-medium dark:text-white">
{lang}
</div>
{lang}
</div>
<div
class="sticky {stickyButtonsClassName} left-0 right-0 py-2 pr-3 flex items-center justify-end w-full z-10 text-xs text-black dark:text-white"
>
<div class="flex items-center gap-0.5">
<button
class="flex gap-1 items-center bg-none border-none transition rounded-md px-1.5 py-0.5"
class="flex gap-1 items-center bg-none border-none transition rounded-md px-1.5 py-0.5 bg-white dark:bg-black"
on:click={collapseCodeBlock}
>
<div class=" -translate-y-[0.5px]">
@@ -454,12 +456,14 @@
{#if ($config?.features?.enable_code_execution ?? true) && (lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code)))}
{#if executing}
<div class="run-code-button bg-none border-none p-0.5 cursor-not-allowed">
<div
class="run-code-button bg-none border-none p-0.5 cursor-not-allowed bg-white dark:bg-black"
>
{$i18n.t('Running')}
</div>
{:else if run}
<button
class="flex gap-1 items-center run-code-button bg-none border-none transition rounded-md px-1.5 py-0.5"
class="flex gap-1 items-center run-code-button bg-none border-none transition rounded-md px-1.5 py-0.5 bg-white dark:bg-black"
on:click={async () => {
code = _code;
await tick();
@@ -475,7 +479,7 @@
{#if save}
<button
class="save-code-button bg-none border-none transition rounded-md px-1.5 py-0.5"
class="save-code-button bg-none border-none transition rounded-md px-1.5 py-0.5 bg-white dark:bg-black"
on:click={saveCode}
>
{saved ? $i18n.t('Saved') : $i18n.t('Save')}
@@ -483,13 +487,13 @@
{/if}
<button
class="copy-code-button bg-none border-none transition rounded-md px-1.5 py-0.5"
class="copy-code-button bg-none border-none transition rounded-md px-1.5 py-0.5 bg-white dark:bg-black"
on:click={copyCode}>{copied ? $i18n.t('Copied') : $i18n.t('Copy')}</button
>
{#if preview && ['html', 'svg'].includes(lang)}
<button
class="flex gap-1 items-center run-code-button bg-none border-none transition rounded-md px-1.5 py-0.5"
class="flex gap-1 items-center run-code-button bg-none border-none transition rounded-md px-1.5 py-0.5 bg-white dark:bg-black"
on:click={previewCode}
>
<div>