diff options
| author | UltraQbik <no1skill@yandex.ru> | 2024-08-25 15:34:28 +0300 |
|---|---|---|
| committer | UltraQbik <no1skill@yandex.ru> | 2024-08-25 15:34:28 +0300 |
| commit | 1793440e0db1688ed5c4d71208d5f8e2ab0b2a0f (patch) | |
| tree | dbcede3a69998de731c68d2e34ef6c511ee10018 | |
| parent | 7954bda75929ee551b397ac39c49d8183ad6cef3 (diff) | |
| download | httpy-1793440e0db1688ed5c4d71208d5f8e2ab0b2a0f.tar.gz httpy-1793440e0db1688ed5c4d71208d5f8e2ab0b2a0f.zip | |
JS Stuff
| -rw-r--r-- | css/styles.css | 2 | ||||
| -rw-r--r-- | www/js-test.html | 5 | ||||
| -rw-r--r-- | www/scripts/test.js | 10 |
3 files changed, 13 insertions, 4 deletions
diff --git a/css/styles.css b/css/styles.css index 855f15b..cb56704 100644 --- a/css/styles.css +++ b/css/styles.css @@ -9,7 +9,7 @@ p, li { } ul { - padding-left: 16px; + padding-left: 20px; } body { diff --git a/www/js-test.html b/www/js-test.html index 223827e..ccc6db8 100644 --- a/www/js-test.html +++ b/www/js-test.html @@ -10,11 +10,12 @@ <div style="float: left"> <button onclick="window.location.href='/'" style="font-size: 20px">sh%t go back</button> </div> <div style="margin: auto; width: fit-content;"> <b> The Mighty HTML Page. Ew JS </b> </div> </header> - <div id="section-div"> - <script src="/scripts/test.js"></script> + <div id="section-div" style="align-content: center;text-align: center;"> + <canvas id="JSCanvas" width="512" height="512"></canvas> </div> <footer> <p> This is a page for testing various things </p> </footer> + <script src="/scripts/test.js"></script> </body> </html> diff --git a/www/scripts/test.js b/www/scripts/test.js index 4a0a5b2..a48327c 100644 --- a/www/scripts/test.js +++ b/www/scripts/test.js @@ -1 +1,9 @@ -console.log('прощай world') +const canvas = document.getElementById("JSCanvas"); +const ctx = canvas.getContext("2d"); + +ctx.strokeStyle = "blue" +ctx.beginPath(); +ctx.moveTo(0, 0); +ctx.lineTo(511, 511); +ctx.stroke(); + |