EOG/Models/Stripe.php | ●●●●● patch | view | raw | blame | history | |
create.php | ●●●●● patch | view | raw | blame | history | |
form.php | ●●●●● patch | view | raw | blame | history | |
info.php | ●●●●● patch | view | raw | blame | history | |
templates/admin/stripe-form.twig | ●●●●● patch | view | raw | blame | history | |
templates/bo1-full.twig | ●●●●● patch | view | raw | blame | history | |
templates/overlay-base.twig | ●●●●● patch | view | raw | blame | history | |
templates/overlays/html-base.twig | ●●●●● patch | view | raw | blame | history | |
templates/overlays/start-soon.twig | ●●●●● patch | view | raw | blame | history | |
templates/overlays/stripe.twig | ●●●●● patch | view | raw | blame | history |
EOG/Models/Stripe.php
@@ -134,9 +134,11 @@ $this->setClass($state['stripe']["class"]); } if (!empty($state['cup']['name']) && !empty($state['cup']['number'])) if (!empty($state['cup']['name']) || !empty($state['cup']['number'])) { $this->setCup($state['cup']['number'], $state['cup']['name']); $cupNum = $state['cup']['number'] ?? ''; $cupName = $state['cup']['name'] ?? ''; $this->setCup($cupNum, $cupName); } if (!empty($state['team'])) create.php
@@ -1,25 +1,6 @@ <?php ini_set('display_errors',E_ALL); include_once "common/base.php"; include "vendor/autoload.php"; $html_content = $twig->render('overlays/start-soon.twig'); define('IS_DEV', (!isset($_SERVER['HTTP_HOST']))); define('SITE_ROOT', __DIR__); if (IS_DEV) { define('OVERLAY_DIR', dirname(__DIR__) . '/esl-overlay/'); } else { define('OVERLAY_DIR', dirname(__DIR__).'/overlays/'); } $twig = \EOG\Utils\TwigFactory::getEnvironment(SITE_ROOT); $s = new \EOG\Models\Stripe(); $html_content = $twig->render('templates/overlay-base.twig', ['stripe' => $s]); file_put_contents(OVERLAY_DIR . 'generated.html', $html_content); echo OVERLAY_DIR . 'generated.html'; file_put_contents('../esl-overlay/overlays/start-soon.html', $html_content); form.php
@@ -11,15 +11,15 @@ } $s->setClass('simple'); $html_content = $twig->render('overlay-base.twig', ['stripe' => $s]); $html_content = $twig->render('overlays/stripe.twig', ['stripe' => $s]); file_put_contents(OVERLAY_DIR . 'simple.html', $html_content); $s->setClass('team'); $html_content = $twig->render('overlay-base.twig', ['stripe' => $s]); $html_content = $twig->render('overlays/stripe.twig', ['stripe' => $s]); file_put_contents(OVERLAY_DIR . 'team.html', $html_content); $s->setClass('team-ban'); $html_content = $twig->render('overlay-base.twig', ['stripe' => $s]); $html_content = $twig->render('overlays/stripe.twig', ['stripe' => $s]); file_put_contents(OVERLAY_DIR . 'team-ban.html', $html_content); } else { info.php
New file @@ -0,0 +1,3 @@ <?php phpinfo(); templates/admin/stripe-form.twig
@@ -8,13 +8,13 @@ <div class="col-md-8 mb-3"> <label for="validationServer01">Kupa neve</label> <input type="text" name="stripe[cup][name]" class="form-control" id="validationServer01" placeholder="Pld.: 5on5 Bomb Cup" value="{{ stripe.cup.name }}" required> placeholder="Pld.: 5on5 Bomb Cup" value="{{ stripe.cup.name }}"> </div> <div class="col-md-2 mb-3"> <label for="validationServer02">Kupa sorszám</label> <input type="text" name="stripe[cup][number]" class="form-control" id="validationServer02" placeholder="Pld.: #654" value="{{ stripe.cup.number }}" required> value="{{ stripe.cup.number }}"> </div> </div> </div> templates/bo1-full.twig
File was deleted templates/overlay-base.twig
File was deleted templates/overlays/html-base.twig
New file @@ -0,0 +1,15 @@ <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <base href="/"> {% block head %} <link href="https://fonts.googleapis.com/css?family=Oswald&display=swap" rel="stylesheet"> <link rel="stylesheet" href="/assets/overlay.css"> {% endblock %} </head> <body> {% block body %} {% endblock %} </body> </html> templates/overlays/start-soon.twig
New file @@ -0,0 +1,7 @@ {% extends "overlays/html-base.twig" %} {% block body %} <div id="main" class="soon"> <div class="placeholder"> </div> <div class="text">Hamarosan kezdünk!</div> </div> {% endblock %} templates/overlays/stripe.twig
New file @@ -0,0 +1,67 @@ {% extends "overlays/html-base.twig" %} {% block head %} {{ parent() }} <link rel="stylesheet" href="/assets/operators-color.css"> {% endblock %} {% block body %} {% block stripe %} <div id="stripe" class="{{ stripe.stripe.class }}"> {% block info_left %} <span class="info left"> {% if stripe.cup.number %} <img src="/assets/hun.png" class="flag hun"> {% endif %} <span class="text"> {% if stripe.cup.number %} <em>{{ stripe.cup.number }}</em> {% endif %} {{ stripe.cup.name -}} </span> </span> {% endblock %} {% block team_blue %} {% if stripe.team.blue and stripe.stripe.class in ['team-ban', 'team'] %} <span class="team blue"> <span class="name">{{ stripe.team.blue.name }}</span> </span> {% if stripe.stripe.class == 'team-ban' %} <span class="ban blue"> {% for op in stripe.team.blue.ban %} <span class="operator {{ op }}"> <span class="prohibit">x</span> </span> {% endfor %} </span> {% endif %} {% endif %} {% endblock %} {% block logo %} <span class="logo"></span> {% endblock %} {% block team_orange %} {% if stripe.team.orange and stripe.stripe.class in ['team-ban', 'team'] %} <span class="team orange"> <span class="name">{{ stripe.team.orange.name }}</span> </span> {% if stripe.stripe.class == 'team-ban' %} <span class="ban orange"> {% for op in stripe.team.orange.ban %} <span class="operator {{ op }}"> <span class="prohibit">x</span> </span> {% endfor %} </span> {% endif %} {% endif %} {% endblock %} {% block info_right %} <span class="info right"> <img class="esl-logo" src="/assets/ESL_Logo.png"/> </span> {% endblock %} </div> {% endblock %} {% endblock %}