refac: styling

This commit is contained in:
Timothy J. Baek 2024-05-16 23:19:31 -10:00
parent 85b2a63b6d
commit aa9f3d0632

View File

@ -204,6 +204,12 @@ __builtins__.input = input`);
console.log(result); console.log(result);
console.log(stdout); console.log(stdout);
console.log(stderr); console.log(stderr);
const pltCanvasElement = document.getElementById(`plt-canvas-${id}`);
if (pltCanvasElement?.innerHTML !== '') {
pltCanvasElement.classList.add('px-4', 'pt-4');
}
} catch (error) { } catch (error) {
console.error('Error:', error); console.error('Error:', error);
stderr = error; stderr = error;
@ -302,6 +308,8 @@ __builtins__.input = input`);
class="language-{lang} rounded-t-none whitespace-pre">{@html highlightedCode || code}</code class="language-{lang} rounded-t-none whitespace-pre">{@html highlightedCode || code}</code
></pre> ></pre>
<div id="plt-canvas-{id}" class="bg-[#202123] text-white" />
{#if executing} {#if executing}
<div class="bg-[#202123] text-white px-4 py-4 rounded-b-lg"> <div class="bg-[#202123] text-white px-4 py-4 rounded-b-lg">
<div class=" text-gray-500 text-xs mb-1">STDOUT/STDERR</div> <div class=" text-gray-500 text-xs mb-1">STDOUT/STDERR</div>
@ -313,7 +321,5 @@ __builtins__.input = input`);
<div class="text-sm">{stdout || stderr || result}</div> <div class="text-sm">{stdout || stderr || result}</div>
</div> </div>
{/if} {/if}
<div id="plt-canvas-{id}" />
</div> </div>
{/if} {/if}