comparison src/drag.html.luan @ 29:a04ef87cf4a0

drag and drop
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 23 Dec 2022 15:31:50 -0700
parents src/wysiwyg.html.luan@e287c82a81e5
children
comparison
equal deleted inserted replaced
28:c6a350363bb6 29:a04ef87cf4a0
1 local Luan = require "luan:Luan.luan"
2 local error = Luan.error
3 local Io = require "luan:Io.luan"
4 local Http = require "luan:http/Http.luan"
5 local Shared = require "site:/lib/Shared.luan"
6 local head = Shared.head or error()
7 local needed_header = Shared.needed_header or error()
8
9
10 return function()
11 Io.stdout = Http.response.text_writer()
12 %>
13 <!doctype html>
14 <html>
15 <head>
16 <% head() %>
17 <title>Reactionary Software - JavaScript Drag and Drop</title>
18 </head>
19 <body>
20 <% needed_header() %>
21 <div content>
22 <h1>JavaScript Drag and Drop</h1>
23
24 <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>
25
26 <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>
27
28 <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>
29 </div>
30 </body>
31 </html>
32 <%
33 end