Added REPL example

This commit is contained in:
2022-08-26 01:28:02 +02:00
parent c93585ef70
commit 2e2cef3226
2 changed files with 52 additions and 0 deletions

33
repl/repl.html Normal file
View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>REPL mit Matplotlib</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="../assets/pyscript.css" />
<script defer src="../assets/pyscript.js"></script>
<!-- prettier-ignore -->
<py-env>
- matplotlib
</py-env>
</head>
<body>
<div>
<b>Eingabe</b>
<hr />
<py-repl std-out="output" std-err="errors"></py-repl>
</div>
<div>
<b>Ausgabe</b>
<hr />
<div id="output"></div>
</div>
<div>
<b>Fehler</b>
<hr />
<div id="errors"></div>
</div>
</body>
</html>

19
repl/style.css Normal file
View File

@@ -0,0 +1,19 @@
body {
box-sizing: border-box;
background-color: #fff;
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 1em;
}
body > div {
background-color: #fff;
box-shadow: 0px 5px 10px #ccc;
padding: 1em;
margin: 1em;
flex: 0 40%;
min-height: 40vh;
}
body > div:last-of-type {
flex: 0 80%;
}