Added modinfo.html

master
NoahPeeters 2017-02-02 14:28:31 +01:00
parent e50fccaacc
commit 031d7c5719
4 changed files with 60 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

View File

@ -132,7 +132,7 @@ input[type="checkbox"] + label {
}
input[type="checkbox"] + label a {
position: relative;;
position: relative;
left: 10px;
}

8
modinfo.css Normal file
View File

@ -0,0 +1,8 @@
.mod_author {
font-size: 15px;
}
#mod_img {
width: 50%;
margin-bottom: 20px;
}

50
modinfo.html Normal file
View File

@ -0,0 +1,50 @@
<html>
<head>
<link rel="stylesheet" href="main.css"/>
<link rel="stylesheet" href="modinfo.css"/>
<script>
function getQueryParams(qs) {
qs = qs.split('+').join(' ');
var params = {},
tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
}
return params;
}
function showContent() {
var modData = getQueryParams(document.location.search).data.split(":::");
// 0: name
// 1: zipURL
// 2: author
// 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];
}
</script>
</head>
<body onload="showContent();">
<div class="header">
<h1 id="name">Minetest Modinstaller</h1>
</div>
<div class="content">
<div style="text-align: center;">
<img id="mod_img" src="" />
<div id="description"></div>
<br>
<div class="mod_author">
Author: <span id="author"></span>
</div>
</div>
</div>
</body>
</html>