canva-tree/index.html
djmil 5ff9d3e824 path slash problems
trying to make https://djmil.pages.djmil.dev/canva-tree address to work
previous state was unable to load the script
2024-06-23 14:36:43 +02:00

45 lines
877 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Recursive tree</title>
<!-- <link rel="stylesheet" href="css/style.css"> -->
<style>
canvas {
background: #eee;
display: block;
margin: 0 auto;
}
p { width: 800px; margin: 0 auto; }
ol { width: 800px; margin: 0 auto; }
</style>
</head>
<body>
<section>
<h1 align="center">Recursive tree</h1>
<p>Reload the page to see another one.</p>
</section>
<canvas id="tree" width="1000" height="750"></canvas>
<section>
<p>Find out how this magick works at the <a href="https://gitea.djmil.dev/djmil/canva-tree">canvas-tree</a> repo.</p>
<p align="right">(c) djmil</p>
</section>
<script src="/tree.js"></script>
<script>
var canvas = document.getElementById("tree");
ctx = canvas.getContext("2d");
tree(ctx, canvas.width/2, canvas.height, 200);
</script>
</body>
</html>