More modinfos

Better robot check
Updated modinfo check
master
byYottaFLOPS 2017-02-04 20:08:01 +01:00
parent 91ba276063
commit 2e986da841
5 changed files with 177 additions and 141 deletions

View File

@ -2,6 +2,7 @@
<head>
<script src='https://www.google.com/recaptcha/api.js'></script>
<link rel="stylesheet" href="main.css"/>
<link rel="stylesheet" href="form.css"/>
<script>
function sendMessage() {
@ -69,12 +70,12 @@
<div class="no-robot" onclick="robot();">
<input type="checkbox" class="robot-check" id="robot-check" checksum="k3jabsd2asd3uibash3dva9skjhd5uzf6gcvkehj1wdhqwz7qvusjdh8b">
<label for="robot-check">
<box></box>
<span class="checkmark">
<div class="checkmark_stem"></div>
<div class="checkmark_kick"></div>
</span>
<a>I am not a robot</a>
<box></box>
<a>I'm not a robot</a>
</label>
</div>
</td>

126
form.css Normal file
View File

@ -0,0 +1,126 @@
.form {
width: 100%;
}
tr {
width: 100%;
}
.first {
width: 20%;
text-align: right;
font-size: 20px;
padding: 10px;
}
input {
border-radius: 10px;
border-width: 1px;
border-style: solid;
border-color: black;
height: 30px;
width: 100%;
font-size: 20px;
padding-left: 10px;
}
textarea {
border-radius: 10px;
border-width: 1px;
height: 100px;
width: 100%;
font-size: 20px;
padding-left: 10px;
}
.second {
width: 80%;
font-size: 20px;
}
.no-robot {
background-color: white;
border-radius: 2px;
border-color: #999;
border-style: solid;
border-width: 1px;
width: 250px;
height: 44px;
padding: 10px;
text-align: left;
}
input[type="checkbox"] {
display: none;
}
input[type="checkbox"] + label {
color: #333;
}
input[type="checkbox"] + label a {
position: relative;
left: -49px;
}
input[type="checkbox"] + label span {
/*display: none;*/
display: inline-block;
vertical-align: middle;
}
input[type="checkbox"] + label box {
display: inline-block;
vertical-align: middle;
cursor: pointer;
}
input[type="checkbox"]:checked + label a {
/*left: -39px;*/
}
input[type="checkbox"]:checked + label span {
display: inline-block;
position: relative;
vertical-align: middle;
cursor: pointer;
z-index: 1
}
input[type="checkbox"]:checked + label box {
/*left: -49px;*/
z-index: 0;
}
box {
position: relative;
left: -49;
width: 44px;
height: 44px;
border: 1px solid #555;
background-color: white;
}
.checkmark {
width: 44px;
height: 44px;
transform: rotate(45deg);
}
.checkmark_stem {
position: absolute;
width: 6px;
height: 18px;
background-color: #3e3;
left: 22px;
top: 12px;
}
.checkmark_kick {
position: absolute;
width: 6px;
height: 6px;
background-color:#3e3;
left: 16px;
top: 24px;
}

123
main.css
View File

@ -71,129 +71,6 @@ a {
box-sizing: border-box;
}
.form {
width: 100%;
}
tr {
width: 100%;
}
.first {
width: 20%;
text-align: right;
font-size: 20px;
padding: 10px;
}
input {
border-radius: 10px;
border-width: 1px;
border-style: solid;
border-color: black;
height: 30px;
width: 100%;
font-size: 20px;
padding-left: 10px;
}
textarea {
border-radius: 10px;
border-width: 1px;
height: 100px;
width: 100%;
font-size: 20px;
padding-left: 10px;
}
.second {
width: 80%;
font-size: 20px;
}
.no-robot {
background-color: white;
border-radius: 2px;
border-color: #999;
border-style: solid;
border-width: 1px;
width: 250px;
height: 44px;
padding: 10px;
text-align: left;
}
input[type="checkbox"] {
display: none;
}
input[type="checkbox"] + label {
color: #333;
}
input[type="checkbox"] + label a {
position: relative;
left: 10px;
}
input[type="checkbox"] + label span {
display: none;
}
input[type="checkbox"] + label box {
display: inline-block;
vertical-align: middle;
cursor: pointer;
}
input[type="checkbox"]:checked + label a {
left: -38px;
}
input[type="checkbox"]:checked + label span {
display: inline-block;
position: relative;
left: -49px;
vertical-align: middle;
cursor: pointer;
}
input[type="checkbox"]:checked + label box {
}
box {
position: relative;
left: 0;
width: 44px;
height: 44px;
border: 1px solid #555;
}
.checkmark {
width: 44px;
height: 44px;
transform: rotate(45deg);
}
.checkmark_stem {
position: absolute;
width: 6px;
height: 18px;
background-color: #3e3;
left: 22px;
top: 12px;
}
.checkmark_kick {
position: absolute;
width: 6px;
height: 6px;
background-color:#3e3;
left: 16px;
top: 24px;
}
@media only screen and (min-width: 715px) {
.header {
top: 0;

View File

@ -25,9 +25,9 @@
// 3: image url
// 4: description
document.getElementById("name").innerHTML = modData[0];
document.getElementById("author").innerHTML = modData[2];
document.getElementById("mod_img").src = modData[3];
document.getElementById("description").innerHTML = modData[4];
document.getElementById("author").innerHTML = modData[4];
document.getElementById("mod_img").src = modData[5];
document.getElementById("description").innerHTML = modData[6];
}
</script>
</head>

View File

@ -1,8 +1,9 @@
<html>
<head>
<script src='https://www.google.com/recaptcha/api.js'></script>
<link rel="stylesheet" href="main.css"/>
<link rel="stylesheet" href="form.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="notify.js"></script>
<script>
function sendMessage() {
var send = true;
@ -42,6 +43,12 @@
} else {
document.getElementById('ziplink').style.borderColor = '#000000';
}
if (document.getElementById('folder').value === '') {
send = false;
document.getElementById('folder').style.borderColor = '#FF4444';
} else {
document.getElementById('folder').style.borderColor = '#000000';
}
if (document.getElementById('robot-check').checksum != 'stfh1tr8fh6srtf56hnbrtsfxhb1rtx81fh5tr1xf6gh15xnrtf51hgnft') {
send = false;
}
@ -52,6 +59,11 @@
var description = document.getElementById('description').value;
var imagelink = document.getElementById('imagelink').value;
var ziplink = document.getElementById('ziplink').value;
var folder = document.getElementById('folder').value;
var library = '0';
if (document.getElementById('library').checked) {
library = '1';
}
var other = document.getElementById('other').value;
var pack = document.getElementById('package').value;
@ -62,10 +74,12 @@
+ '|Description: ' + description
+ '|Link to image: ' + imagelink
+ '|Link to zip: ' + ziplink
+ '|Foldername in zip: ' + folder
+ '|As library: ' + library
+ '|Other: ' + other
+ '|Package: ' + pack
+ '||Here is the line that will be added to the index list in the Github repository:|'
+ title + ':::' + ziplink + ':::' + name + ':::' + imagelink + ':::' + description
+ title + ':::' + ziplink + ':::' + folder + ':::' + library + ':::' + name + ':::' + imagelink + ':::' + description
+ '||Here is a link to this file: https://github.com/DevsWithoutHobbies/minetest-modinstaller-data/blob/master/index'
+ '||If everything seems fine, you can add it.||Sincerly yours|TOTALLY NOT A BOT';
}
@ -97,35 +111,53 @@
<table class="form">
<tr>
<td class="first">Author/-s</td>
<td class="second"><input type="text" id="name"/></td>
<td class="second"><input type="text" id="name" placeholder="Comma separated list of names"></td>
</tr>
<tr>
<td class="first">E-Mail (Not public)</td>
<td class="second"><input type="mail" id="email"/></td>
<td class="second"><input type="mail" id="email" placeholder="Contact e-mail"/></td>
</tr>
<tr>
<td class="first">Mod title</td>
<td class="second"><input type="text" id="title"/></td>
<td class="second"><input type="text" id="title" placeholder="Will be the name in the list in the modinstaller"/></td>
</tr>
<tr>
<td class="first">Description</td>
<td class="second"><textarea type="text" id="description"></textarea></td>
<td class="second"><textarea type="text" id="description" placeholder="Describe your mod as good as possible and as short as possible"></textarea></td>
</tr>
<tr>
<td class="first">Link to image</td>
<td class="second"><input type="url" id="imagelink"/></td>
<td class="second"><input type="url" id="imagelink" placeholder="Image that depicts your mod well"/></td>
</tr>
<tr>
<td class="first">Link to .zip</td>
<td class="second"><input type="url" id="ziplink"/></td>
<td class="second"><input type="url" id="ziplink" placeholder="URL to latest stable version"/></td>
</tr>
<tr>
<td class="first">Foldername in zip</td>
<td class="second"><input type="text" id="folder" placeholder="Relative path in the zip file"/></td>
</tr>
<tr>
<td class="first">As library</td>
<td class="second">
<input type="checkbox" id="library"/>
<label for="library">
<span class="checkmark">
<div class="checkmark_stem"></div>
<div class="checkmark_kick"></div>
</span>
<box></box>
<a>Won't be show in list. Will only be installed as dependency.</a>
</label>
</td>
</tr>
<tr>
<td class="first">Other information (optional)<br>(Not public)</td>
<td class="second"><textarea type="text" id="other"></textarea></td>
<td class="second"><textarea type="text" id="other" placeholder="Private message to the modinstaller admins"></textarea></td>
</tr>
<tr>
<td class="first">Package name (optional)</td>
<td class="second"><input type="text" id="package"/></td>
<td class="second"><input type="text" id="package" placeholder="Leave blank for simple mod"></td>
</tr>
<tr>
<td class="first"></td>
@ -133,12 +165,12 @@
<div class="no-robot" onclick="robot();">
<input type="checkbox" class="robot-check" id="robot-check" checksum="k3jabsd2asd3uibash3dva9skjhd5uzf6gcvkehj1wdhqwz7qvusjdh8b">
<label for="robot-check">
<box></box>
<span class="checkmark">
<div class="checkmark_stem"></div>
<div class="checkmark_kick"></div>
</span>
<a>I am not a robot</a>
<box></box>
<a>I'm not a robot</a>
</label>
</div>
</td>