Coder Social home page Coder Social logo

tenis's Issues

PvP stat

Create button and method which on demand returns detailed statistics of two players rivalry.

Games total, p1 wins, p2 wins, %winrate, last games.

Add player editing.

Changing name.
Activating/Deactivating.

Make sure that non active players are not shown in Create Game drop-downs.

Make requirements

Django 2.1.7
django-crispy-forms 1.7.2
pip 10.0.1 ???
pytz 2018.9
setuptools 39.1.0

UI fixes

index 358b678..d667b6e 100644
--- a/core/views.py
+++ b/core/views.py
@@ -93,7 +93,8 @@ def player_data(request, player_id):
 
     last_games.reverse()
     graph_data = []
-    graph_data.append(GraphData(all_games[0].pk - 1, 800))
+    if len(all_games) > 0:
+        graph_data.append(GraphData(all_games[0].pk - 1, 800))
 
     for g in all_games:
         if g.player1 == this_player:
diff --git a/templates/core/base.html b/templates/core/base.html
index 9bfd936..c0443f2 100644
--- a/templates/core/base.html
+++ b/templates/core/base.html
@@ -53,8 +53,9 @@
 </ul>
 {% endif %}
 
+<br>
 <div class="d-flex justify-content-center">
-    <div class="w-50">
+    <div style="min-width: 50%;">
         {% block main %}
         {% endblock %}
     </div>
diff --git a/templates/core/graphs.html b/templates/core/graphs.html
index 4eab1ca..59dd613 100644
--- a/templates/core/graphs.html
+++ b/templates/core/graphs.html
@@ -20,7 +20,7 @@
 {% endblock %}
 
 {% block main %}
-
+    
     <div class="input-group inline" id="player_selector">
     </div>
     <br>
@@ -43,6 +43,6 @@
 
 {% block full_size %}
     {% if graph_data %}
-        <div id="chart_div"></div>
+        <div id="chart_div" style="height:1000px;"></div>
     {% endif %}
 {% endblock %}
diff --git a/templates/core/player.html b/templates/core/player.html
index 2125998..6ef6960 100644
--- a/templates/core/player.html
+++ b/templates/core/player.html
@@ -65,6 +65,6 @@
 
 {% block full_size %}
     {% if graph_data %}
-        <div id="chart_div"></div>
+        <div id="chart_div" style="height:500px;"></div>
     {% endif %}
 {% endblock %}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.