new index page

This commit is contained in:
ajuvercr 2020-04-06 14:30:29 +02:00
parent 076cdef003
commit 3257639c48
3 changed files with 130 additions and 79 deletions

View file

@ -3,8 +3,8 @@ use async_std::prelude::*;
static NAV: [(&'static str, &'static str); 5] = [ static NAV: [(&'static str, &'static str); 5] = [
("/", "Home"), ("/", "Home"),
("/lobby", "Lobby"),
("/mapbuilder", "Map Builder"), ("/mapbuilder", "Map Builder"),
("/lobby", "Lobby"),
("/visualizer", "Visualizer"), ("/visualizer", "Visualizer"),
("/debug", "Debug Station"), ("/debug", "Debug Station"),
]; ];

View file

@ -57,22 +57,100 @@ body {
align-items: center; align-items: center;
} }
.info_wrapper {
width: 100%;
height: 100%;
max-height: 100%;
display: flex;
}
.info { .info {
max-width: 80%; /* max-width: 80%;
width: 1000px; width: 1000px;
margin: 70px auto; */
display: flex;
flex-direction: column;
justify-content: space-between;
width: 70%;
margin: 70px auto; margin: 70px auto;
text-align: center;
flex-grow: 1;
}
.info .steps {
display: flex;
align-self: center;
width: 80%;
justify-content: center;
}
.step {
border: 3px #bbb solid;
border-radius: 50px;
margin: 0 5%;
flex-grow: 1;
max-width: 250px;
transition: all .2s ease-in-out;
position: relative;
}
.step h2 {
color: #bbb;
}
.step:hover {
transform: scale(1.2);
}
.step:after {
content: "";
display: block;
padding-bottom: 100%;
}
.info h1 {
font-size: 3em;
}
.step_content {
margin: 30px 0;
position: absolute;
width: 100%;
height: 100%;
}
.info h1,
.info h2 {
text-align: center;
} }
.info a { .info a {
/* color: inherit; */
/* filter: saturate(100%); */
/* filter: invert(75%); */
color: #ff7f00;
filter: brightness(0.5);
font-weight: bold;
text-decoration: none; text-decoration: none;
} }
p a {
color: #ff7f00;
}
.contribute {
display: inline;
padding: 20px;
border-radius: 30px;
background-color: #ff7f00;
-webkit-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
.contribute a {
color: black !important;
}
.contribute a:hover {
transform: scale(1.2);
}
.info div { .info div {
color: antiquewhite; color: antiquewhite;
} }
@ -88,7 +166,6 @@ body {
} }
.info div p { .info div p {
/* color: #ff7f00; */
margin: 5px 0; margin: 5px 0;
} }
@ -119,7 +196,7 @@ body {
height: 20px; height: 20px;
margin: -7px 10px; margin: -7px 10px;
position: relative; position: relative;
top: 0; top: -10px;
transform: rotate(-45deg); transform: rotate(-45deg);
width: 20px; width: 20px;
filter: none; filter: none;

View file

@ -2,76 +2,50 @@
{% block content %} {% block content %}
<div class="info"> <div class="info_wrapper">
<div> <div class="info">
<h1> <div>
Planetwars <h1>
</h1> Planetwars
<p> </h1>
Welcome to Planetwars. Finally <a target="_blank" href="https://github.com/ZeusWPI/MOZAICP">MOZAICP</a> is ready to be used. <h3 style="color: #bbb">
</p> powered by MOZAIC
<p> </h3>
Feel free to create games, watch games, join games and build maps. </div>
</p> <div class="steps">
</div> <a class="step" href='/mapbuilder'>
<div> <div class="step_content">
<h3>Lobby</h3> <h2>Step 1:</h2>
<p> <div>
The lobby is the central hub, here you can find active and finished games. When a game is active you can find a key to enter, more on this later. <h3>(Optional)</h3>
</p> <h3>Build a map</h3>
<p> </div>
In the lobby you can also create games, you should specify the name of your game, so you can later view it in the Visualizer. Specify a map, maximum number of turns and the number of players. </div>
</p> </a>
<p> <a class="step" href='/lobby'>
Yes the lobby is ugly, yes, part of the html is refreshed every second. It's opensource, <a target="_blank" href="https://github.com/ZeusWPI/Planetwars">please fix</a> <span class="heart"></span>. <div class="step_content">
</p> <h2>Step 2:</h2>
</div> <h3>Create a game</h3>
</div>
<div> </a>
<h3>Visualizer</h3> <a class="step" href='/info'>
<p> <div class="step_content">
The visualizer is an interesting peace of software. With Webassembly and WebGL, it is pretty cool. Here you can view played games. When your hardware is too weak the voronoi diagram will disappear for the ultimate performance. <h2>Step 3:</h2>
</p> <h3>Play!</h3>
<p> </div>
Why have an ugly scrollbar on the bottom on of the page? Instead of a scroll bar on the right side? Exellent question, it's opensource, <a target="_blank" href="https://github.com/ZeusWPI/Planetwars">please fix</a> <span class="heart"></span>. </a>
</p> </div>
</div> <div>
<p style="font-size: 1.4em;">If you want to build your own bot, and own the competition. Checkout <a href="/info">more information</a></p>
<div> </div>
<h3>Map builder</h3> <div>
<p>The mapbuilder is probably the best looking page you will find here, thanks <a target="_blank" href="https://github.com/Arnhoudt">Arnhoudt</a>!</p> <h1 class="contribute">
<p>Feel free to create as many dick maps as you want. There are a few caveats, first don't forget to name your map in your map name field... Secondly, watch your players, the grey hexagons are neutral planets, they have no owner. Next if you create a map for 2 players, only use the first two colours, that blue and that cyan. If you mix in red, shit will break, I don't know where though.</p> <a href='https://github.com/ZeusWPI/Planetwars' target="_blank">
<p>Ever built a map, and not have it show in up the lobby? Well probably something broke, too bad you have no confirmation that something broke, or if your upload was succesful. It's opensource, <a target="_blank" href="https://github.com/ZeusWPI/Planetwars">please fix</a> <span class="heart"></span>.</p> Contribute! <span class="heart"></span>
</div> </a>
</h1>
<div> </div>
<h3>Debut Station</h3>
<p>The debug station is nothing special, it just shows the current state of the underlying MOZAICP infrastructure.</p>
</div>
<div>
<h3>How to play?</h3>
<p>Build a bot! All information about the planetwars game, <a target="_blank" href="https://docs.google.com/presentation/d/1YXr7IsmEiBpRwgAoFPqsjFoKoyXOv9LAhPbsambGX70/edit?usp=sharing">please visit</a> for input output format etc. You can find an example bot <a href="bot/simple.py">here</a>.</p>
<p>Optionally, you can create your own custom with the mapbuilder</p>
<p>Start a game instance in the lobby, don't forget to name it, watching the visualization afterwars is the only way to know who won atm.</p>
<p>Start up your bot and connect to the game instance. In the lobby you will see keys corresponding to players in the game. You can use <a href="bot/runner.py">the botrunner</a> to run your bot, with the command <span style="font-style: italic;">python runner.py --host mozaic.zeus.gent -n {your name} -i {your key} {The command to start you bot}</span>.
<p>Invite friends!</p>
<p>Bash your friends because you have the superior bot, according to the visualizer</p>
</div>
<div>
<h3>Contribute!</h3>
<p>There is a lot that can still be done. Difficulty ranging from easy, like creating favicon, to very challenging, like add blockly client back from BottleBats.</p>
<p>This project ranges from shitty frontend code, to exotic shader language, and back to beautiful* rust. If you would like to help, but are confused due to the lack of documentation, or anything else, hit me up @silvius on <a href="mattermost.zeus.gent">mattermost</a> or anywhere else.</p>
<h3><a href="https://github.com/ZeusWPI/Planetwars">Planetwars</a> is made with <span class="heart"></span>.</h3>
</div> </div>
</div> </div>
<style>
body {
height: unset;
min-height: 100vh;
}
</style>
{% endblock %} {% endblock %}