annotate src/examples/simple.html @ 6:4d699321068f

add dropzones
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 23 Apr 2023 18:34:12 -0600
parents 6d5e4b38b4fb
children 332d3e280f7e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 <!doctype html>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 <html>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 <head>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 <meta name="viewport" content="width=device-width, initial-scale=1">
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 <style>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 @import "/site.css";
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 @import "/dad.css";
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 span[drag] {
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 display: inline-block;
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 background-color: LightGreen;
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 padding: 8px;
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 }
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 </style>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 <script src="/dad.js"></script>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 <script>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 function init() {
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 let span = document.querySelector('span[drag]');
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 dad.setDraggable(span);
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 }
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 </script>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 </head>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 <body>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 <h1>Simple</h1>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 <p><span drag>drag me</span></p>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 <p>bottom</p>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 </body>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 <script> init(); </script>
6d5e4b38b4fb start drag
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 </html>