adjusted the layout

This commit is contained in:
yoshi 2025-05-08 13:47:30 -07:00
parent b08893bbcf
commit 83cce71d8a
3 changed files with 14 additions and 11 deletions

View file

@ -8,9 +8,10 @@ export default function EditorPanel({ code, onChange }) {
border: '1px solid #444', border: '1px solid #444',
borderRadius: '8px', borderRadius: '8px',
backgroundColor: '#1e1e1e', backgroundColor: '#1e1e1e',
height: '70vh', height: '65vh',
boxShadow: '0 0 10px rgba(255, 0, 255, 0.2)', boxShadow: "0 0 12px #00bfff",
overflow: 'hidden' overflow: 'hidden',
marginTop: '45px'
}}> }}>
<Editor <Editor
height="100%" height="100%"

View file

@ -26,7 +26,7 @@ export default function PreviewPanel({ code }) {
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
boxSizing: 'border-box', boxSizing: 'border-box',
height: '67vh', height: '72vh',
marginBorder : '1.5rem', marginBorder : '1.5rem',
}}> }}>
<div style={{ <div style={{
@ -50,7 +50,7 @@ export default function PreviewPanel({ code }) {
border: '1px solid #ff2a6d', border: '1px solid #ff2a6d',
borderRadius: '8px', borderRadius: '8px',
padding: '0.2rem', padding: '0.2rem',
marginBottom: '1rem' marginBottom: '1.2rem'
}}> }}>
<input <input
type="text" type="text"
@ -61,7 +61,7 @@ export default function PreviewPanel({ code }) {
width: '100%', width: '100%',
textAlign: 'center', textAlign: 'center',
padding: '0.2rem', padding: '0.2rem',
marginBottom: '0.25rem', marginBottom: '0.5rem',
border: 'none', border: 'none',
borderRadius: 4, borderRadius: 4,
background: 'transparent', background: 'transparent',
@ -95,7 +95,9 @@ export default function PreviewPanel({ code }) {
<div style={{ <div style={{
flex: 1, flex: 1,
overflow: 'hidden', overflow: 'auto',
flexDirection: 'column',
justifyContent: 'center',
borderRadius: '8px', borderRadius: '8px',
height: '100vh', height: '100vh',
}}> }}>
@ -103,7 +105,7 @@ export default function PreviewPanel({ code }) {
<iframe <iframe
src={`https://gameboard-service-aged-glitter-8141.fly.dev/?game=${encodeURIComponent(gameId)}&autoplay=false&showControls=true`} src={`https://gameboard-service-aged-glitter-8141.fly.dev/?game=${encodeURIComponent(gameId)}&autoplay=false&showControls=true`}
title="Battlesnake Board" title="Battlesnake Board"
style={{ width: '100%', height: '100%', border: 'none' }} style={{ width: '41vw', height: '85vh', border: 'none', paddingTop: '1rem', borderRadius: '8px' }}
allowFullScreen allowFullScreen
scrolling="no" scrolling="no"
/> />

View file

@ -108,8 +108,8 @@ export default function PageCodeEditor() {
borderRadius: "10px", borderRadius: "10px",
padding: "1rem", padding: "1rem",
color: "#eee", color: "#eee",
minHeight: "30vh", height: "100%",
overflow: "auto" overflow: "auto",
}} }}
> >
<h3 <h3
@ -124,7 +124,7 @@ export default function PageCodeEditor() {
🐍 Snake Brain (Python) 🐍 Snake Brain (Python)
</h3> </h3>
<EditorPanel code={code} onChange={setCode} /> <EditorPanel code={code} onChange={setCode} />
<div style={{ marginTop: "1rem", display: "flex", flexDirection: "flex-end" }}> <div style={{ marginTop: "1rem", display: "flex", flexDirection: "row", justifyContent: "center" }}>
<button <button
onClick={handleSave} onClick={handleSave}
disabled={isSaving} disabled={isSaving}