forked from vergnet/site-accueil-insa
Set up score displays for every team
This commit is contained in:
parent
33ba07a48f
commit
66deca31fa
12 changed files with 130 additions and 164 deletions
|
@ -39,7 +39,7 @@
|
|||
border-radius: 10px;
|
||||
display: inline-flex;
|
||||
vertical-align: center;
|
||||
font-family: 'Russo One', sans-serif;
|
||||
font-family: Harry-P, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
@ -53,52 +53,38 @@
|
|||
font-size: 23px;
|
||||
}
|
||||
|
||||
.score-usa, .score-urss, .score-boomsouffle, .score-verredaigle {
|
||||
font-size: 20px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
display: flex;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
.score-usa{
|
||||
color: #292952;
|
||||
background: url("../images/usa.png") no-repeat right ;
|
||||
.score-gli{
|
||||
color: #d9341c;
|
||||
background-size: auto 100%;
|
||||
text-shadow: 0 0 10px #fff;
|
||||
}
|
||||
|
||||
.score-urss{
|
||||
color: #fbce15;
|
||||
background: url("../images/urss.png") no-repeat left ;
|
||||
background-size: auto 100%;
|
||||
text-shadow: 0 0 5px #000;
|
||||
}
|
||||
.score-verredaigle{
|
||||
color: #fbce15;
|
||||
background: url("../images/urss.png") no-repeat left ;
|
||||
background-size: auto 100%;
|
||||
text-shadow: 0 0 5px #000;
|
||||
}
|
||||
.score-boomsouffle{
|
||||
color: #fbce15;
|
||||
background: url("../images/urss.png") no-repeat left ;
|
||||
background-size: auto 100%;
|
||||
text-shadow: 0 0 5px #000;
|
||||
}
|
||||
|
||||
|
||||
/*.score-separator{
|
||||
font-size: 30px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
text-shadow: 0 0 10px #000;
|
||||
}*/
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.score-pek{
|
||||
color: #41fb32;
|
||||
background-size: auto 100%;
|
||||
text-shadow: 0 0 5px #000;
|
||||
margin: 0 10px;
|
||||
}
|
||||
.score-boo{
|
||||
color: #fbce15;
|
||||
background-size: auto 100%;
|
||||
text-shadow: 0 0 5px #000;
|
||||
margin: 0 10px;
|
||||
}
|
||||
.score-ver{
|
||||
color: #4bc3fb;
|
||||
background-size: auto 100%;
|
||||
text-shadow: 0 0 5px #000;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
|
||||
.score-separator{
|
||||
background-color: #d9d9d9;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#main-score .score-logo {
|
||||
height: 60px;
|
||||
|
|
|
@ -64,15 +64,15 @@ h3 {
|
|||
}
|
||||
|
||||
h4 {
|
||||
font-size: 21px;
|
||||
font-size: 2.3rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 18px;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 16px;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
p {
|
||||
|
|
10
boomsouffle.php
Normal file
10
boomsouffle.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
?>
|
||||
<h1>Boomsouffle</h1>
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$customBackgroundId = "bg_boo";
|
||||
$pageTitle = "Boomsouffle";
|
||||
include("includes/template.php"); // Display template with variable content
|
||||
?>
|
11
glissefondor.php
Executable file
11
glissefondor.php
Executable file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
?>
|
||||
<h1>Glissefondor</h1>
|
||||
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$customBackgroundId = "bg_gli";
|
||||
$pageTitle = "Glissefondor";
|
||||
include("includes/template.php"); // Display template with variable content
|
||||
?>
|
|
@ -2,20 +2,21 @@
|
|||
<img class="title-image" src="<?= $relativePath ?>assets/images/titre-site-accueil.svg">
|
||||
<div class="score-container">
|
||||
<a href="<?= $relativePath ?>stats.php">
|
||||
<?php
|
||||
$usaClass = '';
|
||||
$urssClass = '';
|
||||
if ($scoreUSA > $scoreURSS)
|
||||
$usaClass = 'winning';
|
||||
else if ($scoreUSA < $scoreURSS)
|
||||
$urssClass = 'winning';
|
||||
?>
|
||||
<div class="score-usa <?= $usaClass ?>">
|
||||
<?= $scoreUSA ?>
|
||||
|
||||
<div class="score-gli">
|
||||
<?= $scoreGli ?>
|
||||
</div>
|
||||
<div class="score-separator">|</div>
|
||||
<div class="score-urss <?= $urssClass ?>">
|
||||
<?= $scoreURSS ?>
|
||||
<div class="score-separator"></div>
|
||||
<div class="score-pek">
|
||||
<?= $scorePek ?>
|
||||
</div>
|
||||
<div class="score-separator"></div>
|
||||
<div class="score-boo">
|
||||
<?= $scoreBoo ?>
|
||||
</div>
|
||||
<div class="score-separator"></div>
|
||||
<div class="score-ver">
|
||||
<?= $scoreVer ?>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
16
includes/score_functions.php
Normal file
16
includes/score_functions.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
function get_total_points($team, $path)
|
||||
{
|
||||
$dao = new Dao($path);
|
||||
$points = 0;
|
||||
foreach ($dao->get_score_team($team) as $row) {
|
||||
$points += $row['points'];
|
||||
}
|
||||
return $points;
|
||||
}
|
||||
|
||||
$scoreGli = get_total_points('gli', $relativePath);
|
||||
$scorePek = get_total_points('pek', $relativePath);
|
||||
$scoreBoo = get_total_points('boo', $relativePath);
|
||||
$scoreVer = get_total_points('ver', $relativePath);
|
|
@ -7,22 +7,9 @@ if (!isset($customBackgroundId))
|
|||
|
||||
|
||||
require_once $relativePath.'classes/dao.php';
|
||||
require_once $relativePath.'includes/score_functions.php';
|
||||
|
||||
|
||||
|
||||
function get_total_points($team, $path)
|
||||
{
|
||||
$dao = new Dao($path);
|
||||
$points = 0;
|
||||
foreach ($dao->get_score_team($team) as $row) {
|
||||
$points += $row['points'];
|
||||
}
|
||||
return $points;
|
||||
}
|
||||
|
||||
$scoreUSA = get_total_points('usa', $relativePath);
|
||||
$scoreURSS = get_total_points('urss', $relativePath);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
|
44
index.php
44
index.php
|
@ -1,18 +1,10 @@
|
|||
<?php
|
||||
require_once 'classes/dao.php';
|
||||
function get_total_points($team)
|
||||
{
|
||||
$dao = new Dao('');
|
||||
$points = 0;
|
||||
foreach ($dao->get_score_team($team) as $row) {
|
||||
$points += $row['points'];
|
||||
}
|
||||
return $points;
|
||||
}
|
||||
|
||||
$scoreUSA = get_total_points('usa');
|
||||
$scoreURSS = get_total_points('urss');
|
||||
$relativePath = '';
|
||||
|
||||
require_once 'classes/dao.php';
|
||||
require_once 'includes/score_functions.php';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -93,23 +85,35 @@ $relativePath = '';
|
|||
include("includes/main_button_template.php");
|
||||
|
||||
$is_image = true;
|
||||
$link = "usa.php";
|
||||
$link = "glissefondor.php";
|
||||
$icon = "assets/images/urss_logo.png";
|
||||
$text = "La clique de Drago";
|
||||
include("includes/main_button_template.php");
|
||||
|
||||
$is_image = true;
|
||||
$link = "peksentard.php";
|
||||
$icon = "assets/images/usa_logo.png";
|
||||
$text = "Les potes d'Harry";
|
||||
include("includes/main_button_template.php");
|
||||
|
||||
$is_image = true;
|
||||
$link = "boomsouffle.php";
|
||||
$icon = "assets/images/urss_logo.png";
|
||||
$text = "La clique de Drago";
|
||||
include("includes/main_button_template.php");
|
||||
|
||||
$is_image = true;
|
||||
$link = "verredaigle.php";
|
||||
$icon = "assets/images/urss_logo.png";
|
||||
$text = "La clique de Drago";
|
||||
include("includes/main_button_template.php");
|
||||
|
||||
$is_image = false;
|
||||
$link = "stats.php";
|
||||
$icon = "fas fa-list-ol";
|
||||
$text = "Les stats de chaque équipe";
|
||||
include("includes/main_button_template.php");
|
||||
|
||||
$is_image = true;
|
||||
$link = "urss.php";
|
||||
$icon = "assets/images/urss_logo.png";
|
||||
$text = "La clique de Drago";
|
||||
include("includes/main_button_template.php");
|
||||
|
||||
$is_image = false;
|
||||
$link = "coms.php";
|
||||
$icon = "fas fa-users";
|
||||
|
|
10
peksentard.php
Normal file
10
peksentard.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
?>
|
||||
<h1>Peksentard</h1>
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$customBackgroundId = "bg_pek";
|
||||
$pageTitle = "Peksentard";
|
||||
include("includes/template.php"); // Display template with variable content
|
||||
?>
|
34
urss.php
34
urss.php
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
?>
|
||||
<div id="contenu">
|
||||
<h1>твоя родина</h1>
|
||||
<p>Приветствуйте молодого товарища, добро пожаловать на свою новую родину для этого монументального INSA WARS.
|
||||
Вам придётся прибыть с вашей украшенной блузкой, чтобы покорить пространство под цветами вашей родины.</p>
|
||||
<p>
|
||||
присоединиться к битве на <a href="https://www.facebook.com/groups/767105833677987/">Facebook</a>
|
||||
</p>
|
||||
<p id="hint">
|
||||
Google trad est ton ami.
|
||||
</p>
|
||||
<p>
|
||||
Вот твой генерал
|
||||
</p>
|
||||
<img style="max-width: 300px" src="assets/images/general_urss.jpg">
|
||||
<br>
|
||||
<a href="https://www.youtube.com/watch?v=U06jlgpMtQs">
|
||||
музыка
|
||||
</a>
|
||||
</div>
|
||||
<audio controls autoplay hidden>
|
||||
<source src="assets/audio/USSR.mp3" type="audio/mpeg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
|
||||
<title>Team URSS | Semaine d'Accueil 2018</title>
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$customBackgroundId = "bg_ussr";
|
||||
$pageTitle = "URSS";
|
||||
include("template.php"); // Display template with variable content
|
||||
?>
|
35
usa.php
35
usa.php
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
?>
|
||||
<p id="title">
|
||||
Make INSA great again!
|
||||
</p>
|
||||
<p>
|
||||
You have joined the greatest nation on the surface of the earth, and you will help us conquer outer space! As a
|
||||
young patriot, your mission, if you choose to accept it, is to crush the Reds under the command of the most
|
||||
competent General of the US!
|
||||
</p>
|
||||
<p>
|
||||
Join the fight at <a href="https://www.facebook.com/groups/2040151589559931/">Facebook</a>, and ask to join the
|
||||
special forces.
|
||||
</p>
|
||||
<p>
|
||||
Here is your General
|
||||
</p>
|
||||
<img style="max-width: 300px" src="assets/images/general_usa.jpg">
|
||||
<br>
|
||||
<a href="https://www.youtube.com/watch?v=zqAZZmgv63Y">
|
||||
Music
|
||||
</a>
|
||||
<audio controls autoplay hidden>
|
||||
<source src="assets/audio/USA.mp3" type="audio/mpeg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
|
||||
<title>Team USA | Semaine d'Accueil 2018</title>
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$customBackgroundId = "bg_usa";
|
||||
$pageTitle = "USA";
|
||||
include("template.php"); // Display template with variable content
|
||||
?>
|
10
verredaigle.php
Normal file
10
verredaigle.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
?>
|
||||
<h1>Verredaigle</h1>
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$customBackgroundId = "bg_ver";
|
||||
$pageTitle = "Verredaigle";
|
||||
include("includes/template.php"); // Display template with variable content
|
||||
?>
|
Loading…
Reference in a new issue