changeset 29:a04ef87cf4a0

drag and drop
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 23 Dec 2022 15:31:50 -0700
parents c6a350363bb6
children 02f0e4da950c
files src/drag.html.luan src/needed.html.luan
diffstat 2 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/drag.html.luan	Fri Dec 23 15:31:50 2022 -0700
@@ -0,0 +1,33 @@
+local Luan = require "luan:Luan.luan"
+local error = Luan.error
+local Io = require "luan:Io.luan"
+local Http = require "luan:http/Http.luan"
+local Shared = require "site:/lib/Shared.luan"
+local head = Shared.head or error()
+local needed_header = Shared.needed_header or error()
+
+
+return function()
+	Io.stdout = Http.response.text_writer()
+%>
+<!doctype html>
+<html>
+	<head>
+<%		head() %>
+		<title>Reactionary Software - JavaScript Drag and Drop</title>
+	</head>
+	<body>
+<%		needed_header() %>
+		<div content>
+			<h1>JavaScript Drag and Drop</h1>
+
+			<p>The standard HTML drag and drop API is a disgusting mess, as one would expect from modern standards.  But here modern programmers have managed to reach a new low.  This API doesn't work at all on mobile, making it completely useless.</p>
+
+			<p>There are a number of third party JavaScript drag and drop libraries like <a href="https://interactjs.io/">interact.js</a> and <a href="https://draggabilly.desandro.com/">Draggabilly</a>.  Of course these don't work, since they are modern code.  interact.js is the least bad of them, but its drop functionality breaks if you modify the DOM.</p>
+
+			<p>Writing a decent JavaScript drag and drop library shouldn't be hard for a reactionary programmer.  And I would use it for a number of projects.</p>
+		</div>
+	</body>
+</html>
+<%
+end
--- a/src/needed.html.luan	Fri Dec 02 17:11:31 2022 -0700
+++ b/src/needed.html.luan	Fri Dec 23 15:31:50 2022 -0700
@@ -22,6 +22,7 @@
 			<h1>Needed Reactionary Software</h1>
 			<ul links>
 				<li><a href="/lucene.html">Lucene Fork</a></li>
+				<li><a href="/drag.html">JavaScript Drag and Drop</a></li>
 				<li><a href="/freedit.html">FreedIt - A Reddit Alternative</a></li>
 				<li><a href="/wysiwyg.html">WYSIWYG Web Editor</a></li>
 			</ul>