aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Micieli <micieli@laposte.net>2019-10-26 14:40:31 +0200
committerWilly Micieli <micieli@laposte.net>2019-10-26 14:40:31 +0200
commit49cf5e39815bf772673ec8c2dc1980d6f8c381f8 (patch)
treec0caf454c65d7c6a6dff1c3c41c93b5df451c4e6
parent4e61de94800a9476003b89a7b602d4e89686462f (diff)
downloadshaolin-49cf5e39815bf772673ec8c2dc1980d6f8c381f8.zip
shaolin-49cf5e39815bf772673ec8c2dc1980d6f8c381f8.tar.gz
clean project
-rw-r--r--app/Assets/js/app.js3
-rw-r--r--app/Assets/sass/_variables.scss1
-rw-r--r--app/Assets/sass/app.scss46
-rw-r--r--app/Container/admin.php8
-rw-r--r--app/Container/web.php6
-rw-r--r--app/Controllers/AdminController.php44
-rw-r--r--app/Controllers/HomeController.php30
-rw-r--r--app/Controllers/TaskController.php14
-rw-r--r--app/Controllers/WelcomeController.php62
-rw-r--r--app/Email/index.mjml14
-rw-r--r--app/Middleware/AppMiddleware.php27
-rw-r--r--app/Models/Users.php2
-rw-r--r--app/Routing/admin.sqlite3bin0 -> 20480 bytes
-rw-r--r--app/Routing/task.sqlite3bin0 -> 20480 bytes
-rw-r--r--app/Routing/web.sqlite3bin0 -> 20480 bytes
-rw-r--r--app/Tasks/todo.sqlite3bin0 -> 16384 bytes
-rw-r--r--app/Views/404.twig101
-rw-r--r--app/Views/Admin/admin.twig68
-rw-r--r--app/Views/Users/users.twig0
-rw-r--r--app/Views/Welcome/welcome.twig27
-rw-r--r--app/Views/admin.twig88
-rw-r--r--app/Views/crud/create.twig24
-rw-r--r--app/Views/crud/edit.twig21
-rw-r--r--app/Views/crud/home.twig19
-rw-r--r--app/Views/crud/show.twig27
-rw-r--r--app/Views/home.twig21
-rw-r--r--app/Views/layout.twig37
-rw-r--r--app/Views/maintenance.twig66
-rw-r--r--app/Views/todo/home.twig87
-rw-r--r--composer.json4
-rw-r--r--config/.gitignore1
-rw-r--r--config/crud.yaml16
-rw-r--r--config/flash.yaml7
-rw-r--r--config/hash.yaml2
-rw-r--r--config/history.yaml2
-rw-r--r--config/locales.yaml2
-rw-r--r--config/redis.yaml6
-rw-r--r--config/twig.yaml2
-rw-r--r--config/validator.yaml20
-rw-r--r--helpers/admin.php (renamed from app/Helpers/admin.php)1
-rw-r--r--helpers/web.php (renamed from app/Helpers/web.php)1
-rw-r--r--web/css/app.css1
42 files changed, 420 insertions, 488 deletions
diff --git a/app/Assets/js/app.js b/app/Assets/js/app.js
deleted file mode 100644
index 93c9f89..0000000
--- a/app/Assets/js/app.js
+++ /dev/null
@@ -1,3 +0,0 @@
-$(function(){
-
-}); \ No newline at end of file
diff --git a/app/Assets/sass/_variables.scss b/app/Assets/sass/_variables.scss
index 843b7f9..306ff81 100644
--- a/app/Assets/sass/_variables.scss
+++ b/app/Assets/sass/_variables.scss
@@ -1,2 +1 @@
@import "compass";
-
diff --git a/app/Assets/sass/app.scss b/app/Assets/sass/app.scss
index ac3845b..3e2a877 100644
--- a/app/Assets/sass/app.scss
+++ b/app/Assets/sass/app.scss
@@ -1,45 +1 @@
-@import "variables";
-
-
-html, body {
- background-color: #fff;
- color: #636b6f;
- font-family: 'Nunito', sans-serif;
- font-weight: 200;
- height: 100vh;
- margin: 0;
-}
-.full-height {
- height: 100vh;
-}
-.flex-center {
- align-items: center;
- display: flex;
- justify-content: center;
-}
-.position-ref {
- position: relative;
-}
-.top-right {
- position: absolute;
- right: 10px;
- top: 18px;
-}
-.content {
- text-align: center;
-}
-.title {
- font-size: 84px;
-}
-.links > a {
- color: #636b6f;
- padding: 0 25px;
- font-size: 13px;
- font-weight: 600;
- letter-spacing: .1rem;
- text-decoration: none;
- text-transform: uppercase;
-}
-.m-b-md {
- margin-bottom: 30px;
-} \ No newline at end of file
+@import "variables"; \ No newline at end of file
diff --git a/app/Container/admin.php b/app/Container/admin.php
index 988f5b3..ae48a80 100644
--- a/app/Container/admin.php
+++ b/app/Container/admin.php
@@ -1,5 +1,3 @@
-<?php
-
- return [
-
- ];
+<?php
+
+return [];
diff --git a/app/Container/web.php b/app/Container/web.php
index 988f5b3..0b67a5f 100644
--- a/app/Container/web.php
+++ b/app/Container/web.php
@@ -1,5 +1,3 @@
<?php
-
- return [
-
- ];
+
+return [];
diff --git a/app/Controllers/AdminController.php b/app/Controllers/AdminController.php
index e27276f..d132efa 100644
--- a/app/Controllers/AdminController.php
+++ b/app/Controllers/AdminController.php
@@ -1,45 +1,11 @@
<?php
-namespace App\Controllers {
- use Imperium\Controller\Controller;
- use Imperium\Exception\Kedavra;
- use Symfony\Component\HttpFoundation\Response;
- use Twig\Error\LoaderError;
- use Twig\Error\RuntimeError;
- use Twig\Error\SyntaxError;
+namespace App\Controllers;
- Class AdminController extends Controller
- {
- public function before_action()
- {
+use Imperium\Action\Crud;
- }
-
- public function after_action()
- {
-
- }
-
- /**
- *
- * Display admin home
- *
- * @return Response
- *
- * @throws Kedavra
- * @throws LoaderError
- * @throws RuntimeError
- * @throws SyntaxError
- *
- */
- public function admin(): Response
- {
- $tables = $this->tables();
- return $this->view('@admin/admin',compact('tables'));
- }
-
- }
-
-}
+class AdminController extends Crud
+{
+} \ No newline at end of file
diff --git a/app/Controllers/HomeController.php b/app/Controllers/HomeController.php
new file mode 100644
index 0000000..bd96dfc
--- /dev/null
+++ b/app/Controllers/HomeController.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Controllers {
+
+ use Imperium\Controller\Controller;
+
+ Class HomeController extends Controller
+ {
+
+ public function before_action()
+ {
+
+ }
+
+ public function after_action()
+ {
+
+ }
+
+ public function not_found()
+ {
+ return $this->view('404',[],404);
+ }
+ public function home()
+ {
+ return $this->view('home');
+ }
+ }
+
+}
diff --git a/app/Controllers/TaskController.php b/app/Controllers/TaskController.php
new file mode 100644
index 0000000..82b2c24
--- /dev/null
+++ b/app/Controllers/TaskController.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace App\Controllers {
+
+
+ use Imperium\Controller\Task;
+
+
+ Class TaskController extends Task
+ {
+
+ }
+
+}
diff --git a/app/Controllers/WelcomeController.php b/app/Controllers/WelcomeController.php
deleted file mode 100644
index d682206..0000000
--- a/app/Controllers/WelcomeController.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-namespace App\Controllers {
-
- use Imperium\Controller\Controller;
- use Symfony\Component\HttpFoundation\Response;
- use Twig\Error\LoaderError;
- use Twig\Error\RuntimeError;
- use Twig\Error\SyntaxError;
-
- /**
- * Class WelcomeController
- *
- * @package App\Controllers
- *
- */
- Class WelcomeController extends Controller
- {
-
- /**
- *
- * Executed before an action
- *
- */
- public function before_action()
- {
-
- }
-
- /**
- * Executed after an action
- */
- public function after_action()
- {
-
- }
-
- /**
- *
- * The homepage
- *
- * @throws LoaderError
- * @throws RuntimeError
- * @throws SyntaxError
- *
- * @return Response
- *
- */
- public function welcome(): Response
- {
-
- return $this->view('@welcome/welcome');
- }
-
- public function not_found()
- {
- return $this->view('404',[],404);
- }
-
- }
-
-}
diff --git a/app/Email/index.mjml b/app/Email/index.mjml
new file mode 100644
index 0000000..7513ee3
--- /dev/null
+++ b/app/Email/index.mjml
@@ -0,0 +1,14 @@
+<mjml>
+ <mj-head>
+ <mj-title></mj-title>
+ </mj-head>
+ <mj-body>
+ <mj-container>
+ <mj-section>
+ <mj-column>
+
+ </mj-column>
+ </mj-section>
+ </mj-container>
+ </mj-body>
+</mjml> \ No newline at end of file
diff --git a/app/Middleware/AppMiddleware.php b/app/Middleware/AppMiddleware.php
deleted file mode 100644
index aff5710..0000000
--- a/app/Middleware/AppMiddleware.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
- namespace App\Middleware;
-
- use GuzzleHttp\Psr7\Response;
- use Imperium\Middleware\Middleware;
- use Psr\Http\Message\ResponseInterface;
- use Psr\Http\Message\ServerRequestInterface;
-
- class AppMiddleware implements Middleware
- {
-
- /**
- * Handles a request and produces a response.
- *
- * May call other collaborating code to generate the response.
- *
- * @param ServerRequestInterface $request
- *
- * @return ResponseInterface
- */
- public function handle(ServerRequestInterface $request) : ResponseInterface
- {
- return new Response();
- }
-
- } \ No newline at end of file
diff --git a/app/Models/Users.php b/app/Models/Users.php
index b1f32fc..f3f2026 100644
--- a/app/Models/Users.php
+++ b/app/Models/Users.php
@@ -13,6 +13,6 @@ namespace App\Models {
protected static $limit = 20;
- }
+}
}
diff --git a/app/Routing/admin.sqlite3 b/app/Routing/admin.sqlite3
new file mode 100644
index 0000000..69ae9bc
--- /dev/null
+++ b/app/Routing/admin.sqlite3
Binary files differ
diff --git a/app/Routing/task.sqlite3 b/app/Routing/task.sqlite3
new file mode 100644
index 0000000..704e0ba
--- /dev/null
+++ b/app/Routing/task.sqlite3
Binary files differ
diff --git a/app/Routing/web.sqlite3 b/app/Routing/web.sqlite3
new file mode 100644
index 0000000..6e1d783
--- /dev/null
+++ b/app/Routing/web.sqlite3
Binary files differ
diff --git a/app/Tasks/todo.sqlite3 b/app/Tasks/todo.sqlite3
new file mode 100644
index 0000000..56e6758
--- /dev/null
+++ b/app/Tasks/todo.sqlite3
Binary files differ
diff --git a/app/Views/404.twig b/app/Views/404.twig
index 63f5d9e..20b8c02 100644
--- a/app/Views/404.twig
+++ b/app/Views/404.twig
@@ -1,79 +1,62 @@
<!doctype html>
-<html lang="fr">
- <head>
- <!-- Required meta tags -->
- <meta charset="utf-8">
+<html lang="en">
+<head>
+ <!-- Required meta tags -->
+ <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <link rel="apple-touch-icon" sizes="57x57" href="/img/favicon/apple-icon-57x57.png">
- <link rel="apple-touch-icon" sizes="60x60" href="/img/favicon/apple-icon-60x60.png">
- <link rel="apple-touch-icon" sizes="72x72" href="/img/favicon/apple-icon-72x72.png">
- <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon/apple-icon-76x76.png">
- <link rel="apple-touch-icon" sizes="114x114" href="/img/favicon/apple-icon-114x114.png">
- <link rel="apple-touch-icon" sizes="120x120" href="/img/favicon/apple-icon-120x120.png">
- <link rel="apple-touch-icon" sizes="144x144" href="/img/favicon/apple-icon-144x144.png">
- <link rel="apple-touch-icon" sizes="152x152" href="/img/favicon/apple-icon-152x152.png">
- <link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-icon-180x180.png">
- <link rel="icon" type="image/png" sizes="192x192" href="/img/favicon/android-icon-192x192.png">
- <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
- <link rel="icon" type="image/png" sizes="96x96" href="/img/favicon/favicon-96x96.png">
- <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
- <link rel="manifest" href="/img/favicon/manifest.json">
- <meta name="msapplication-TileColor" content="#ffffff">
- <meta name="msapplication-TileImage" content="/img/favicon/ms-icon-144x144.png">
- <meta name="theme-color" content="#ffffff">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <style>
- html, body {
- background-color: #fff;
- color: #636b6f;
- font-family: 'Nunito', sans-serif;
- font-weight: 100;
- height: 100vh;
- margin: 0;
- }
+ <style>
+ html, body {
+ background-color: #fff;
+ color: #636b6f;
+ font-family: 'Nunito', sans-serif;
+ font-weight: 100;
+ height: 100vh;
+ margin: 0;
+ }
- .full-height {
- height: 100vh;
- }
+ .full-height {
+ height: 100vh;
+ }
- .flex-center {
- align-items: center;
- display: flex;
- justify-content: center;
- }
+ .flex-center {
+ align-items: center;
+ display: flex;
+ justify-content: center;
+ }
- .position-ref {
- position: relative;
- }
+ .position-ref {
+ position: relative;
+ }
- .code {
- border-right: 2px solid;
- font-size: 26px;
- padding: 0 15px 0 15px;
- text-align: center;
- }
+ .code {
+ border-right: 2px solid;
+ font-size: 26px;
+ padding: 0 15px 0 15px;
+ text-align: center;
+ }
- .message {
- font-size: 18px;
- text-align: center;
- }
- </style>
+ .message {
+ font-size: 18px;
+ text-align: center;
+ }
+ </style>
- <title>Page not found</title>
+ <title>Service Unavailable</title>
- <meta name="description" content="not found">
+ <meta name="description" content="Service Unavailable">
- </head>
+</head>
<body>
-
<main class="container">
<div class="flex-center position-ref full-height">
<div class="code">
- 404
+ 404
</div>
+
<div class="message" style="padding: 10px;">
- Page not found
+ Page not found
</div>
</div>
</main>
diff --git a/app/Views/Admin/admin.twig b/app/Views/Admin/admin.twig
deleted file mode 100644
index 5f94b10..0000000
--- a/app/Views/Admin/admin.twig
+++ /dev/null
@@ -1,68 +0,0 @@
-{% extends 'admin.twig' %}
-
-{% block title 'admin' %}
-
-{% block description 'admin' %}
-
-{% block css %}
-
-{% endblock %}
-
-{% block content %}
-
- <div class="accordion" id="tables">
- {% for table in tables %}
- <div class="card">
- <div class="card-header">
- <h2 class="mb-0">
- <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapse{{ table }}" aria-expanded="true" aria-controls="collapseOne">
- {{table}}
- </button>
- </h2>
- </div>
- <div id="collapse{{ table }}" class="collapse" data-parent="#tables">
- <div class="card-body">
- <table class="table">
- <thead class="thead-dark">
- <tr>
- <th scope="col">#</th>
- <th scope="col">First</th>
- <th scope="col">Last</th>
- <th scope="col">Handle</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th scope="row">1</th>
- <td>Mark</td>
- <td>Otto</td>
- <td>@mdo</td>
- </tr>
- <tr>
- <th scope="row">2</th>
- <td>Jacob</td>
- <td>Thornton</td>
- <td>@fat</td>
- </tr>
- <tr>
- <th scope="row">3</th>
- <td>Larry</td>
- <td>the Bird</td>
- <td>@twitter</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- {% endfor %}
- </div>
-
-
-{% endblock %}
-
-{% block js %}
-
-
-
-{% endblock %}
diff --git a/app/Views/Users/users.twig b/app/Views/Users/users.twig
deleted file mode 100644
index e69de29..0000000
--- a/app/Views/Users/users.twig
+++ /dev/null
diff --git a/app/Views/Welcome/welcome.twig b/app/Views/Welcome/welcome.twig
deleted file mode 100644
index 83ab5d0..0000000
--- a/app/Views/Welcome/welcome.twig
+++ /dev/null
@@ -1,27 +0,0 @@
-{% extends 'layout.twig' %}
-
-{% block title 'welcome' %}
-
-{% block description '' %}
-
-{% block css %}
-
-{% endblock %}
-
-{% block content %}
-
- <div class="flex-center position-ref full-height">
- <div class="content">
- <div class="title m-b-md">
- Shaolin
- </div>
- </div>
- </div>
-
-{% endblock %}
-
-{% block js %}
-
-
-
-{% endblock %}
diff --git a/app/Views/admin.twig b/app/Views/admin.twig
index 70d3c0c..6505a3f 100644
--- a/app/Views/admin.twig
+++ b/app/Views/admin.twig
@@ -1,58 +1,36 @@
<!doctype html>
<html lang="{{ lang() }}">
-<head>
- <!-- Required meta tags -->
- <meta charset="utf-8">
-
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <link rel="apple-touch-icon" sizes="57x57" href="/img/favicon/apple-icon-57x57.png">
- <link rel="apple-touch-icon" sizes="60x60" href="/img/favicon/apple-icon-60x60.png">
- <link rel="apple-touch-icon" sizes="72x72" href="/img/favicon/apple-icon-72x72.png">
- <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon/apple-icon-76x76.png">
- <link rel="apple-touch-icon" sizes="114x114" href="/img/favicon/apple-icon-114x114.png">
- <link rel="apple-touch-icon" sizes="120x120" href="/img/favicon/apple-icon-120x120.png">
- <link rel="apple-touch-icon" sizes="144x144" href="/img/favicon/apple-icon-144x144.png">
- <link rel="apple-touch-icon" sizes="152x152" href="/img/favicon/apple-icon-152x152.png">
- <link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-icon-180x180.png">
- <link rel="icon" type="image/png" sizes="192x192" href="/img/favicon/android-icon-192x192.png">
- <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
- <link rel="icon" type="image/png" sizes="96x96" href="/img/favicon/favicon-96x96.png">
- <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
- <link rel="manifest" href="/img/favicon/manifest.json">
- <meta name="msapplication-TileColor" content="#ffffff">
- <meta name="msapplication-TileImage" content="/img/favicon/ms-icon-144x144.png">
- <meta name="theme-color" content="#ffffff">
-
- {% if development() %}
-
- {% endif %}
- <link href="https://stackpath.bootstrapcdn.com/bootswatch/4.3.1/lumen/bootstrap.min.css" rel="stylesheet" integrity="sha384-iqcNtN3rj6Y1HX/R0a3zu3ngmbdwEa9qQGHdkXwSRoiE+Gj71p0UNDSm99LcXiXV" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" integrity="sha256-UhQQ4fxEeABh4JrcmAJ1+16id/1dnlOEVCFOxDef9Lw=" crossorigin="anonymous"/>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- {% block css %} {% endblock %}
-
- <title>{% block title %}{% endblock %}</title>
-
- <meta name="description" content="{% block description %} {% endblock %}">
-
-</head>
-<body>
-
-<main class="container-fluid mt-5">
-
- {{ display('success') }}
- {{ display('failure') }}
- {% block content %} {% endblock %}
-</main>
-
-<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
-<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js" integrity="sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0=" crossorigin="anonymous"></script>
-{{ js('admin.js') }}
-
-{% block js %}
-
-{% endblock %}
-</body>
+ <head>
+ <!-- Required meta tags -->
+ <meta charset="utf-8">
+
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+ {% if development() %}
+
+ {% endif %}
+
+ {{ css('app') }}
+
+ {% block css %} {% endblock %}
+
+ <title>{% block title %}{% endblock %}</title>
+
+ <meta name="description" content="{% block description %} {% endblock %}">
+ </head>
+ <body>
+ <main class="container">
+ {{ display('success') }}
+ {{ display('failure') }}
+ {% block content %} {% endblock %}
+ </main>
+
+ <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+
+ <script src="{{ js('admin.js') }}"></script>
+
+ {% block js %}
+
+ {% endblock %}
+ </body>
</html> \ No newline at end of file
diff --git a/app/Views/crud/create.twig b/app/Views/crud/create.twig
new file mode 100644
index 0000000..ec32ea1
--- /dev/null
+++ b/app/Views/crud/create.twig
@@ -0,0 +1,24 @@
+{% extends 'layout.twig' %}
+
+{% block title '' %}
+
+{% block description '' %}
+
+{% block css %}
+
+{% endblock %}
+
+{% block content %}
+ <div class="btn-group mb-5" role="group" aria-label="Basic example">
+ <a class="btn btn-primary" href="{{ root() }}">home</a>
+ <a class="btn btn-success" href="{{ route('admin','show',table) }}">{{ table }}</a>
+ </div>
+{{ form | raw }}
+
+{% endblock %}
+
+{% block js %}
+
+
+
+{% endblock %}
diff --git a/app/Views/crud/edit.twig b/app/Views/crud/edit.twig
new file mode 100644
index 0000000..72be48d
--- /dev/null
+++ b/app/Views/crud/edit.twig
@@ -0,0 +1,21 @@
+{% extends 'layout.twig' %}
+
+{% block title '' %}
+
+{% block description '' %}
+
+{% block css %}
+
+{% endblock %}
+
+{% block content %}
+ <a href="/{{ table }}" class="btn btn-success mb-5" >{{ table }}</a>
+{{ form | raw }}
+
+{% endblock %}
+
+{% block js %}
+
+
+
+{% endblock %}
diff --git a/app/Views/crud/home.twig b/app/Views/crud/home.twig
new file mode 100644
index 0000000..6d98e32
--- /dev/null
+++ b/app/Views/crud/home.twig
@@ -0,0 +1,19 @@
+{% extends 'layout.twig' %}
+
+{% block title '' %}
+
+{% block description '' %}
+
+{% block css %}
+
+{% endblock %}
+
+{% block content %}
+ {{ form | raw }}
+{% endblock %}
+
+{% block js %}
+
+
+
+{% endblock %}
diff --git a/app/Views/crud/show.twig b/app/Views/crud/show.twig
new file mode 100644
index 0000000..7e99db8
--- /dev/null
+++ b/app/Views/crud/show.twig
@@ -0,0 +1,27 @@
+{% extends 'layout.twig' %}
+
+{% block title '' %}
+
+{% block description '' %}
+
+{% block css %}
+
+{% endblock %}
+
+{% block content %}
+ <div class="btn-group" role="group" aria-label="Basic example">
+ <a class="btn btn-primary" href="{{ root() }}">home</a>
+ <a class="btn btn-success" href="{{ route('admin','add',table) }}">create</a>
+ <a class="btn btn-danger" href="{{ route('admin','truncate',table) }}" onclick="return confirm('are you sure ?')">truncate</a>
+ </div>
+ <div class="mt-5">
+ {{ all | raw }}
+ </div>
+
+{% endblock %}
+
+{% block js %}
+
+
+
+{% endblock %}
diff --git a/app/Views/home.twig b/app/Views/home.twig
new file mode 100644
index 0000000..0ee627e
--- /dev/null
+++ b/app/Views/home.twig
@@ -0,0 +1,21 @@
+{% extends 'layout.twig' %}
+
+{% block title '' %}
+
+{% block description '' %}
+
+{% block css %}
+
+{% endblock %}
+
+{% block content %}
+
+
+
+{% endblock %}
+
+{% block js %}
+
+
+
+{% endblock %}
diff --git a/app/Views/layout.twig b/app/Views/layout.twig
index ae5619d..ddbf40b 100644
--- a/app/Views/layout.twig
+++ b/app/Views/layout.twig
@@ -5,51 +5,30 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <link rel="apple-touch-icon" sizes="57x57" href="/img/favicon/apple-icon-57x57.png">
- <link rel="apple-touch-icon" sizes="60x60" href="/img/favicon/apple-icon-60x60.png">
- <link rel="apple-touch-icon" sizes="72x72" href="/img/favicon/apple-icon-72x72.png">
- <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon/apple-icon-76x76.png">
- <link rel="apple-touch-icon" sizes="114x114" href="/img/favicon/apple-icon-114x114.png">
- <link rel="apple-touch-icon" sizes="120x120" href="/img/favicon/apple-icon-120x120.png">
- <link rel="apple-touch-icon" sizes="144x144" href="/img/favicon/apple-icon-144x144.png">
- <link rel="apple-touch-icon" sizes="152x152" href="/img/favicon/apple-icon-152x152.png">
- <link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-icon-180x180.png">
- <link rel="icon" type="image/png" sizes="192x192" href="/img/favicon/android-icon-192x192.png">
- <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
- <link rel="icon" type="image/png" sizes="96x96" href="/img/favicon/favicon-96x96.png">
- <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
- <link rel="manifest" href="/img/favicon/manifest.json">
- <meta name="msapplication-TileColor" content="#ffffff">
- <meta name="msapplication-TileImage" content="/img/favicon/ms-icon-144x144.png">
- <meta name="theme-color" content="#ffffff">
{% if development() %}
{% endif %}
- {{ css('app') }}
-
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" integrity="sha256-UhQQ4fxEeABh4JrcmAJ1+16id/1dnlOEVCFOxDef9Lw=" crossorigin="anonymous"/>
-
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-
{% block css %} {% endblock %}
<title>{% block title %}{% endblock %}</title>
-
+ <link rel='shortcut icon' type='image/x-icon' href="https://git-scm.com/favicon.ico">
<meta name="description" content="{% block description %} {% endblock %}">
+ <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
+ <link rel="stylesheet" href="https://bootswatch.com/4/lumen/bootstrap.min.css">
</head>
<body>
-
- <main class="container">
+ <main class="container mt-5">
{{ display('success') }}
{{ display('failure') }}
{% block content %} {% endblock %}
</main>
- <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js" integrity="sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0=" crossorigin="anonymous"></script>
- {{ js('app.js') }}
+
+ <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
{% block js %}
{% endblock %}
diff --git a/app/Views/maintenance.twig b/app/Views/maintenance.twig
index ecd81cb..70d835d 100644
--- a/app/Views/maintenance.twig
+++ b/app/Views/maintenance.twig
@@ -1,34 +1,12 @@
<!doctype html>
-<html lang="fr">
+<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <link rel="apple-touch-icon" sizes="57x57" href="/img/favicon/apple-icon-57x57.png">
- <link rel="apple-touch-icon" sizes="60x60" href="/img/favicon/apple-icon-60x60.png">
- <link rel="apple-touch-icon" sizes="72x72" href="/img/favicon/apple-icon-72x72.png">
- <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon/apple-icon-76x76.png">
- <link rel="apple-touch-icon" sizes="114x114" href="/img/favicon/apple-icon-114x114.png">
- <link rel="apple-touch-icon" sizes="120x120" href="/img/favicon/apple-icon-120x120.png">
- <link rel="apple-touch-icon" sizes="144x144" href="/img/favicon/apple-icon-144x144.png">
- <link rel="apple-touch-icon" sizes="152x152" href="/img/favicon/apple-icon-152x152.png">
- <link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-icon-180x180.png">
- <link rel="icon" type="image/png" sizes="192x192" href="/img/favicon/android-icon-192x192.png">
- <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
- <link rel="icon" type="image/png" sizes="96x96" href="/img/favicon/favicon-96x96.png">
- <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
- <link rel="manifest" href="/img/favicon/manifest.json">
- <meta name="msapplication-TileColor" content="#ffffff">
- <meta name="msapplication-TileImage" content="/img/favicon/ms-icon-144x144.png">
- <meta name="theme-color" content="#ffffff">
-
- <link href="http://judo.ji/css/app.css" rel="stylesheet" type="text/css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css"
- integrity="sha256-UhQQ4fxEeABh4JrcmAJ1+16id/1dnlOEVCFOxDef9Lw=" crossorigin="anonymous"/>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
html, body {
background-color: #fff;
@@ -68,34 +46,20 @@
<title>Service Unavailable</title>
- <meta name="description" content="">
+ <meta name="description" content="Service Unavailable">
</head>
-<body>
-
-<main class="container">
-
-
-
-
- <div class="flex-center position-ref full-height">
- <div class="code">
- {{img('logo.jpg','judo club villeneuvois')}}
- </div>
-
- <div class="message" style="padding: 10px;">
- Site en maintenance
- </div>
- </div>
-
-
-</main>
-<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js" integrity="sha256-pTxD+DSzIwmwhOqTFN+DB+nHjO4iAsbgfyFq5K5bcE0=" crossorigin="anonymous"></script>
-<script src="http://judo.ji/js/app.js" ></script>
-
-
-
-
-</body>
+ <body>
+ <main class="container">
+ <div class="flex-center position-ref full-height">
+ <div class="code">
+ 503
+ </div>
+
+ <div class="message" style="padding: 10px;">
+ Service Unavailable
+ </div>
+ </div>
+ </main>
+ </body>
</html> \ No newline at end of file
diff --git a/app/Views/todo/home.twig b/app/Views/todo/home.twig
new file mode 100644
index 0000000..46d48e1
--- /dev/null
+++ b/app/Views/todo/home.twig
@@ -0,0 +1,87 @@
+{% extends 'layout.twig' %}
+
+{% block title '' %}
+
+{% block description '' %}
+
+{% block css %}
+
+{% endblock %}
+
+{% block content %}
+
+ <button class="btn btn-outline-primary" type="button" data-toggle="collapse" data-target="#create" aria-expanded="false" aria-controls="create">
+ <i class="fa fa-plus"></i>
+ </button>
+
+ <div class="collapse mt-5" id="create">
+ <div class="card card-body">
+ {{ form | raw }}
+ </div>
+ </div>
+ <div class="accordion mt-5" id="todo">
+ {% for task in todo %}
+ <div class="card">
+ <div class="card-header">
+ <h2 class="mb-0">
+ <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#todo-{{task.id}}" aria-expanded="true" aria-controls="{{task.task}}-{{task.id}}">
+ {{task.task}}
+ </button>
+ </h2>
+ </div>
+ <div id="todo-{{task.id}}" class="collapse" data-parent="#todo">
+ <div class="card-body">
+ <p>{{ task.description | nl2br }}</p>
+ <div class="btn-group">
+ <a href="{{ route('task','remove',task.id) }}" class="btn btn-outline-primary"> <i class="fa fa-trash-o"></i></a>
+
+ <a class="btn btn-outline-primary" data-toggle="collapse" href="#update-{{task.id}}" role="button" aria-expanded="false" aria-controls="update-{{task.id }}">
+ <i class="fa fa-pencil"></i>
+ </a>
+ </div>
+
+ <div class="collapse mt-5" id="update-{{task.id}}">
+ <div class="card card-body">
+ <form action="{{ route('task','update') }}" method="POST">
+ {{ csrf_field() }}
+ <input type="hidden" class="hide" name="id" value="{{ task.id }}">
+ <input type="hidden" class="hide" name="method" value="POST">
+ <div class="form-group">
+ <input type="text" name="task" value="{{ task.task }}" class="form-control">
+ </div>
+ <div class="form-group">
+ <textarea name="description" class="form-control" rows="10" >{{ task.description }}</textarea>
+ </div>
+ <div class="form-group">
+ <input type="datetime" name="due" value="{{ task.due }}" class="form-control">
+ </div>
+ <div class="form-group">
+ <select name="priority" class="form-control">
+ <option value="none">none</option>
+ <option value="low">low</option>
+ <option value="medium">medium</option>
+ <option value="high">high</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <button type="submit" class="btn btn-outline-primary"><i class="fa fa-refresh"></i></button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div class="text-muted card-footer">
+ {{ task.priority }}
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+
+{% endblock %}
+
+{% block js %}
+
+
+
+{% endblock %}
diff --git a/composer.json b/composer.json
index 04b3298..35f09f2 100644
--- a/composer.json
+++ b/composer.json
@@ -18,8 +18,8 @@
"Components\\" : "components/"
},
"files": [
- "app/Helpers/web.php",
- "app/Helpers/admin.php"
+ "helpers/web.php",
+ "helpers/admin.php"
]
},
"scripts": {
diff --git a/config/.gitignore b/config/.gitignore
index e783c0e..32ccd95 100644
--- a/config/.gitignore
+++ b/config/.gitignore
@@ -1,2 +1,3 @@
+app.yaml
db.yaml
mode.yaml \ No newline at end of file
diff --git a/config/crud.yaml b/config/crud.yaml
new file mode 100644
index 0000000..0192790
--- /dev/null
+++ b/config/crud.yaml
@@ -0,0 +1,16 @@
+created: 'The record has been created successfully'
+no_created: 'The creation has fail'
+updated: 'The record has been updated successfully'
+no_updated: 'The record has not been updated'
+deleted: 'The record has been deleted successfully'
+no_deleted: 'The record has not been deleted'
+update_text: 'update'
+create_text: 'create'
+select_table_text: 'select a table'
+edit_text: 'edit'
+remove_text: 'remove'
+edit_class: 'btn btn-outline-primary'
+remove_class: 'btn btn-outline-danger'
+truncated: 'The table has been empty successfully'
+no_truncated: 'The table has not been altered'
+sure: 'Are you sure you want to delete this item ?' \ No newline at end of file
diff --git a/config/flash.yaml b/config/flash.yaml
index 9460075..f398acf 100644
--- a/config/flash.yaml
+++ b/config/flash.yaml
@@ -1,4 +1,3 @@
-success:
- class: 'alert alert-success alert-dismissible fade show'
-failure:
- class: 'alert alert-danger alert-dismissible fade show' \ No newline at end of file
+success_class: 'alert alert-success alert-dismissible fade show'
+failure_class: 'alert alert-danger alert-dismissible fade show'
+column_class: 'alert alert-danger alert-dismissible fade show' \ No newline at end of file
diff --git a/config/hash.yaml b/config/hash.yaml
index 8906d85..b77b61e 100644
--- a/config/hash.yaml
+++ b/config/hash.yaml
@@ -1,2 +1,2 @@
algorithm: 'sha256'
-secret: 'secrets' \ No newline at end of file
+secret: 'secret' \ No newline at end of file
diff --git a/config/history.yaml b/config/history.yaml
new file mode 100644
index 0000000..be2a18b
--- /dev/null
+++ b/config/history.yaml
@@ -0,0 +1,2 @@
+class: 'btn'
+text: "back" \ No newline at end of file
diff --git a/config/locales.yaml b/config/locales.yaml
index 1c6c4b2..41b0e3a 100644
--- a/config/locales.yaml
+++ b/config/locales.yaml
@@ -1,4 +1,4 @@
-locale: 'fr'
+locale: 'en'
supported: ['fr']
domain: 'messages'
dir: 'po' \ No newline at end of file
diff --git a/config/redis.yaml b/config/redis.yaml
new file mode 100644
index 0000000..4db1295
--- /dev/null
+++ b/config/redis.yaml
@@ -0,0 +1,6 @@
+host: '127.0.0.1'
+port: 6379
+timeout: 0.0
+reserved: null
+retryInterval: 0
+readTimeout: 0.0 \ No newline at end of file
diff --git a/config/twig.yaml b/config/twig.yaml
index 3002955..960ece2 100644
--- a/config/twig.yaml
+++ b/config/twig.yaml
@@ -1,5 +1,5 @@
namespaces:
- Welcome: 'welcome'
+
config:
cache: 'cache'
charset: 'utf-8'
diff --git a/config/validator.yaml b/config/validator.yaml
new file mode 100644
index 0000000..6fa819f
--- /dev/null
+++ b/config/validator.yaml
@@ -0,0 +1,20 @@
+en:
+ required: 'The %s field is required'
+ empty: 'The %s field must not be empty'
+ between: 'The %s field must be between %d and %d'
+ email: 'The %s email is not valid'
+ digits: 'The %s argument is not a number'
+ alpha: 'The %s argument is not alpha'
+ alphanumeric: 'The %s argument is not alphanumeric'
+ boolean: 'The %s argument is not a boolean'
+ lower: 'The %s field must be in lowercase'
+ upper: 'The %s field must be in uppercase'
+fr:
+ required: 'Le champ %s est requis'
+ empty: 'Le champ %s ne peux pas ĂȘtre vide'
+ between: 'The %s field must be between %d and %d'
+ email: 'The %s email is not valid'
+ digits: 'The %s argument is not a number'
+ alpha: 'The %s argument is not alpha'
+ alphanumeric: 'The %s argument is not alphanumeric'
+ boolean: 'The %s argument is not a boolean'
diff --git a/app/Helpers/admin.php b/helpers/admin.php
index a4abe2d..b3d9bbc 100644
--- a/app/Helpers/admin.php
+++ b/helpers/admin.php
@@ -1,2 +1 @@
<?php
-
diff --git a/app/Helpers/web.php b/helpers/web.php
index a4abe2d..b3d9bbc 100644
--- a/app/Helpers/web.php
+++ b/helpers/web.php
@@ -1,2 +1 @@
<?php
-
diff --git a/web/css/app.css b/web/css/app.css
index 57b29e1..e69de29 100644
--- a/web/css/app.css
+++ b/web/css/app.css
@@ -1 +0,0 @@
-html,body{background-color:#fff;color:#636b6f;font-family:'Nunito', sans-serif;font-weight:200;height:100vh;margin:0}.full-height{height:100vh}.flex-center{align-items:center;display:flex;justify-content:center}.position-ref{position:relative}.top-right{position:absolute;right:10px;top:18px}.content{text-align:center}.title{font-size:84px}.links>a{color:#636b6f;padding:0 25px;font-size:13px;font-weight:600;letter-spacing:.1rem;text-decoration:none;text-transform:uppercase}.m-b-md{margin-bottom:30px}