forked from Procedurally-Generated-Human/Tier-List-Maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
123 lines (98 loc) · 4.14 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DnD</title>
</head>
<body>
<div class="list" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div class="letter s" ><h1>S</h1></div>
<div class="list" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div class="letter a" ><h1>A</h1></div>
<div class="list" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div class="letter b" ><h1>B</h1></div>
<div class="list" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div class="letter c" ><h1>C</h1></div>
<div class="list" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div class="letter d" ><h1>D</h1></div>
<div class="list" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div class="letter e" ><h1>E</h1></div>
<div class="list" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div class="letter f" ><h1>F</h1></div>
<div class="deposit" ondrop="drop(event)" ondragover="allowDrop(event)">
<img id="drag1" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Instagram_logo_2016.svg/2048px-Instagram_logo_2016.svg.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag2" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Facebook_logo_36x36.svg/2048px-Facebook_logo_36x36.svg.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag3" src="https://www.reddiquette.com/wp-content/uploads/2020/09/What-Is-The-Reddit-Logo-Called.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag4" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/WhatsApp_logo-color-vertical.svg/2048px-WhatsApp_logo-color-vertical.svg.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag5" src="https://cdn.icon-icons.com/icons2/2699/PNG/512/youtube_logo_icon_168737.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag6" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Telegram_logo.svg/1024px-Telegram_logo.svg.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag7" src="https://upload.wikimedia.org/wikipedia/sco/thumb/9/9f/Twitter_bird_logo_2012.svg/1200px-Twitter_bird_logo_2012.svg.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag8" src="https://upload.wikimedia.org/wikipedia/commons/0/08/Pinterest-logo.png" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag9" src="https://cdn.worldvectorlogo.com/logos/tiktok-logo-2--1.svg" draggable="true" ondragstart="drag(event)" height="100%">
<img id="drag10" src="https://m.media-amazon.com/images/M/MV5BZjkwMzlhZDktYjU2NC00OWI3LTgxMmItOTVmNGMxZWQ0Y2Y3XkEyXkFqcGdeQXVyNjc1MjM1MzI@._V1_.jpg" draggable="true" ondragstart="drag(event)" height="100%">
</div>
<style>
body {
background-color: black;
}
.list {
border: 2px solid black;
width: 93%;
height: 10%;
float: right;
background-color: #1c1c1b;
}
.letter {
border: 2px solid black;
width: 7%;
height: 10%;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}
.letter.s {
background-color: #ed6161;
}
.letter.a {
background-color: #f5a647;
}
.letter.b {
background-color: #eddc6d;
}
.letter.c {
background-color: #a5ed74;
}
.letter.d {
background-color: #58cded;
}
.letter.e {
background-color: #7841d1;
}
.letter.f {
background-color: #e652eb;
}
.deposit {
border: 2px solid black;
left: 0;
height: 23%;
}
</style>
<script>
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
var target = ev.target;
// Only append the dragged element if the target is the intended container
if (target.classList.contains('list') || target.classList.contains('deposit')) {
target.appendChild(document.getElementById(data));
}
}
</script>
</body>
</html>