From 56a4d806cbfa4f22841cad0ee6f5ac286c768b02 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Sun, 29 Mar 2020 10:29:27 +0200 Subject: [PATCH] make page informative --- backend/static/style/base.css | 94 ++++++++++++++++++++++++++ backend/templates/index.html.tera | 56 ++++++++++++++- backend/templates/info.html | 54 +++++++++++++++ backend/templates/mapbuilder.html.tera | 20 +++--- 4 files changed, 213 insertions(+), 11 deletions(-) create mode 100644 backend/templates/info.html diff --git a/backend/static/style/base.css b/backend/static/style/base.css index b257e35..8d4310f 100644 --- a/backend/static/style/base.css +++ b/backend/static/style/base.css @@ -56,3 +56,97 @@ body { overflow: hidden; align-items: center; } + +.info { + max-width: 80%; + width: 1000px; +} + +.info a { + /* color: inherit; */ + /* filter: saturate(100%); */ + + /* filter: invert(75%); */ + color: #ff7f00; + filter: brightness(0.5); + + font-weight: bold; + text-decoration: none; +} + +.info div { + color: antiquewhite; +} + +.info div h3, .info div h1 { + color: #ff7f00; + margin-bottom: 10px; +} + +.info div p { + /* color: #ff7f00; */ + margin: 5px 0; +} + +@keyframes heartbeat +{ + 0% + { + transform: rotate(-45deg) scale( .75 ); + } + 20% + { + transform: rotate(-45deg) scale( 1 ); + } + 40% + { + transform: rotate(-45deg) scale( .75 ); + } + 60% + { + transform: rotate(-45deg) scale( 1 ); + } + 80% + { + transform: rotate(-45deg) scale( .75 ); + } + 100% + { + transform: rotate(-45deg) scale( .75 ); + } +} + +.heart { + background-color: rgb(196, 0, 0); + display: inline-block; + height: 20px; + margin: -7px 10px; + position: relative; + top: 0; + transform: rotate(-45deg); + width: 20px; + + filter: none; + + animation: heartbeat 2s infinite; +} + +.heart:before, +.heart:after { + content: ""; + background-color: rgb(196, 0, 0); + border-radius: 50%; + height: 20px; + position: absolute; + width: 20px; +} + +.heart:before { + top: -10px; + left: 0; +} + +.heart:after { + left: 10px; + top: 0; +} diff --git a/backend/templates/index.html.tera b/backend/templates/index.html.tera index e8957f4..06c443a 100644 --- a/backend/templates/index.html.tera +++ b/backend/templates/index.html.tera @@ -2,6 +2,60 @@ {% block content %} -

Hello {{ name }}!

+
+
+

+ Planetwars +

+

+ Welcome to Planetwars. Finally MOZAICP is ready to be used. +

+

+ Feel free to create games, watch games, join games and build maps. +

+
+
+

Lobby

+

+ 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. +

+

+ In the lobby you can also create games, you should specify the name of your game, so you can later view it in the Visaulizer. Specify a map, maximum number of turns and the number of players. +

+

+ Yes the lobby is ugly, yes, part of the html is refreshed every second. It's opensource, please fix . +

+
+ +
+

Visualizer

+

+ 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. +

+

+ 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, please fix . +

+
+ +
+

Map builder

+

The mapbuilder is probably the best looking page you will find here, thanks Arnhoudt!

+

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.

+

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, please fix .

+
+ +
+

Debut Station

+

The debug station is nothing special, it just shows the current state of the underlying MOZAICP infrastructure.

+
+ +
+

Contribute!

+

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.

+

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 mattermost or anywhere else.

+

Planetwars is made with .

+
+
+ {% endblock %} diff --git a/backend/templates/info.html b/backend/templates/info.html new file mode 100644 index 0000000..685c0a3 --- /dev/null +++ b/backend/templates/info.html @@ -0,0 +1,54 @@ +
+
+

+ Planetwars +

+

+ Welcome to Planetwars. Finally MOZAICP is ready to be used. +

+

+ Feel free to create games, watch games, join games and build maps. +

+
+
+

Lobby

+

+ 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. +

+

+ In the lobby you can also create games, you should specify the name of your game, so you can later view it in the Visaulizer. Specify a map, maximum number of turns and the number of players. +

+

+ Yes the lobby is ugly, yes, part of the html is refreshed every second. It's opensource, please fix. +

+
+ +
+

Visualizer

+

+ 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. +

+

+ 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, please fix. +

+
+ +
+

Map builder

+

The mapbuilder is probably the best looking page you will find here, thanks Arnhoudt!

+

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.

+

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, please fix.

+
+ +
+

Debut Station

+

The debug station is nothing special, it just shows the current state of the underlying MOZAICP infrastructure.

+
+ +
+

Contribute!

+

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.

+

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 mattermost or anywhere else.

+

Planetwars is made with .

+
+
diff --git a/backend/templates/mapbuilder.html.tera b/backend/templates/mapbuilder.html.tera index 58ff3c9..56b3327 100644 --- a/backend/templates/mapbuilder.html.tera +++ b/backend/templates/mapbuilder.html.tera @@ -4,9 +4,13 @@ -
+
- {#

Controls

#} +
+ + +
+
@@ -17,7 +21,7 @@
- +
@@ -41,13 +45,9 @@
-
- - -
- - -
+
+ +