3
|
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() %>
|
29
|
17 <title>Reactionary Software - JavaScript Drag and Drop</title>
|
15
|
18 </head>
|
3
|
19 <body>
|
|
20 <% needed_header() %>
|
|
21 <div content>
|
29
|
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>
|
3
|
25
|
29
|
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>
|
3
|
27
|
29
|
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>
|
3
|
29 </div>
|
|
30 </body>
|
|
31 </html>
|
|
32 <%
|
|
33 end
|