feat(html/js): setup canvas for both babylon and p5js
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -1,61 +1,68 @@
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body.maze-page {
|
||||
background:
|
||||
radial-gradient(circle at top, #1c2733 0%, #0a0f15 55%, #06080c 100%);
|
||||
color: #e8eef6;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
}
|
||||
|
||||
canvas {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#one {
|
||||
display: block;
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
.maze-layout {
|
||||
width: min(1100px, calc(100vw - 24px));
|
||||
margin: 12px auto 20px;
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
#two {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
.panel {
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
border-radius: 16px;
|
||||
background: rgba(7, 12, 18, 0.72);
|
||||
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Options in index.html */
|
||||
.options {
|
||||
display: inline-block;
|
||||
clear: both;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
.panel-label {
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: #93a4b8;
|
||||
}
|
||||
|
||||
.option {
|
||||
float: left;
|
||||
padding: 50px;
|
||||
#renderCanvas {
|
||||
width: 100%;
|
||||
height: min(62vh, 680px);
|
||||
}
|
||||
|
||||
.emoji {
|
||||
font-size: 100px;
|
||||
vertical-align: middle;
|
||||
line-height: 2;
|
||||
clear: both;
|
||||
margin: auto;
|
||||
#p5-panel {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 8px 0 14px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin: auto;
|
||||
margin-top: -50px;
|
||||
|
||||
font-family: 'Times New Roman', Times, serif;
|
||||
font-size: 25px;
|
||||
letter-spacing: 0.6px;
|
||||
word-spacing: 2px;
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
font-style: normal;
|
||||
font-variant: small-caps;
|
||||
text-transform: none;
|
||||
#p5-panel canvas {
|
||||
width: min(100%, 1000px);
|
||||
height: auto;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.maze-layout {
|
||||
width: calc(100vw - 16px);
|
||||
margin: 8px auto 16px;
|
||||
}
|
||||
|
||||
#renderCanvas {
|
||||
height: 52vh;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user