physics/template.html
Loic Guegan 1c0a1d6248 Update
2021-10-06 15:32:23 +02:00

92 lines
3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Physics Simulation</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css" integrity="sha384-zTROYFVGOfTw7JV7KUu8udsvW2fx4lWOsCEDqhBreBwlHI4ioVRtmIvEThzJHGET" crossorigin="anonymous">
<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.js" integrity="sha384-GxNFqL3r9uRJQhR+47eDxuPoNE7yLftQM8LcxzgS4HT73tp970WS/wV5p8UzCOmb" crossorigin="anonymous"></script>
<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.18/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/p5.min.js"></script>
<script type="text/javascript" src="js/p5_custom.js"></script>
<script type="text/javascript" src="${JS}"></script>
<style>
#canvas {
width: intrinsic; /* Safari/WebKit uses a non-standard name */
width: -moz-max-content; /* Firefox/Gecko */
width: -webkit-max-content; /* Chrome */
width:fit-content;
height: intrinsic; /* Safari/WebKit uses a non-standard name */
height: -moz-max-content; /* Firefox/Gecko */
height: -webkit-max-content; /* Chrome */
height:fit-content;
margin-bottom:2em;
}
</style>
<body>
<div class="container-fluid">
<div class="row">
<div class="col">
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand" href="#">
<img src="images/icon.png" width="30" height="30" class="d-inline-block align-top" alt=""> &Phi;Sics
</a>
</nav>
</div>
</div>
<br />
<div class="row">
<div class="col">
<center>
<div class="btn-group">
${LINKS}
</div>
</center>
</div>
</div>
<br />
<div class="row">
<div class="col" style="padding:0px;">
<center>
<div id="canvas" class="img-thumbnail"></div>
</center>
</div>
</div>
<div class="row">
<div class="col">
<div class="container">
<div class="row">
<div class="col" id="app">
${CONTENT}
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var p5_instance=null
p5Load=function(){
if(p5_instance != null){p5_instance.remove()}
p5_instance=new p5(${project_name},"canvas")
}
project_init()
</script>
</body>
</html>