From 8e9ef5ba62b8bee028428384ad5666e245eb854c Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 17 Feb 2019 21:53:36 +0100 Subject: content update --- tools/draw/app.css | 76 ----------------------------------------------- tools/draw/app.js | 72 -------------------------------------------- tools/draw/favicon.png | Bin 5234 -> 0 bytes tools/draw/index.html | 41 ------------------------- tools/editor/favicon.ico | Bin 1150 -> 0 bytes tools/editor/index.html | 72 -------------------------------------------- 6 files changed, 261 deletions(-) delete mode 100644 tools/draw/app.css delete mode 100644 tools/draw/app.js delete mode 100644 tools/draw/favicon.png delete mode 100644 tools/draw/index.html delete mode 100644 tools/editor/favicon.ico delete mode 100644 tools/editor/index.html (limited to 'tools') diff --git a/tools/draw/app.css b/tools/draw/app.css deleted file mode 100644 index 60db957..0000000 --- a/tools/draw/app.css +++ /dev/null @@ -1,76 +0,0 @@ -@charset "utf-8"; - -* { - box-sizing: border-box; - background-color: transparent; - margin: 0; - padding: 0; - border: 0; - list-style-type: none; - outline: none; - text-decoration: none; - position: relative; - box-shadow: none; - -moz-osx-font-smoothing: grayscale !important; - text-rendering: optimizeLegibility !important; - -webkit-font-smoothing: antialiased !important; - font-family: Arial, Helvetica, sans-serif; - user-select: none; -} - -body { - margin: 0; - padding: 0; - font-size: 13px; -} - -section { - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - background-image: linear-gradient(0deg, transparent 24%, rgba(0, 0, 0, .08) 25%, rgba(0, 0, 0, .08) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, .08) 75%, rgba(0, 0, 0, .08) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(0, 0, 0, .08) 25%, rgba(0, 0, 0, .08) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, .08) 75%, rgba(0, 0, 0, .08) 76%, transparent 77%, transparent); - background-size: 50px 50px; -} - -canvas { - width: 100%; - height: 100%; -} - -button { - display: block; - background: #fff; - border-radius: 5px; - width: 100%; - font-weight: bold; - cursor: pointer; - text-align: center; -} - -nav.colors { - position: fixed; - left: 10px; - top: 10px; - width: 40px; -} - -nav.colors button { - height: 40px; - margin-bottom: 10px; - border-radius: 50%; -} - -nav.tools { - position: fixed; - left: 10px; - bottom: 10px; - width: 65px; -} - -nav.tools button { - border: 2px solid #bbb; - padding: 10px 0; - margin-top: 10px; -} diff --git a/tools/draw/app.js b/tools/draw/app.js deleted file mode 100644 index 4c73d75..0000000 --- a/tools/draw/app.js +++ /dev/null @@ -1,72 +0,0 @@ -window.addEventListener('load', function(evt) { - - let paintStyle = getComputedStyle(document.querySelector('section')); - let canvas = document.querySelector('canvas'); - let ctx = canvas.getContext('2d'); - - canvas.width = parseInt(paintStyle.getPropertyValue('width')); - canvas.height = parseInt(paintStyle.getPropertyValue('height')); - - var mouse = { - x: 0, - y: 0 - }; - - ctx.lineWidth = 3; - ctx.lineJoin = 'round'; - ctx.lineCap = 'round'; - ctx.strokeStyle = 'limegreen'; - - canvas.addEventListener('mousemove', function(e) { - mouse.x = e.pageX - this.offsetLeft; - mouse.y = e.pageY - this.offsetTop; - }, false); - - canvas.addEventListener('mousedown', function(e) { - ctx.beginPath(); - ctx.moveTo(mouse.x, mouse.y); - canvas.addEventListener('mousemove', onPaint, false); - }, false); - - canvas.addEventListener('mouseup', function() { - canvas.removeEventListener('mousemove', onPaint, false); - }, false); - - var onPaint = function() { - ctx.lineCap = 'round'; - ctx.lineTo(mouse.x, mouse.y); - ctx.stroke(); - }; - - - document.querySelectorAll('nav button').forEach(function(button, idx) { - - if (button.dataset.method == 'color') { - button.style.background = button.dataset.value; - } - - button.addEventListener('click', function(evt) { - switch (button.dataset.method) { - case 'color': - { - ctx.strokeStyle = button.dataset.value; - break; - } - case 'size': - { - ctx.lineWidth = parseInt(button.dataset.value); - break; - } - } - }); - - }); - - document.addEventListener('keydown', function(evt) { - if (evt.keyCode == 8) { - ctx.clearRect(0, 0, canvas.width, canvas.height); - } - console.log(evt.keyCode); - }, false); - -}); diff --git a/tools/draw/favicon.png b/tools/draw/favicon.png deleted file mode 100644 index f60ca30..0000000 Binary files a/tools/draw/favicon.png and /dev/null differ diff --git a/tools/draw/index.html b/tools/draw/index.html deleted file mode 100644 index 87ff1d2..0000000 --- a/tools/draw/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - Draw - - - - - - -
- -
- - - - - - - - - - diff --git a/tools/editor/favicon.ico b/tools/editor/favicon.ico deleted file mode 100644 index f2a4604..0000000 Binary files a/tools/editor/favicon.ico and /dev/null differ diff --git a/tools/editor/index.html b/tools/editor/index.html deleted file mode 100644 index 3bdef13..0000000 --- a/tools/editor/index.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - Editor - - - - - - - - - - -
- - - - - - -- cgit v1.2.3