Make style

master
Hume2 2020-01-29 14:36:15 +01:00
parent 26ebf26042
commit 5fdf91d176
9 changed files with 163 additions and 5 deletions

84
common.js Normal file
View File

@ -0,0 +1,84 @@
p_text = 0;
p_stranka = 1;
n_datum = 0;
n_text = 1;
menu=[
{label:"Home", target:"index"},
{label:"News", target:"news"},
{label:"World", target:"world"},
{label:"Tutorials", target:"tutorials"},
{label:"Screenshots", target:"screenshots"}
];
function ahref(str,txt){
document.write("<a href=\"");
document.write(str+".html\"");
document.write(">"+txt+"</a>");
}
function br(){
document.write("<br>");
}
function start_page(root){
document.write("<head>");
document.write("<title>Tunnelers' Abyss</title>");
document.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">");
document.write("<meta name=\"descreption\" content=\"A Minetest server by Hume2, CalebJ and Coram\">");
document.write("<meta name=\"author\" content=\"Hume2\">");
document.write("<link rel=stylesheet href=\""+root+"style.css\" type=\"text/css\" title=\"styl\">");
document.write("</head><body><br>");
document.write("<center><a href=\""+root+"index.html\"><img src=\""+root+"style/logo.png\" alt=\"Tunnelers' Abyss\" title=\"logo\" width=\"50%\" margins=-10></a></center><br>");
document.write("<table width=\"75%\" class=main align=center>");
document.write("<tr>");
size = 0;
for (var i in menu){
document.write("<th class=menu background=\""+root+"style/bg4.png\">");
ahref(root + menu[i].target, menu[i].label);
document.write("</th>");
size++;
}
document.write("</tr>");
document.write("<tr><td class=main colspan="+size+" background=\""+root+"style/bg3.png\">");
}
function end_page(){
document.write("</td></tr></table></body>");
}
function image(txt, img, mini, width="200px") {
if (typeof mini == "undefined") {
mini = img;
}
document.write("<table class=image width=\"" + width + "\"><tr><td>");
document.write("<a href=\"" + img + "\">");
document.write("<img src=\"" + mini + "\" width=\"" + width + "\">");
document.write("</a><br><small>");
document.write(txt);
document.write("</small></td></tr></table>");
}
function galery(images, height) {
document.write("<center><br>");
for (var i in images) {
if (typeof images[i].mini == "undefined") {
images[i].mini = images[i].img;
}
document.write("<a href=\"" + images[i].img + "\">");
document.write("<table class=\"galery\" width=\"" + height + "\">");
document.write("<tr><td align=center valign=middle height=\"" + height + "\">");
document.write("<img src=\"");
document.write(images[i].mini);
document.write("\" style=\"max-height:" + height + "; max-width:" + height + ";\"></td></tr><tr><td><center>");
document.write(images[i].txt);
document.write("</center></td></tr></table></a>");
}
document.write("<br clear=all></center>");
}

View File

@ -1,8 +1,28 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body> Hello world! </body>
</html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<script language=javascript src=common.js></script>
<script language=javascript>
start_page(""); //path to root direction
</script>
<h1>Welcome to Tunnelers' Abyss!</h1>
<p>
Welcome to Tunnelers Abyss! Relaxing and fun, with a great and Kid-Friendly community. Mods include: epic landscapes, custom mobs, fossils, trains, mini-worlds, lots of shapes for builders, and many many more.
<p>
Our server is kid-friendly™. Some skins from the database are modified accordingly.
<h2>IP: 37.46.208.34:30000</h2>
<big>
<a href=https://discord.gg/UUVAQBr>Discord Server</a> <br>
<a href=https://forum.minetest.net/viewtopic.php?f=10&t=22705>Minetest Forum Thread</a>
</big>
<script language=javascript>
end_page();
</script>
</html>

BIN
style.css Normal file

Binary file not shown.

BIN
style/bg1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
style/bg2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

BIN
style/bg3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
style/bg4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
style/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

54
template.html Normal file
View File

@ -0,0 +1,54 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<script language=javascript src=common.js></script>
<script language=javascript>
start_page(""); //path to root direction
</script>
<h1>Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>
<h4>Header 4</h4>
<script language=javascript>
image("Example image", "style/bg1.png", "style/bg1.png");
</script>
<p>
This is a template of a page. Feel free to copy elements from this page.
<p>
Our colour scheme is:
<ul>
<li> <font color=#671C14>#671C14</font> - alternative background
<li> <font color=#2D8FCE>#2D8FCE</font> - header 2
<li> <font color=#54CCC1>#54CCC1</font> - header 1, links
<li> <font color=#CD5932>#CD5932</font> - header 3
<li> <font color=#5F5346>#5F5346</font> - background
</ul>
<p>
Use &lt;br clear=all&gt; to get rid of trailing pictures.
<br clear=all>
<p>
Example gallery:
<script language=javascript>
images = [
{img:"style/bg1.png", txt:"Top Background"},
{img:"style/bg2.png", txt:"Periodic Background"},
{img:"style/bg3.png", txt:"Table Background"},
{img:"style/logo.png", txt:"Server Logo"},
];
galery(images, "200px");
</script>
<script language=javascript>
end_page();
</script>
</html>