First stab at website
This commit is contained in:
parent
05dfc4c340
commit
b44bf32578
20
deploy.sh
20
deploy.sh
|
@ -42,15 +42,15 @@ fi
|
|||
cp console2web/console2web.py /usr/bin/console2web
|
||||
|
||||
# Deploy the game servers
|
||||
$(dirname "$0")/scripts/deploy_supertuxkart.sh
|
||||
$(dirname "$0")/scripts/deploy_bzflag.sh
|
||||
$(dirname "$0")/scripts/deploy_hedgewars.sh
|
||||
$(dirname "$0")/scripts/deploy_mindustry.sh
|
||||
$(dirname "$0")/scripts/deploy_openhv.sh
|
||||
$(dirname "$0")/scripts/deploy_openspades.sh
|
||||
$(dirname "$0")/scripts/deploy_teeworlds.sh
|
||||
$(dirname "$0")/scripts/deploy_unvanguished.sh
|
||||
$(dirname "$0")/scripts/deploy_xonotic.sh
|
||||
"$(dirname "$0")"/scripts/deploy_supertuxkart.sh
|
||||
"$(dirname "$0")"/scripts/deploy_bzflag.sh
|
||||
"$(dirname "$0")"/scripts/deploy_hedgewars.sh
|
||||
"$(dirname "$0")"/scripts/deploy_mindustry.sh
|
||||
"$(dirname "$0")"/scripts/deploy_openhv.sh
|
||||
"$(dirname "$0")"/scripts/deploy_openspades.sh
|
||||
"$(dirname "$0")"/scripts/deploy_teeworlds.sh
|
||||
"$(dirname "$0")"/scripts/deploy_unvanguished.sh
|
||||
"$(dirname "$0")"/scripts/deploy_xonotic.sh
|
||||
|
||||
# Web dashboard
|
||||
systemctl enable --now nginx
|
||||
|
@ -60,3 +60,5 @@ firewall-cmd --zone=public --add-service=https --permanent
|
|||
firewall-cmd --reload
|
||||
|
||||
certbot -n --nginx -d ${LINODE_ID} -d www.${LINODE_ID} --agree-tos -m jarno@jarno.ca
|
||||
|
||||
cp -r "$(dirname "$0")"/website/* /var/www/html
|
||||
|
|
|
@ -37,7 +37,7 @@ After=network.target
|
|||
|
||||
[Service]
|
||||
WorkingDirectory=${xonotic_directory}
|
||||
ExecStart=/usr/bin/console2web -p 62550 ${xonotic_directory}daemonded -pakpath ${unvanquished_directory}/share/pkg/ -libpath ${unvanquished_directory}/bin/ -homepath \${HOME}/unvanguished_home/ +exec unvanguished.cfg
|
||||
ExecStart=/usr/bin/console2web -p 62550 ${xonotic_directory}/daemonded -pakpath ${unvanquished_directory}/share/pkg/ -libpath ${unvanquished_directory}/bin/ -homepath \${HOME}/unvanguished_home/ +exec unvanguished.cfg
|
||||
Restart=on-failure
|
||||
User=${systemuser}
|
||||
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Game server</title>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/terminal.css">
|
||||
<script src="js/mindustry.js" charset="utf-8"></script>
|
||||
<script src="js/unvanguished.js" charset="utf-8"></script>
|
||||
<script src="js/xonotic.js" charset="utf-8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="container">
|
||||
<header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom">
|
||||
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
|
||||
<img class="bi me-2" width="40" height="32" src="img/blackmage.svg">
|
||||
<span class="fs-4">Play.jarno.ca</span>
|
||||
</a>
|
||||
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item"><a href="index.html" class="nav-link" aria-current="page">Home</a></li>
|
||||
<li class="nav-item"><a href="tournament.html" class="nav-link">Tournament</a></li>
|
||||
<li class="nav-item"><a href="schedule.html" class="nav-link">Schedule</a></li>
|
||||
<li class="nav-item"><a href="admin.html" class="nav-link active">Admin</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4>Mindustry</h4>
|
||||
<div id="mindustry_output">
|
||||
<p>Mindustry console</p>
|
||||
</div>
|
||||
<form id="mindustry_form" onsubmit="return false;"><input id="mindustry_command" size="80" autocomplete="off"></input><button id="mindustry_submit">Enter</button></form>
|
||||
|
||||
<h4>Unvanguished</h4>
|
||||
<div id="unvanguished_output">
|
||||
<p>Unvanguished console</p>
|
||||
</div>
|
||||
<form id="unvanguished_form" onsubmit="return false;"><input id="unvanguished_command" size="80" autocomplete="off"></input><button id="unvanguished_submit">Enter</button></form>
|
||||
|
||||
<h4>Xonotic</h4>
|
||||
<div id="xonotic_output">
|
||||
<p>Xonotic console</p>
|
||||
</div>
|
||||
<form id="xonotic_form" onsubmit="return false;"><input id="xonotic_command" size="80" autocomplete="off"></input><button id="xonotic_submit">Enter</button></form>
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-md-4">
|
||||
<h5>Live stats</h5>
|
||||
<noscript>
|
||||
Live stuff requires JavaScript unfortunately
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,174 @@
|
|||
:root {
|
||||
--terminal-color-0: rgb(30,34,41);
|
||||
--terminal-color-1: rgb(237,21,21);
|
||||
--terminal-color-2: rgb(68,133,58);
|
||||
--terminal-color-3: rgb(246,116,192);
|
||||
--terminal-color-4: rgb(29,153,243);
|
||||
--terminal-color-5: rgb(155,89,182);
|
||||
--terminal-color-6: rgb(=26,188,156);
|
||||
--terminal-color-7: rgb(252,252,252);
|
||||
|
||||
--terminal-color-0-intense: rgb(127,140,141);
|
||||
--terminal-color-1-intense: rgb(192,57,43);
|
||||
--terminal-color-2-intense: rgb(50,100,44);
|
||||
--terminal-color-3-intense: rgb(253,188,75);
|
||||
--terminal-color-4-intense: rgb(61,174,233);
|
||||
--terminal-color-5-intense: rgb(142,68,173);
|
||||
--terminal-color-6-intense: rgb(22,160,133);
|
||||
--terminal-color-7-intense: rgb(255,255,255);
|
||||
|
||||
--terminal-color-default: rgb(23,168,139);
|
||||
--terminal-color-background: rgb(30,34,41);
|
||||
}
|
||||
|
||||
#mindustry_output {
|
||||
border: solid grey;
|
||||
background-color: var(--terminal-color-background);
|
||||
width: min(95%, 1024px);
|
||||
height: 40em;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
#mindustry_output p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
white-space: pre-wrap;
|
||||
/* word-break: break-all; */
|
||||
color: var(--terminal-color-default);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#mindustry_command {
|
||||
width: calc(min(95%, 1024px) - 10em);
|
||||
}
|
||||
|
||||
#mindustry_submit {
|
||||
width: 10em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
text-shadow: 0;
|
||||
}
|
||||
|
||||
#unvanguished_output {
|
||||
border: solid grey;
|
||||
background-color: var(--terminal-color-background);
|
||||
width: min(95%, 1024px);
|
||||
height: 40em;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
#unvanguished_output p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
white-space: pre-wrap;
|
||||
/* word-break: break-all; */
|
||||
color: var(--terminal-color-default);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#unvanguished_command {
|
||||
width: calc(min(95%, 1024px) - 10em);
|
||||
}
|
||||
|
||||
#unvanguished_submit {
|
||||
width: 10em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
text-shadow: 0;
|
||||
}
|
||||
|
||||
#xonotic_output {
|
||||
border: solid grey;
|
||||
background-color: var(--terminal-color-background);
|
||||
width: min(95%, 1024px);
|
||||
height: 40em;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
#xonotic_output p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
white-space: pre-wrap;
|
||||
/* word-break: break-all; */
|
||||
color: var(--terminal-color-default);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#xonotic_command {
|
||||
width: calc(min(95%, 1024px) - 10em);
|
||||
}
|
||||
|
||||
#xonotic_submit {
|
||||
width: 10em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
text-shadow: 0;
|
||||
}
|
||||
|
||||
.TERM_FOREGROUND_0 {
|
||||
color: var(--terminal-color-0);
|
||||
}
|
||||
.TERM_FOREGROUND_1 {
|
||||
color: var(--terminal-color-1);
|
||||
}
|
||||
.TERM_FOREGROUND_2 {
|
||||
color: var(--terminal-color-2);
|
||||
}
|
||||
.TERM_FOREGROUND_3 {
|
||||
color: var(--terminal-color-3);
|
||||
}
|
||||
.TERM_FOREGROUND_4 {
|
||||
color: var(--terminal-color-4);
|
||||
}
|
||||
.TERM_FOREGROUND_5 {
|
||||
color: var(--terminal-color-5);
|
||||
}
|
||||
.TERM_FOREGROUND_6 {
|
||||
color: var(--terminal-color-6);
|
||||
}
|
||||
.TERM_FOREGROUND_7 {
|
||||
color: var(--terminal-color-7);
|
||||
}
|
||||
|
||||
.TERM_FOREGROUND_0_INTENSE {
|
||||
color: var(--terminal-color-0-intense);
|
||||
}
|
||||
.TERM_FOREGROUND_1_INTENSE {
|
||||
color: var(--terminal-color-1-intense);
|
||||
}
|
||||
.TERM_FOREGROUND_2_INTENSE {
|
||||
color: var(--terminal-color-2-intense);
|
||||
}
|
||||
.TERM_FOREGROUND_3_INTENSE {
|
||||
color: var(--terminal-color-3-intense);
|
||||
}
|
||||
.TERM_FOREGROUND_4_INTENSE {
|
||||
color: var(--terminal-color-4-intense);
|
||||
}
|
||||
.TERM_FOREGROUND_5_INTENSE {
|
||||
color: var(--terminal-color-5-intense);
|
||||
}
|
||||
.TERM_FOREGROUND_6_INTENSE {
|
||||
color: var(--terminal-color-6-intense);
|
||||
}
|
||||
.TERM_FOREGROUND_7_INTENSE {
|
||||
color: var(--terminal-color-7-intense);
|
||||
}
|
|
@ -0,0 +1,408 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="6.6145835mm"
|
||||
height="6.6145835mm"
|
||||
viewBox="0 0 6.6145835 6.6145835"
|
||||
version="1.1"
|
||||
id="svg100451"
|
||||
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
|
||||
sodipodi:docname="blackmage.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview100453"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="22.627417"
|
||||
inkscape:cx="4.8613591"
|
||||
inkscape:cy="13.523417"
|
||||
inkscape:window-width="1540"
|
||||
inkscape:window-height="862"
|
||||
inkscape:window-x="722"
|
||||
inkscape:window-y="34"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer3" />
|
||||
<defs
|
||||
id="defs100448" />
|
||||
<g
|
||||
inkscape:label="Laag 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-115.94271,-125.8427)"
|
||||
style="display:none;opacity:0.355982">
|
||||
<image
|
||||
width="6.6145835"
|
||||
height="6.6145835"
|
||||
preserveAspectRatio="none"
|
||||
style="image-rendering:optimizeSpeed"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB
|
||||
IElEQVRIia2VQRKCMAxFfxwvVZf2Bnoc1h5Hb1CXcqy4YAohJGlF/kwHKMx/SdMUYmbGASIiAIBl
|
||||
dz7MvCzPGvQXhIhmcwB4ve3vdkF09BVwfxywXJ55SyakmmlF5l4WJkSvs6We6EMIM4OI8BzW87fr
|
||||
+v4XEHl9IpcsAkYFb0IsmAWsikAhRO4mytv3GuiB/oJYMBPEjgBwKtO1Nep3z2Ea2taE/ALQICvu
|
||||
sONTmdIeM23mPHXVRNbhAtvQgo55e/qaEN3tlNeRV3MvGw90kg/M7O6iMbePG0/usQIsEX9AwE4A
|
||||
oDKRSoXn5fFq06vu/0nUjEBceDcTYJ1NKjwPubt6FEI0aK+aEAmSWUnwmAmpsPtHNZux1dXSvELl
|
||||
nK7NF18iI9LSnZznAAAAAElFTkSuQmCC
|
||||
"
|
||||
id="image100814"
|
||||
x="115.94271"
|
||||
y="125.8427" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Laag 2"
|
||||
style="display:inline;opacity:1">
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107655"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="1.0583333"
|
||||
y="1.5875" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.648093"
|
||||
id="rect107737"
|
||||
width="1.5875"
|
||||
height="0.26458332"
|
||||
x="1.3229166"
|
||||
y="1.3229166" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect107739"
|
||||
width="0.52916664"
|
||||
height="0.26458332"
|
||||
x="2.9104166"
|
||||
y="1.0583333" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect107741"
|
||||
width="0.52916664"
|
||||
height="0.26458332"
|
||||
x="3.4395833"
|
||||
y="0.79374993" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107743"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="3.96875"
|
||||
y="0.52916658" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect107745"
|
||||
width="0.52916664"
|
||||
height="0.26458332"
|
||||
x="4.2333331"
|
||||
y="0.26458323" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect107747"
|
||||
width="0.52916664"
|
||||
height="0.26458332"
|
||||
x="4.7624998"
|
||||
y="-1.1920929e-07" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect107749"
|
||||
width="0.26458332"
|
||||
height="0.52916664"
|
||||
x="5.2916665"
|
||||
y="0.2645832" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect107751"
|
||||
width="0.26458332"
|
||||
height="0.52916664"
|
||||
x="5.0270834"
|
||||
y="0.79374981" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.458271"
|
||||
id="rect107753"
|
||||
width="0.26458332"
|
||||
height="0.79374999"
|
||||
x="4.7625003"
|
||||
y="1.3229165" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107755"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="4.4979172"
|
||||
y="2.1166666" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107757"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="4.7625003"
|
||||
y="2.3812499" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107759"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="5.0270834"
|
||||
y="2.6458333" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107761"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="5.2916665"
|
||||
y="2.9104166" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107763"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="5.5562496"
|
||||
y="3.175" />
|
||||
<path
|
||||
id="rect142063"
|
||||
style="fill:#39bdff;stroke-width:0.264583"
|
||||
d="m 1.5875002,3.4395833 h 0.2645831 l 3e-7,-0.2645833 h 3.1749993 v 0.2645833 l 5e-7,0.5291667 H 4.7625003 V 4.2333331 H 5.0270834 V 5.2916665 H 4.7625003 v 0.7937498 h 0.2645831 l 2e-7,0.2645829 0.2645829,2e-7 V 6.6145825 H 1.3229166 V 6.3499994 l 0.2645833,-10e-8 z"
|
||||
sodipodi:nodetypes="cccccccccccccccccccc" />
|
||||
<path
|
||||
id="rect107765"
|
||||
style="stroke-width:0.374177"
|
||||
d="M 5.0270829,3.4395833 H 5.5562496 V 3.7041666 H 5.2916663 l 4e-7,0.2645834 H 5.0270833 l -4e-7,-0.2645834 z"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107866"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="4.7624998"
|
||||
y="3.175" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect107868"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="1.3229166"
|
||||
y="1.8520833" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect108293"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="4.7625003"
|
||||
y="3.96875" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.529166"
|
||||
id="rect108295"
|
||||
width="0.26458332"
|
||||
height="1.0583333"
|
||||
x="5.0270834"
|
||||
y="4.2333331" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.458271"
|
||||
id="rect108297"
|
||||
width="0.26458332"
|
||||
height="0.79374999"
|
||||
x="4.7625003"
|
||||
y="5.2916665" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect108299"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="5.0270834"
|
||||
y="6.0854163" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect108301"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="4.4979172"
|
||||
y="6.0854163" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect108303"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="5.2916665"
|
||||
y="6.3499994" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect108305"
|
||||
width="0.52916664"
|
||||
height="0.26458332"
|
||||
x="3.9687505"
|
||||
y="6.3499994" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect108307"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="3.7041674"
|
||||
y="6.0854163" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect108309"
|
||||
width="0.26458332"
|
||||
height="0.52916664"
|
||||
x="3.439584"
|
||||
y="5.5562496" />
|
||||
<path
|
||||
id="rect108311"
|
||||
style="stroke-width:0.591626"
|
||||
d="M 2.9104167,4.2333331 H 3.439584 V 5.5562497 H 3.1750007 l -0.5291674,3e-7 V 5.2916667 h 0.5291674 v -0.79375 h -0.264584 z"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect108697"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="2.6458333"
|
||||
y="4.4979167" />
|
||||
<path
|
||||
id="rect108699"
|
||||
style="stroke-width:0.458271"
|
||||
d="m 1.5875,2.1166666 h 0.79375 v 0.2645833 l 0.79375,1e-7 v 0.2645833 h 0.79375 v 0.2645834 h 0.5291667 v 0.5291666 l 0.2645831,-3.9e-6 2e-7,0.2645873 H 3.175 V 3.96875 H 2.38125 V 3.7041667 H 1.8520833 V 3.4395833 H 2.1166667 V 3.175 H 1.8520833 V 2.6458333 h 0.2645834 l -3.6e-6,-0.2645875 -0.5291667,-10e-8 z"
|
||||
sodipodi:nodetypes="ccccccccccccccccccccccccc" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect111069"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="1.5875002"
|
||||
y="3.175" />
|
||||
<path
|
||||
id="rect111071"
|
||||
style="stroke-width:0.458271"
|
||||
d="m 1.3229169,3.4395833 h 0.2645833 v 0.79375 H 1.0583333 V 3.96875 h 0.2645834 z"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect111609"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="0.79374993"
|
||||
y="4.2333331" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect111611"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="1.0583333"
|
||||
y="4.4979162" />
|
||||
<path
|
||||
id="rect111613"
|
||||
style="stroke-width:0.648093"
|
||||
d="m 1.3229166,4.7624993 0.5291667,7e-7 V 5.0270833 H 1.5875 l -10e-8,1.322916 H 1.3229166 Z"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect111923"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="1.0583333"
|
||||
y="6.3499994" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect111925"
|
||||
width="0.26458332"
|
||||
height="0.52916664"
|
||||
x="1.8520833"
|
||||
y="4.2333331" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect111927"
|
||||
width="0.26458332"
|
||||
height="0.52916664"
|
||||
x="1.8520833"
|
||||
y="5.0270834" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect111929"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="2.1166666"
|
||||
y="5.5562501" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.264583"
|
||||
id="rect111931"
|
||||
width="0.26458332"
|
||||
height="0.26458332"
|
||||
x="2.3812499"
|
||||
y="5.8208332" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.374177"
|
||||
id="rect111933"
|
||||
width="0.52916664"
|
||||
height="0.26458332"
|
||||
x="2.6458333"
|
||||
y="6.0854163" />
|
||||
<rect
|
||||
style="fill:#000000;stroke-width:0.458271"
|
||||
id="rect111935"
|
||||
width="0.79374999"
|
||||
height="0.26458332"
|
||||
x="3.439584"
|
||||
y="3.96875" />
|
||||
<path
|
||||
id="rect147135"
|
||||
style="fill:#ffbd00;stroke-width:0.529166"
|
||||
d="m 1.0583333,4.2333331 0.5291669,2e-7 -2e-7,-0.2645833 h 0.2645833 l 10e-8,0.7937497 H 1.3229167 l -10e-8,-0.2645835 H 1.0583333 Z"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
id="path147866"
|
||||
style="fill:#ffbd00;stroke-width:0.529166"
|
||||
d="m 2.3812497,4.7624996 0.5291669,2e-7 -2e-7,-0.2645833 h 0.2645833 l 1e-7,0.7937497 H 2.6458331 l -10e-8,-0.2645835 H 2.3812497 Z"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
id="path151355"
|
||||
style="fill:#ad7b00;stroke-width:0.529166;fill-opacity:1"
|
||||
d="m 1.3229167,1.5875002 1.5874999,-2e-7 V 1.3229166 H 3.4395833 V 1.0583333 H 3.96875 V 0.79374993 H 4.2333331 V 0.52916658 H 4.7624998 V 0.26458323 l 0.5291667,-3e-8 v 0.52916661 l -0.2645762,-2e-8 -6.9e-6,0.52916671 H 4.7625003 V 2.1166666 H 4.4979172 V 2.3812499 H 4.7625003 V 2.6458333 H 5.0270834 V 2.9104166 H 5.2916665 V 3.175 H 5.5562496 V 3.4395833 H 5.0270829 V 3.175 H 4.4979167 V 2.9104167 H 3.96875 V 2.6458333 H 3.175 V 2.38125 l -0.79375,-1e-7 V 2.1166666 H 1.5875 V 1.8520833 H 1.3229167 Z"
|
||||
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccc" />
|
||||
<path
|
||||
id="path147872"
|
||||
style="fill:#ffbd00;stroke-width:0.529166"
|
||||
d="m 1.3229167,1.5875002 1.5874999,-2e-7 V 1.3229166 H 3.4395833 V 1.0583333 H 3.96875 V 0.79374993 H 4.2333331 V 0.52916658 H 4.7624998 V 0.26458323 l 0.5291667,-3e-8 2e-7,0.26458347 H 5.0270833 l 7e-6,0.26458312 L 4.7625,0.79375 V 1.0583333 H 4.2333333 v 0.2645834 l -0.5238095,-0.00485 -0.00536,0.2694265 H 3.4395833 V 1.8520833 H 3.7041667 V 2.1166667 H 4.2333333 V 2.38125 h -0.79375 V 2.1166667 h -0.79375 V 1.8520833 H 1.3229167 Z"
|
||||
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
|
||||
<rect
|
||||
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.374177"
|
||||
id="rect160539"
|
||||
width="0.26458332"
|
||||
height="0.52916664"
|
||||
x="2.3812499"
|
||||
y="2.6458333" />
|
||||
<rect
|
||||
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.187088"
|
||||
id="rect160559"
|
||||
width="0.26458332"
|
||||
height="0.13229166"
|
||||
x="3.175"
|
||||
y="2.9104166" />
|
||||
<rect
|
||||
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.132291"
|
||||
id="rect160561"
|
||||
width="0.13229166"
|
||||
height="0.13229166"
|
||||
x="3.4395833"
|
||||
y="3.0427082" />
|
||||
<rect
|
||||
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.132291"
|
||||
id="rect160563"
|
||||
width="0.13229166"
|
||||
height="0.13229166"
|
||||
x="3.0427084"
|
||||
y="3.0427082" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Game server</title>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="container">
|
||||
<header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom">
|
||||
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
|
||||
<img class="bi me-2" width="40" height="32" src="img/blackmage.svg">
|
||||
<span class="fs-4">Play.jarno.ca</span>
|
||||
</a>
|
||||
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item"><a href="index.html" class="nav-link active" aria-current="page">Home</a></li>
|
||||
<li class="nav-item"><a href="tournament.html" class="nav-link">Tournament</a></li>
|
||||
<li class="nav-item"><a href="schedule.html" class="nav-link">Schedule</a></li>
|
||||
<li class="nav-item"><a href="admin.html" class="nav-link">Admin</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h1>Games</h1>
|
||||
<p>There are a few game servers running. To connect, simply start the game and connect to this domain.</p>
|
||||
<p>Available games are:</p>
|
||||
<ul>
|
||||
<li>Bzflag (<a href="https://www.bzflag.org/downloads/">download</a>)</li>
|
||||
<li>Hedgewars (<a href="https://www.hedgewars.org/download.html">download</a>)</li>
|
||||
<li>Mindustry (<a href="https://github.com/Anuken/Mindustry/releases">download</a>)</li>
|
||||
<li>OpenHV (<a href="https://github.com/OpenHV/OpenHV/releases">download</a>)</li>
|
||||
<li>OpenSpades (<a href="https://github.com/yvt/openspades/releases">download</a>)</li>
|
||||
<li>SuperTuxKart (<a href="https://supertuxkart.net/Download">download</a>)</li>
|
||||
<li>Teeworlds (<a href="https://www.teeworlds.com/?page=downloads">download</a>)</li>
|
||||
<li>Unvanguished (<a href="https://unvanquished.net/download/">download</a>)</li>
|
||||
<li>Xonotic (<a href="https://xonotic.org/download/">download</a>)</li>
|
||||
</ul>
|
||||
<p>Enjoy!</p>
|
||||
</div>
|
||||
<div class="col-6 col-md-4">
|
||||
<h5>Live stats</h5>
|
||||
<noscript>
|
||||
Live stuff requires JavaScript unfortunately
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,91 @@
|
|||
function mindustry_init() {
|
||||
const command_form = document.getElementById('mindustry_form');
|
||||
const command_input = document.getElementById('mindustry_command');
|
||||
|
||||
// Connect the command submission
|
||||
if(command_input && command_form) {
|
||||
command_form.addEventListener('submit', function(){
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = '<span class="TERM_FOREGROUND_7_INTENSE">$ </span>' + command_input.value;
|
||||
mindustry_output.prepend(line);
|
||||
socket.send(command_input.value);
|
||||
command_input.value = "";
|
||||
});
|
||||
}
|
||||
|
||||
// Create WebSocket connection.
|
||||
const socket = new WebSocket("ws://192.168.122.229/mindustry")
|
||||
|
||||
// Connection opened
|
||||
socket.addEventListener('open', function (event) {
|
||||
socket.send('help');
|
||||
});
|
||||
|
||||
// Listen for messages
|
||||
socket.addEventListener('message', function (event) {
|
||||
const mindustry_output = document.getElementById('mindustry_output');
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = convertTerminalCodeToHtml(event.data);
|
||||
mindustry_output.prepend(line);
|
||||
});
|
||||
}
|
||||
|
||||
function sendHello() {
|
||||
socket.send('Hello');
|
||||
}
|
||||
|
||||
// Shell command can have control codes. Some of these mean colours.
|
||||
function convertTerminalCodeToHtml(line) {
|
||||
let htmlline = "";
|
||||
let open_spans = 0;
|
||||
for(let i = 0; i < line.length; i++) {
|
||||
if(line[i] == '\033') {
|
||||
let code = line[++i]
|
||||
if(code == '[') {
|
||||
// This means it's a colour
|
||||
let colour_code = "";
|
||||
for(i++; i < line.length && line[i] != 'm'; i++) {
|
||||
colour_code += line[i];
|
||||
}
|
||||
colour_code = parseInt(colour_code);
|
||||
if(colour_code === 0) {
|
||||
for(let i = 0; i < open_spans; i++) {
|
||||
htmlline += "</span>";
|
||||
}
|
||||
}
|
||||
else if(colour_code >= 30 && colour_code <= 37) {
|
||||
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-30)+'">';
|
||||
open_spans++;
|
||||
}
|
||||
else if(colour_code >= 90 && colour_code <= 97) {
|
||||
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-90)+'_INTENSE">';
|
||||
open_spans++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(line[i] == '<') {
|
||||
htmlline += "<"
|
||||
}
|
||||
else if(line[i] == '>') {
|
||||
htmlline += ">"
|
||||
}
|
||||
else if(line[i] == '&') {
|
||||
htmlline += "&"
|
||||
}
|
||||
else {
|
||||
htmlline += line[i];
|
||||
}
|
||||
}
|
||||
|
||||
for(let i = 0; i < open_spans; i++) {
|
||||
htmlline += "</span>";
|
||||
}
|
||||
|
||||
return htmlline
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', mindustry_init);
|
||||
} else {
|
||||
mindustry_init();
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
function unvanguished_init() {
|
||||
const command_form = document.getElementById('unvanguished_form');
|
||||
const command_input = document.getElementById('unvanguished_command');
|
||||
|
||||
// Connect the command submission
|
||||
if(command_input && command_form) {
|
||||
command_form.addEventListener('submit', function(){
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = '<span class="TERM_FOREGROUND_7_INTENSE">$ </span>' + command_input.value;
|
||||
unvanguished_output.prepend(line);
|
||||
socket.send(command_input.value);
|
||||
command_input.value = "";
|
||||
});
|
||||
}
|
||||
|
||||
// Create WebSocket connection.
|
||||
const socket = new WebSocket("ws://192.168.122.229/unvanguished")
|
||||
|
||||
// Connection opened
|
||||
socket.addEventListener('open', function (event) {
|
||||
socket.send('help');
|
||||
});
|
||||
|
||||
// Listen for messages
|
||||
socket.addEventListener('message', function (event) {
|
||||
const unvanguished_output = document.getElementById('unvanguished_output');
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = convertTerminalCodeToHtml(event.data);
|
||||
unvanguished_output.prepend(line);
|
||||
});
|
||||
}
|
||||
|
||||
function sendHello() {
|
||||
socket.send('Hello');
|
||||
}
|
||||
|
||||
// Shell command can have control codes. Some of these mean colours.
|
||||
function convertTerminalCodeToHtml(line) {
|
||||
let htmlline = "";
|
||||
let open_spans = 0;
|
||||
for(let i = 0; i < line.length; i++) {
|
||||
if(line[i] == '\033') {
|
||||
let code = line[++i]
|
||||
if(code == '[') {
|
||||
// This means it's a colour
|
||||
let colour_code = "";
|
||||
for(i++; i < line.length && line[i] != 'm'; i++) {
|
||||
colour_code += line[i];
|
||||
}
|
||||
colour_code = parseInt(colour_code);
|
||||
if(colour_code === 0) {
|
||||
for(let i = 0; i < open_spans; i++) {
|
||||
htmlline += "</span>";
|
||||
}
|
||||
}
|
||||
else if(colour_code >= 30 && colour_code <= 37) {
|
||||
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-30)+'">';
|
||||
open_spans++;
|
||||
}
|
||||
else if(colour_code >= 90 && colour_code <= 97) {
|
||||
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-90)+'_INTENSE">';
|
||||
open_spans++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(line[i] == '<') {
|
||||
htmlline += "<"
|
||||
}
|
||||
else if(line[i] == '>') {
|
||||
htmlline += ">"
|
||||
}
|
||||
else if(line[i] == '&') {
|
||||
htmlline += "&"
|
||||
}
|
||||
else {
|
||||
htmlline += line[i];
|
||||
}
|
||||
}
|
||||
|
||||
for(let i = 0; i < open_spans; i++) {
|
||||
htmlline += "</span>";
|
||||
}
|
||||
|
||||
return htmlline
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', unvanguished_init);
|
||||
} else {
|
||||
unvanguished_init();
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
function xonotic_init() {
|
||||
const command_form = document.getElementById('xonotic_form');
|
||||
const command_input = document.getElementById('xonotic_command');
|
||||
|
||||
// Connect the command submission
|
||||
if(command_input && command_form) {
|
||||
command_form.addEventListener('submit', function(){
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = '<span class="TERM_FOREGROUND_7_INTENSE">$ </span>' + command_input.value;
|
||||
xonotic_output.prepend(line);
|
||||
socket.send(command_input.value);
|
||||
command_input.value = "";
|
||||
});
|
||||
}
|
||||
|
||||
// Create WebSocket connection.
|
||||
const socket = new WebSocket("ws://192.168.122.229/xonotic")
|
||||
|
||||
// Connection opened
|
||||
socket.addEventListener('open', function (event) {
|
||||
socket.send('help');
|
||||
});
|
||||
|
||||
// Listen for messages
|
||||
socket.addEventListener('message', function (event) {
|
||||
const xonotic_output = document.getElementById('xonotic_output');
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = convertTerminalCodeToHtml(event.data);
|
||||
xonotic_output.prepend(line);
|
||||
});
|
||||
}
|
||||
|
||||
function sendHello() {
|
||||
socket.send('Hello');
|
||||
}
|
||||
|
||||
// Shell command can have control codes. Some of these mean colours.
|
||||
function convertTerminalCodeToHtml(line) {
|
||||
let htmlline = "";
|
||||
let open_spans = 0;
|
||||
for(let i = 0; i < line.length; i++) {
|
||||
if(line[i] == '\033') {
|
||||
let code = line[++i]
|
||||
if(code == '[') {
|
||||
// This means it's a colour
|
||||
let colour_code = "";
|
||||
for(i++; i < line.length && line[i] != 'm'; i++) {
|
||||
colour_code += line[i];
|
||||
}
|
||||
colour_code = parseInt(colour_code);
|
||||
if(colour_code === 0) {
|
||||
for(let i = 0; i < open_spans; i++) {
|
||||
htmlline += "</span>";
|
||||
}
|
||||
}
|
||||
else if(colour_code >= 30 && colour_code <= 37) {
|
||||
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-30)+'">';
|
||||
open_spans++;
|
||||
}
|
||||
else if(colour_code >= 90 && colour_code <= 97) {
|
||||
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-90)+'_INTENSE">';
|
||||
open_spans++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(line[i] == '<') {
|
||||
htmlline += "<"
|
||||
}
|
||||
else if(line[i] == '>') {
|
||||
htmlline += ">"
|
||||
}
|
||||
else if(line[i] == '&') {
|
||||
htmlline += "&"
|
||||
}
|
||||
else {
|
||||
htmlline += line[i];
|
||||
}
|
||||
}
|
||||
|
||||
for(let i = 0; i < open_spans; i++) {
|
||||
htmlline += "</span>";
|
||||
}
|
||||
|
||||
return htmlline
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', xonotic_init);
|
||||
} else {
|
||||
xonotic_init();
|
||||
}
|
Reference in New Issue