{{ match.duration }}
+{{ match.duration }}
+ +Pas de matchs en cours...
+ {% endif %}Pas de matchs en cours...
-{% endif %} -diff --git a/scores/migrations/0006_club_footer_club_header.py b/scores/migrations/0006_club_footer_club_header.py new file mode 100644 index 0000000..1eac887 --- /dev/null +++ b/scores/migrations/0006_club_footer_club_header.py @@ -0,0 +1,23 @@ +# Generated by Django 4.1.1 on 2023-02-24 08:37 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('scores', '0005_match_team5'), + ] + + operations = [ + migrations.AddField( + model_name='club', + name='footer', + field=models.CharField(blank=True, max_length=200), + ), + migrations.AddField( + model_name='club', + name='header', + field=models.CharField(blank=True, max_length=200), + ), + ] diff --git a/scores/models.py b/scores/models.py index 5eaa339..34f2516 100644 --- a/scores/models.py +++ b/scores/models.py @@ -3,6 +3,8 @@ from django.utils import timezone class Club(models.Model): name = models.CharField(max_length=200) + header = models.CharField(max_length=200, blank=True) + footer = models.CharField(max_length=200, blank=True) def __str__(self): return self.name diff --git a/scores/static/scores/style.css b/scores/static/scores/style.css index 1b1b509..f53bbcf 100644 --- a/scores/static/scores/style.css +++ b/scores/static/scores/style.css @@ -1,11 +1,36 @@ -html { +html, body { /* font-size: 30px; /* px signifie 'pixels': la taille de base pour la police est désormais 10 pixels de haut */ /* font-family: 'Open Sans', sans-serif; /* cela devrait être le reste du résultat obtenu à partir de Google fonts */ font-family: Helvetica, sans-serif; background-color: #3878D8; color: white; + + +box-sizing: border-box; +height: 100%; +padding: 0; +margin: 0; +} + +header, footer { + padding: 15px; +} + +header { + font-size: 30px; +} + +.page-body { + flex-grow: 1; +} + +.wrapper { + box-sizing: border-box; + min-height: 100%; + display: flex; + flex-direction: column; } a { @@ -13,7 +38,7 @@ a { } table { - font-size: 30px; /* px signifie 'pixels': la taille de base pour la police est désormais 10 pixels de haut */ + font-size: 30px; font-weight: 600; } @@ -31,6 +56,10 @@ td { padding: 10px; } +.big { + font-size: 30px; +} + .score { width: 60px; text-align: center; @@ -50,7 +79,7 @@ td { } .smatch { - padding-top: 100px; + padding-top: 50px; width: 800px; margin: 0 auto; @@ -67,7 +96,10 @@ td { align-items: center; } - +.page-footer { + flex-grow: 0; + flex-shrink: 0; +} .container { /* width: 100%; */ /* text-align:center; */ diff --git a/scores/templates/scores/index.html b/scores/templates/scores/index.html index f6c7e2f..4114a2b 100644 --- a/scores/templates/scores/index.html +++ b/scores/templates/scores/index.html @@ -9,41 +9,48 @@ var countDownDate = new Date("Jan 5, 2024 15:37:25").getTime(); // Update the count down every 1 second var x = setInterval(function() { - // Get today's date and time - var now = new Date().getTime(); - - // Find the distance between now and the count down date - var distance = {{ match.seconds }} * -1; - - // Time calculations for days, hours, minutes and seconds - var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - var seconds = Math.floor((distance % (1000 * 60)) / 1000); - - // Display the result in the element with id="demo" - document.getElementById("demo").innerHTML = hours + "h " - + minutes + "m " + seconds + "s "; - - // If the count down is finished, write some text - if (distance < 0) { - clearInterval(x); - document.getElementById("demo").innerHTML = "Démarrage en cours..."; - } +// Get today's date and time +var now = new Date().getTime(); + +// Find the distance between now and the count down date +var distance = {{ match.seconds }} * -1; + +// Time calculations for days, hours, minutes and seconds +var days = Math.floor(distance / (1000 * 60 * 60 * 24)); +var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); +var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); +var seconds = Math.floor((distance % (1000 * 60)) / 1000); + +// Display the result in the element with id="demo" +document.getElementById("demo").innerHTML = hours + "h " ++ minutes + "m " + seconds + "s "; + +// If the count down is finished, write some text +if (distance < 0) { +clearInterval(x); +document.getElementById("demo").innerHTML = "Démarrage en cours..."; +} }, 1000); -->
{{ match.duration }}
+{{ match.duration }}
+ +Pas de matchs en cours...
+ {% endif %}Pas de matchs en cours...
-{% endif %} -