This commit is contained in:
Nicolas Debrigode 2024-01-10 17:11:03 +01:00
parent 08a8ea8bd6
commit 9093099603
12 changed files with 138 additions and 28 deletions

1
.env
View File

@ -14,5 +14,6 @@
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
APP_ENV=prod
APP_SECRET=644192852c93fabc1bb219ad6458fe25
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'

2
.gitignore vendored
View File

@ -10,7 +10,7 @@ composer.lock
yarn.lock
###< symfony/framework-bundle ###
/.env.dev
/.env.local
/.dev.yml
###> symfony/webpack-encore-bundle ###

View File

@ -1,6 +1,9 @@
twig:
default_path: '%kernel.project_dir%/templates'
when@test:
twig:
strict_variables: true
date:
format: d/m/Y
timezone: Europe/Paris
number_format:
decimals: 2
decimal_point: ','
thousands_separator: ' '

View File

@ -1,5 +0,0 @@
controllers:
resource:
path: ../src/Controller/
namespace: App\Controller
type: attribute

View File

@ -0,0 +1,7 @@
controllers:
resource: ../../src/Controller/
type: attribute
kernel:
resource: ../../src/Kernel.php
type: attribute

View File

@ -20,5 +20,6 @@ services:
- '../src/Entity/'
- '../src/Kernel.php'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
App\Controller\:
resource: '../src/Controller/'
tags: [ 'controller.service_arguments' ]

View File

@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController
{
#[Route(
path: '/',
name: 'index',
methods: ['GET'],
)]
public function index(): Response
{
return $this->render('pages/index.html.twig', [
/*'base_data' => $this->base_data,
'changelog' => $changelog,*/
]);
}
}

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
{% block stylesheets %}
{% endblock %}
{% block javascripts %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>

View File

@ -0,0 +1,20 @@
<footer class="footer footer-transparent d-print-none">
<div class="container-xl">
<div class="row text-center align-items-center flex-row-reverse">
<div class="col-lg-auto ms-lg-auto">
<ul class="list-inline list-inline-dots mb-0">
<li class="list-inline-item">
<b>Version</b> N/A
</li>
</ul>
</div>
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
<ul class="list-inline list-inline-dots mb-0">
<li class="list-inline-item">
Copyright &copy; {{ 'now'|date('Y') }}
</li>
</ul>
</div>
</div>
</div>
</footer>

View File

@ -0,0 +1,22 @@
<header class="navbar navbar-expand-md navbar-light d-print-none">
<div class="container-xl">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-menu">
<span class="navbar-toggler-icon"></span>
</button>
<h1 class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
<a href="/">
<span class="text-uppercase">AS-Stats</span>
</a>
</h1>
<div class="navbar-nav flex-row order-md-last">
<div class="nav-item">
<span class="nav-link text-danger fw-bold" id="branch"></span>
</div>
</div>
<div class="navbar-nav flex-row order-md-last">
<div class="d-none d-md-flex">
{#% include "navigation/menu/_user_menu.html.twig" %#}
</div>
</div>
</div>
</header>

View File

@ -0,0 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>AS-Stats | {% block title %}{{ title|default('') }}{% endblock %}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/core@latest/dist/css/tabler.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css" />
{% block css %}{% endblock %}
</head>
<body class="layout-fluid">
<div class="page">
<!-- /.header -->
{% include 'base/_header.html.twig' %}
<div class="page-wrapper">
<div class="container-xl">
</div>
<div class="page-body">
<div class="container-xl">
{% block content %}{% endblock %}
</div>
</div>
</div>
<!-- /.footer -->
{% include 'base/_footer.html.twig' %}
</div>
{% block js %}{% endblock %}
<!-- Tabler Core -->
<script src="https://cdn.jsdelivr.net/npm/@tabler/core@latest/dist/js/tabler.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,11 @@
{% extends "base/_layout.html.twig" %}
{% block title %}dede{% endblock %}
{% block css %}
{{ parent() }}
{% endblock %}
{% block content %}
sqsq
{% endblock %}