aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Micieli <micieli@laposte.net>2019-09-09 16:56:19 +0200
committerWilly Micieli <micieli@laposte.net>2019-09-09 16:56:19 +0200
commit66742ce6cdaa4fe3b17e02999bf47ceb415c4a9e (patch)
tree92553c14259d9809d1fb488f5f9058bb451567fb
parent4cd8847d23e386935d1c51fddbcf9c30158fb196 (diff)
downloadshaolin-66742ce6cdaa4fe3b17e02999bf47ceb415c4a9e.zip
shaolin-66742ce6cdaa4fe3b17e02999bf47ceb415c4a9e.tar.gz
clean code and code stucture
-rw-r--r--app/Assets/js/app.js (renamed from assets/js/app.js)0
-rw-r--r--app/Assets/sass/_variables.scss (renamed from assets/sass/_variables.scss)0
-rw-r--r--app/Assets/sass/app.scss (renamed from assets/sass/app.scss)0
-rw-r--r--app/Controllers/AdminController.php27
-rw-r--r--app/Controllers/WelcomeController.php5
-rw-r--r--app/Views/404.twig65
-rw-r--r--app/Views/Admin/admin.twig21
-rw-r--r--app/Views/Users/users.twig0
-rw-r--r--app/Views/maintenance.twig126
-rw-r--r--composer.json2
-rw-r--r--config.rb2
-rw-r--r--routes/admin.sqlite3 (renamed from app/Routes/routes.sqlite3)bin20480 -> 20480 bytes
-rw-r--r--routes/web.sqlite3bin0 -> 20480 bytes
13 files changed, 183 insertions, 65 deletions
diff --git a/assets/js/app.js b/app/Assets/js/app.js
index 93c9f89..93c9f89 100644
--- a/assets/js/app.js
+++ b/app/Assets/js/app.js
diff --git a/assets/sass/_variables.scss b/app/Assets/sass/_variables.scss
index 843b7f9..843b7f9 100644
--- a/assets/sass/_variables.scss
+++ b/app/Assets/sass/_variables.scss
diff --git a/assets/sass/app.scss b/app/Assets/sass/app.scss
index ac3845b..ac3845b 100644
--- a/assets/sass/app.scss
+++ b/app/Assets/sass/app.scss
diff --git a/app/Controllers/AdminController.php b/app/Controllers/AdminController.php
new file mode 100644
index 0000000..c474f9d
--- /dev/null
+++ b/app/Controllers/AdminController.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace App\Controllers {
+
+ use Imperium\Controller\Controller;
+
+ Class AdminController extends Controller
+ {
+
+ public function before_action()
+ {
+
+ }
+
+ public function after_action()
+ {
+
+ }
+
+ public function admin()
+ {
+ return $this->view('@admin/admin');
+ }
+
+ }
+
+}
diff --git a/app/Controllers/WelcomeController.php b/app/Controllers/WelcomeController.php
index e5f5b1a..4129052 100644
--- a/app/Controllers/WelcomeController.php
+++ b/app/Controllers/WelcomeController.php
@@ -52,6 +52,11 @@ namespace App\Controllers {
return $this->view('@welcome/welcome');
}
+ public function not_found()
+ {
+ return $this->view('404');
+ }
+
}
}
diff --git a/app/Views/404.twig b/app/Views/404.twig
new file mode 100644
index 0000000..83c569e
--- /dev/null
+++ b/app/Views/404.twig
@@ -0,0 +1,65 @@
+
+<!doctype html>
+<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">
+
+ <style>
+ html, body {
+ background-color: #fff;
+ color: #636b6f;
+ font-family: 'Nunito', sans-serif;
+ font-weight: 100;
+ height: 100vh;
+ margin: 0;
+ }
+
+ .full-height {
+ height: 100vh;
+ }
+
+ .flex-center {
+ align-items: center;
+ display: flex;
+ justify-content: center;
+ }
+
+ .position-ref {
+ position: relative;
+ }
+
+ .code {
+ border-right: 2px solid;
+ font-size: 26px;
+ padding: 0 15px 0 15px;
+ text-align: center;
+ }
+
+ .message {
+ font-size: 18px;
+ text-align: center;
+ }
+ </style>
+
+ <title>Service Unavailable</title>
+
+ <meta name="description" content="Service Unavailable">
+
+</head>
+ <body>
+ <main class="container">
+ <div class="flex-center position-ref full-height">
+ <div class="code">
+ 404
+ </div>
+
+ <div class="message" style="padding: 10px;">
+ Page not found
+ </div>
+ </div>
+ </main>
+ </body>
+</html> \ No newline at end of file
diff --git a/app/Views/Admin/admin.twig b/app/Views/Admin/admin.twig
new file mode 100644
index 0000000..f09eee2
--- /dev/null
+++ b/app/Views/Admin/admin.twig
@@ -0,0 +1,21 @@
+{% extends 'layout.twig' %}
+
+{% block title 'admin' %}
+
+{% block description 'admin' %}
+
+{% block css %}
+
+{% endblock %}
+
+{% block content %}
+
+
+
+{% endblock %}
+
+{% block js %}
+
+
+
+{% endblock %}
diff --git a/app/Views/Users/users.twig b/app/Views/Users/users.twig
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/Views/Users/users.twig
diff --git a/app/Views/maintenance.twig b/app/Views/maintenance.twig
index 1b2e523..70d835d 100644
--- a/app/Views/maintenance.twig
+++ b/app/Views/maintenance.twig
@@ -1,65 +1,65 @@
-{% extends 'layout.twig' %}
-{% block title 'Service Unavailable' %}
-
-{% block description '' %}
-
-{% block css %}
-<style>
- html, body {
- background-color: #fff;
- color: #636b6f;
- font-family: 'Nunito', sans-serif;
- font-weight: 100;
- height: 100vh;
- margin: 0;
- }
-
- .full-height {
- height: 100vh;
- }
-
- .flex-center {
- align-items: center;
- display: flex;
- justify-content: center;
- }
-
- .position-ref {
- position: relative;
- }
-
- .code {
- border-right: 2px solid;
- font-size: 26px;
- padding: 0 15px 0 15px;
- text-align: center;
- }
-
- .message {
- font-size: 18px;
- text-align: center;
- }
- </style>
-{% endblock %}
-
-{% block content %}
-
- <div class="flex-center position-ref full-height">
- <div class="code">
- 503
+<!doctype html>
+<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">
+
+ <style>
+ html, body {
+ background-color: #fff;
+ color: #636b6f;
+ font-family: 'Nunito', sans-serif;
+ font-weight: 100;
+ height: 100vh;
+ margin: 0;
+ }
+
+ .full-height {
+ height: 100vh;
+ }
+
+ .flex-center {
+ align-items: center;
+ display: flex;
+ justify-content: center;
+ }
+
+ .position-ref {
+ position: relative;
+ }
+
+ .code {
+ border-right: 2px solid;
+ font-size: 26px;
+ padding: 0 15px 0 15px;
+ text-align: center;
+ }
+
+ .message {
+ font-size: 18px;
+ text-align: center;
+ }
+ </style>
+
+ <title>Service Unavailable</title>
+
+ <meta name="description" content="Service Unavailable">
+
+</head>
+ <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>
-
- <div class="message" style="padding: 10px;">
- Service Unavailable
- </div>
- </div>
-
-
-{% endblock %}
-
-{% block js %}
-
-
-
-{% endblock %}
+ </main>
+ </body>
+</html> \ No newline at end of file
diff --git a/composer.json b/composer.json
index 5e9823d..c38d4db 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
}
],
"require": {
- "imperium/imperium": "^10.3"
+ "imperium/imperium": "^10.4.1"
},
"autoload": {
"psr-4": {
diff --git a/config.rb b/config.rb
index 6e21d9a..88fa498 100644
--- a/config.rb
+++ b/config.rb
@@ -4,7 +4,7 @@ require 'compass/import-once/activate'
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "web/css"
-sass_dir = "assets/sass"
+sass_dir = "app/Assets/sass"
images_dir = "web/img"
javascripts_dir = "web/js"
diff --git a/app/Routes/routes.sqlite3 b/routes/admin.sqlite3
index bc09076..81021f9 100644
--- a/app/Routes/routes.sqlite3
+++ b/routes/admin.sqlite3
Binary files differ
diff --git a/routes/web.sqlite3 b/routes/web.sqlite3
new file mode 100644
index 0000000..2eaf201
--- /dev/null
+++ b/routes/web.sqlite3
Binary files differ