refac: folders
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
{save}
|
||||
{preview}
|
||||
edit={editCodeBlock}
|
||||
stickyButtonsClassName={topPadding ? 'top-6' : 'top-0'}
|
||||
stickyButtonsClassName={topPadding ? 'top-7' : 'top-0'}
|
||||
onSave={(value) => {
|
||||
onSave({
|
||||
raw: token.raw,
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<nav class="sticky top-0 z-30 w-full py-1 -mb-8 flex flex-col items-center drag-region">
|
||||
<div class="flex items-center w-full pl-1.5 pr-1">
|
||||
<div
|
||||
class=" bg-linear-to-b via-40% from-white via-white to-transparent dark:from-gray-900 dark:via-gray-900 dark:to-transparent pointer-events-none absolute inset-0 -bottom-7 z-[-1]"
|
||||
class=" bg-linear-to-b via-40% to-97% from-white via-white to-transparent dark:from-gray-900 dark:via-gray-900 dark:to-transparent pointer-events-none absolute inset-0 -bottom-7 z-[-1]"
|
||||
></div>
|
||||
|
||||
<div class=" flex max-w-full w-full mx-auto px-1.5 md:px-2 pt-0.5 bg-transparent">
|
||||
|
||||
Reference in New Issue
Block a user