beautiful

This commit is contained in:
Reimar 2025-08-20 20:47:30 +02:00
parent 41ec0814f7
commit 5520cd0142
No known key found for this signature in database
GPG Key ID: 93549FA07F0AE268
2 changed files with 111 additions and 66 deletions

View File

@ -11,26 +11,36 @@
<script src="./index.js" defer></script>
</head>
<body>
<div id="buttons">
<button id="start-stop">Start</button>
<button id="save">Save</button>
</div>
<main>
<div id="dashboard">
<div class="column" style="flex: 1">
<section>
<div class="section-header">Output</div>
<canvas id="canvas-area">
</canvas>
</section>
<section>
<div class="section-header">Console</div>
<div id="console">
<pre><code id="console-code">Karlkode 1.0</code></pre>
<input type="text" placeholder=">">
</div>
</section>
</div>
<div class="column" style="flex: 3">
<div>
<button id="start-stop">Start</button>
<button id="save">Save</button>
</div>
<section>
<div class="section-header">Code editor</div>
<div id="editor-area">
<pre id="editor">
@ -54,6 +64,8 @@ lib.startGameLoop(loop);
return 5;
</pre>
</div>
</section>
</div>
</main>

View File

@ -5,36 +5,52 @@
body {
margin: 0;
height: 100vh;
background-color: #EEE;
}
main {
display: flex;
flex-direction: row;
height: 100vh;
gap: 32px;
}
#buttons {
.section-header {
background-color: white;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border: 1px solid #BDBDBD;
padding: 4px;
padding-left: 8px;
font-family: sans-serif;
color: #747474;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
}
section {
width: 100%;
flex: 1;
display: flex;
flex-direction: row;
justify-content: end;
align-items: center;
gap: 10px;
flex-direction: column;
}
#buttons button {
margin: 5px;
padding: 10px;
min-width: 100px;
section *:last-child {
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
flex: 1;
}
#dashboard {
.column {
display: flex;
flex-direction: column;
gap: 5px;
width: 40vw;
justify-content: space-evenly;
align-items: center;
align-items: flex-start;
padding: 32px;
gap: 32px;
height: 100vh;
flex: 1;
}
canvas {
@ -43,8 +59,8 @@ canvas {
}
#console {
width: 100%;
padding: 5px;
display: flex;
flex-direction: column;
}
#console pre {
@ -53,24 +69,26 @@ canvas {
margin: 0;
width: 100%;
font-size: 1rem;
height: 24rem;
padding: 4px 8px;
flex: 1;
}
#console input {
width: 100%;
margin: 0;
outline: none;
border: 2px solid white;
padding: none;
color: white;
background-color: black;
border: none;
background-color: #222;
padding: 4px 8px;
font-family: monospace;
font-size: 1rem;
flex-grow: 0;
}
#editor-area {
width: 100%;
height: 100%;
}
#editor {
@ -79,3 +97,18 @@ canvas {
height: 100%;
font-size: 16px;
}
button {
background-color: #4FC3F7;
border: none;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
padding: 8px 16px;
border-radius: 8px;
cursor: pointer;
transition-duration: 200ms;
}
button:hover {
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}