aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Micieli <micieli@laposte.net>2019-09-26 10:55:48 +0200
committerWilly Micieli <micieli@laposte.net>2019-09-26 10:56:02 +0200
commit00d45240fa96c46189952e98294f5d9d158ba169 (patch)
tree7ec7fd15d2e29656dc647cbb25900481d0500e50
parentfc21a75b1cf9954b1e8cb9f0d5344d85eda3f0c9 (diff)
downloadshaolin-00d45240fa96c46189952e98294f5d9d158ba169.zip
shaolin-00d45240fa96c46189952e98294f5d9d158ba169.tar.gz
start admin update crypt code
-rw-r--r--app/Controllers/AdminController.php6
-rw-r--r--app/Views/Admin/admin.twig49
-rw-r--r--app/Views/admin.twig8
-rw-r--r--composer.json1
-rw-r--r--config/encrypt.yaml1
-rw-r--r--web/js/admin.js3
6 files changed, 62 insertions, 6 deletions
diff --git a/app/Controllers/AdminController.php b/app/Controllers/AdminController.php
index c474f9d..5b73c55 100644
--- a/app/Controllers/AdminController.php
+++ b/app/Controllers/AdminController.php
@@ -3,7 +3,8 @@
namespace App\Controllers {
use Imperium\Controller\Controller;
-
+ use Imperium\File\File;
+
Class AdminController extends Controller
{
@@ -19,7 +20,8 @@ namespace App\Controllers {
public function admin()
{
- return $this->view('@admin/admin');
+ $tables = $this->tables();
+ return $this->view('@admin/admin',compact('tables'));
}
}
diff --git a/app/Views/Admin/admin.twig b/app/Views/Admin/admin.twig
index f09eee2..5f94b10 100644
--- a/app/Views/Admin/admin.twig
+++ b/app/Views/Admin/admin.twig
@@ -1,4 +1,4 @@
-{% extends 'layout.twig' %}
+{% extends 'admin.twig' %}
{% block title 'admin' %}
@@ -10,6 +10,53 @@
{% 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 %}
diff --git a/app/Views/admin.twig b/app/Views/admin.twig
index aa1c3cf..70d3c0c 100644
--- a/app/Views/admin.twig
+++ b/app/Views/admin.twig
@@ -26,7 +26,7 @@
{% if development() %}
{% endif %}
- {{ css('app') }}
+ <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 %}
@@ -38,14 +38,16 @@
</head>
<body>
-<main class="container">
+<main class="container-fluid 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://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') }}
diff --git a/composer.json b/composer.json
index 7946a74..0cec74b 100644
--- a/composer.json
+++ b/composer.json
@@ -27,6 +27,7 @@
"cp .env.example .env",
"cp config/db.example.yaml config/db.yaml",
"@php shaolin up",
+ "@php shaolin key:generate",
"@php shaolin hello"
]
},
diff --git a/config/encrypt.yaml b/config/encrypt.yaml
new file mode 100644
index 0000000..879cc85
--- /dev/null
+++ b/config/encrypt.yaml
@@ -0,0 +1 @@
+cipher: 'AES-128-CBC'
diff --git a/web/js/admin.js b/web/js/admin.js
new file mode 100644
index 0000000..8e224cc
--- /dev/null
+++ b/web/js/admin.js
@@ -0,0 +1,3 @@
+$(function () {
+
+}); \ No newline at end of file