Stylize examples/template.html
This commit is contained in:
@@ -5,63 +5,148 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title>@project_name@ Example: @category_name@/@example_name@</title>
|
<title>@project_name@ Example: @category_name@/@example_name@</title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
html, body {
|
||||||
font-family: arial;
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: 'Liberation Sans', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.canvas-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#canvas {
|
||||||
|
box-shadow: 0 0 0.5rem #7787;
|
||||||
|
}
|
||||||
|
|
||||||
|
#output-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
background-color: black;
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid #778;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: none;
|
padding: 1rem;
|
||||||
|
|
||||||
|
transition: top 0.25s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
|
#output-container::before {
|
||||||
div.emscripten { text-align: center; }
|
position: absolute;
|
||||||
div.emscripten_border { border: 1px solid black; }
|
bottom: 100%;
|
||||||
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
|
right: 1rem;
|
||||||
canvas.emscripten { border: 0px none; background-color: black; }
|
|
||||||
|
|
||||||
@-webkit-keyframes rotation {
|
content: 'Console';
|
||||||
from {-webkit-transform: rotate(0deg);}
|
font-size: 1.5rem;
|
||||||
to {-webkit-transform: rotate(360deg);}
|
color: white;
|
||||||
|
background: black;
|
||||||
|
border: 1px solid #778;
|
||||||
|
border-bottom: none;
|
||||||
|
padding: 0.75rem 1.5rem;
|
||||||
|
border-radius: 0.5rem 0.5rem 0 0;
|
||||||
}
|
}
|
||||||
@-moz-keyframes rotation {
|
|
||||||
from {-moz-transform: rotate(0deg);}
|
#output-container:hover,
|
||||||
to {-moz-transform: rotate(360deg);}
|
#output-container:focus-within {
|
||||||
|
top: 50%;
|
||||||
}
|
}
|
||||||
@-o-keyframes rotation {
|
|
||||||
from {-o-transform: rotate(0deg);}
|
#output-container:focus-within {
|
||||||
to {-o-transform: rotate(360deg);}
|
border-top: 2px solid orange;
|
||||||
}
|
}
|
||||||
@keyframes rotation {
|
|
||||||
from {transform: rotate(0deg);}
|
#output-container:focus-within::before {
|
||||||
to {transform: rotate(360deg);}
|
border: 2px solid orange;
|
||||||
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#output {
|
#output {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200px;
|
height: 100%;
|
||||||
margin: 0 auto;
|
padding: 0;
|
||||||
margin-top: 10px;
|
margin: 0;
|
||||||
border-left: 0px;
|
|
||||||
border-right: 0px;
|
border: none;
|
||||||
padding-left: 0px;
|
background: black;
|
||||||
padding-right: 0px;
|
|
||||||
display: none;
|
|
||||||
background-color: black;
|
|
||||||
color: white;
|
color: white;
|
||||||
font-family: 'Lucida Console', Monaco, monospace;
|
|
||||||
outline: none;
|
outline: none;
|
||||||
|
resize: none;
|
||||||
|
|
||||||
|
font-family: 'Lucida Console', Monaco, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.source_code {
|
#source-code {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
background: #e0eaee;
|
||||||
|
padding: 1rem;
|
||||||
|
|
||||||
|
transition: top 0.25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#source-code::before {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 100%;
|
||||||
|
left: 1rem;
|
||||||
|
|
||||||
|
content: 'Source code';
|
||||||
|
font-size: 1.5rem;
|
||||||
|
background: linear-gradient(to bottom, #789, #e0eaee);
|
||||||
|
padding: 0.75rem 1.5rem;
|
||||||
|
border-radius: 0.5rem 0.5rem 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#source-code:hover,
|
||||||
|
#source-code:focus-within {
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#source-code:focus-within {
|
||||||
|
border-top: 2px solid orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#source-code:focus-within::before {
|
||||||
|
border: 2px solid orange;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#source-code-contents {
|
||||||
|
height: 100%;
|
||||||
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="stylesheet" type="text/css" href="highlight.css">
|
<link rel="stylesheet" type="text/css" href="highlight.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="emscripten_border">
|
<div class="canvas-container">
|
||||||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
|
<canvas id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="output-container">
|
||||||
|
<textarea id="output" rows="8" spellcheck="false" readonly></textarea>
|
||||||
</div>
|
</div>
|
||||||
<textarea id="output" rows="8"></textarea>
|
|
||||||
|
|
||||||
<div class="source_code">@htmlified_source_code@</div>
|
<div id="source-code" tabindex="1">
|
||||||
|
<div id="source-code-contents">@htmlified_source_code@</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
var Module = {
|
var Module = {
|
||||||
|
|||||||
Reference in New Issue
Block a user