-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
154 lines (137 loc) · 5.98 KB
/
index.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>The Picker</title>
<link rel="apple-touch-icon" sizes="512x512" href="favicon.png" />
<meta name="msapplication-TileImage" content="favicon.png">
<meta name="msapplication-TileColor" content="#ffe7dc">
<meta name="theme-color" content="#ffe7dc">
<!-- Social Media Meta -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="favicon.png">
<meta name="twitter:image:secure_url" content="favicon.png"/>
<meta property="og:image" content="favicon.png">
<meta property="og:image:secure_url" content="favicon.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="512">
<meta property="og:image:height" content="512">
<link rel="icon" sizes="512x512" href="favicon.png" />
<link href="favicon.ico" type="image/x-icon" rel="icon" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon" />
<style>
/*.move-area {
height: 100vh;
}*/
.move-area-inner {
width: 70px;
top: 55px;
left: 50%;
margin-left: -29px;
transform: scale(0.65);
}
.eye {
position: relative;
display: inline-block;
border-radius: 50%;
height: 30px;
width: 30px;
background: #936e55;
box-shadow: inset 0 0 0 3px #342929;
/* box-shadow: inset 0 0 2px 3px #342929, 0 0 4px 1px #342929;*/
}
.eye:first-child { left: -3px; }
.eye:last-child { left: 10px; }
.eye:after {
position: absolute;
bottom: 14px;
right: 8px;
width: 14px;
height: 14px;
background: #1e1717;
border-radius: 50%;
content: " ";
}
</style>
</head>
<body style="background: url(bg.png) repeat center center;">
<section class="move-area">
<h1 class="my-3 text-center" style="opacity: 0.9;min-height: 120px;">
<img src="logo.png" alt="Sculprit" style="width: 120px;height: auto;">
</h1>
<div class="move-area-inner position-absolute d-none">
<div class="eye" style="transform: rotate(115.236deg);"></div>
<div class="eye" style="transform: rotate(115.236deg);"></div>
</div>
<div class="card mb-3 mx-auto" style="max-width: 340px;">
<div class="row no-gutters">
<div class="col-12">
<div class="card-body">
<h4 class="card-title text-center">The Picker</h4>
<p class="card-text">The Picker picks one random item from any list you input into the textarea below.</p>
<input id="inputResult" class="form-control text-center" title="Empty..." type="text" placeholder="Empty..." readonly="" style="font-size: 14pt;">
<form id="randompick">
<div class="form-group mt-4 text-center">
<textarea class="form-control" rows="9" id="listInput" placeholder="Type or paste a list here..."></textarea>
</div>
<button type="Submit" id="btnRun" class="btn btn-dark btn-block btn-lg" style="background-color: #543b36;">Run!</button>
</form>
<p class="card-text mt-2">
<small class="text-muted">Developed by</small>
<a href="https://www.lionbytes.net" target="_blank" rel="noreferrer">
<picture>
<source srcset="https://ramz.info/src/images/lionbytes.webp" type="image/webp">
<source srcset="https://ramz.info/src/images/lionbytes.png" type="image/png">
<img src="https://ramz.info/src/images/lionbytes.png" alt="Lionbytes" title="Lionbytes" style="height: 20px;width: auto;margin: 2px -7px 0;image-rendering: -webkit-optimize-contrast;">
</picture>
</a>
</p>
</div>
</div>
</div>
</div>
</section>
<!-- <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> -->
<script>
const input = document.querySelector("#listInput");
const result = document.querySelector("#inputResult");
const randompick = document.querySelector("#randompick");
randompick.addEventListener('submit', (event) => {
'use strict';
event.preventDefault();
if (input.value && input.value !== "") {
const itemarray = input.value.split('\n');
const i = Math.floor( Math.random() * (itemarray.length) );
let filtered = itemarray.filter(function (el) {
return el != "";
});
result.value = filtered[i];
result.title = filtered[i];
} else {
result.value = "";
result.title = "Empty...";
}
});
</script>
<!-- <script>
$(".move-area").mousemove(function(event) {
var eye = $(".eye");
console.log('eye', eye)
var x = (eye.offset().left) + (eye.width() / 2);
var y = (eye.offset().top) + (eye.height() / 2);
var rad = Math.atan2(event.pageX - x, event.pageY - y);
var rot = (rad * (180 / Math.PI) * -1) + 180;
eye.css({
'-webkit-transform': 'rotate(' + rot + 'deg)',
'-moz-transform': 'rotate(' + rot + 'deg)',
'-ms-transform': 'rotate(' + rot + 'deg)',
'transform': 'rotate(' + rot + 'deg)'
});
});
</script> -->
</body>
</html>