aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-17 22:00:39 +0200
committerThomas Lange <code@nerdmind.de>2021-06-17 22:00:39 +0200
commit5555624546ea48d6327700f32b80848e0662dc90 (patch)
tree47d61fb756a6cb008aaf33586d292fcfe43da2a1
parent91d8a28c664afa5378735bcd0efe068dd74d589f (diff)
parent0a2614cb69fc732c2115ef2f0c356f39f602d311 (diff)
downloadblog-optimization.tar.gz
blog-optimization.tar.xz
blog-optimization.zip
Merge branch 'master' into 'optimization'optimization
-rw-r--r--.gitignore4
-rw-r--r--.ht-nginx4
-rw-r--r--.htaccess4
-rw-r--r--403.php22
-rw-r--r--404.php23
-rw-r--r--admin/auth.php38
-rw-r--r--admin/database.php36
-rw-r--r--admin/index.php109
-rw-r--r--admin/page/delete.php44
-rw-r--r--admin/page/index.php72
-rw-r--r--admin/page/insert.php60
-rw-r--r--admin/page/search.php26
-rw-r--r--admin/page/update.php60
-rw-r--r--admin/post/delete.php44
-rw-r--r--admin/post/index.php72
-rw-r--r--admin/post/insert.php60
-rw-r--r--admin/post/search.php26
-rw-r--r--admin/post/update.php60
-rw-r--r--admin/user/delete.php44
-rw-r--r--admin/user/index.php68
-rw-r--r--admin/user/insert.php44
-rw-r--r--admin/user/update.php45
-rw-r--r--core/application.php47
-rw-r--r--core/configuration-example.php5
-rw-r--r--core/db/database.sql (renamed from database.sql)13
-rw-r--r--core/db/migrations/1.sql3
-rw-r--r--core/db/migrations/2.sql3
-rw-r--r--core/db/migrations/3.sql6
-rw-r--r--core/db/migrations/4.sql3
-rw-r--r--core/db/migrations/5.sql3
-rw-r--r--core/functions.php81
-rw-r--r--core/include/feed/main.php100
-rw-r--r--core/include/home.php66
-rw-r--r--core/include/page/list.php66
-rw-r--r--core/include/page/main.php53
-rw-r--r--core/include/post/list.php66
-rw-r--r--core/include/post/main.php53
-rw-r--r--core/include/search/main.php78
-rw-r--r--core/include/user/list.php67
-rw-r--r--core/include/user/main.php66
-rw-r--r--core/language/de.php1
-rw-r--r--core/language/en.php1
-rw-r--r--core/namespace/Application.php7
-rw-r--r--core/namespace/Attribute.php3
-rw-r--r--core/namespace/AttributeInterface.php7
-rw-r--r--core/namespace/Database.php1
-rw-r--r--core/namespace/Factory.php1
-rw-r--r--core/namespace/FactoryInterface.php1
-rw-r--r--core/namespace/HTTP.php1
-rw-r--r--core/namespace/Item.php2
-rw-r--r--core/namespace/ItemFactory.php1
-rw-r--r--core/namespace/ItemInterface.php1
-rw-r--r--core/namespace/Language.php1
-rw-r--r--core/namespace/Page/Attribute.php1
-rw-r--r--core/namespace/Page/Exception.php1
-rw-r--r--core/namespace/Page/Factory.php1
-rw-r--r--core/namespace/Page/Item.php1
-rw-r--r--core/namespace/Parsedown.php43
-rw-r--r--core/namespace/Post/Attribute.php1
-rw-r--r--core/namespace/Post/Exception.php1
-rw-r--r--core/namespace/Post/Factory.php1
-rw-r--r--core/namespace/Post/Item.php1
-rw-r--r--core/namespace/Router.php1
-rw-r--r--core/namespace/Template/Exception.php1
-rw-r--r--core/namespace/Template/Factory.php3
-rw-r--r--core/namespace/Template/Template.php1
-rw-r--r--core/namespace/User/Attribute.php1
-rw-r--r--core/namespace/User/Exception.php1
-rw-r--r--core/namespace/User/Factory.php1
-rw-r--r--core/namespace/User/Item.php1
-rw-r--r--index.php1
-rw-r--r--license.md2
-rw-r--r--readme.md20
-rw-r--r--template/admin/html/auth.php34
-rw-r--r--template/admin/html/page/form.php98
-rw-r--r--template/admin/html/post/form.php98
-rw-r--r--template/admin/html/user/form.php104
-rw-r--r--template/admin/rsrc/background.pngbin1245 -> 0 bytes
-rw-r--r--template/admin/rsrc/main.css315
-rw-r--r--template/standard/rsrc/main.css191
-rw-r--r--theme/admin/html/403.php (renamed from template/admin/html/403.php)4
-rw-r--r--theme/admin/html/404.php (renamed from template/admin/html/404.php)4
-rw-r--r--theme/admin/html/auth.php38
-rw-r--r--theme/admin/html/database.php (renamed from template/admin/html/database.php)30
-rw-r--r--theme/admin/html/home.php (renamed from template/admin/html/home.php)4
-rw-r--r--theme/admin/html/main.php (renamed from template/admin/html/main.php)30
-rw-r--r--theme/admin/html/page/delete.php (renamed from template/admin/html/page/delete.php)4
-rw-r--r--theme/admin/html/page/form.php104
-rw-r--r--theme/admin/html/page/index.php (renamed from template/admin/html/page/index.php)6
-rw-r--r--theme/admin/html/page/insert.php (renamed from template/admin/html/page/insert.php)4
-rw-r--r--theme/admin/html/page/item.php (renamed from template/admin/html/page/item.php)5
-rw-r--r--theme/admin/html/page/search.php (renamed from template/admin/html/page/search.php)10
-rw-r--r--theme/admin/html/page/update.php (renamed from template/admin/html/page/update.php)4
-rw-r--r--theme/admin/html/pagination.php (renamed from template/admin/html/pagination.php)2
-rw-r--r--theme/admin/html/post/delete.php (renamed from template/admin/html/post/delete.php)4
-rw-r--r--theme/admin/html/post/form.php104
-rw-r--r--theme/admin/html/post/index.php (renamed from template/admin/html/post/index.php)6
-rw-r--r--theme/admin/html/post/insert.php (renamed from template/admin/html/post/insert.php)4
-rw-r--r--theme/admin/html/post/item.php (renamed from template/admin/html/post/item.php)5
-rw-r--r--theme/admin/html/post/search.php (renamed from template/admin/html/post/search.php)10
-rw-r--r--theme/admin/html/post/update.php (renamed from template/admin/html/post/update.php)4
-rw-r--r--theme/admin/html/user/delete.php (renamed from template/admin/html/user/delete.php)4
-rw-r--r--theme/admin/html/user/form.php114
-rw-r--r--theme/admin/html/user/index.php (renamed from template/admin/html/user/index.php)4
-rw-r--r--theme/admin/html/user/insert.php (renamed from template/admin/html/user/insert.php)4
-rw-r--r--theme/admin/html/user/item.php (renamed from template/admin/html/user/item.php)5
-rw-r--r--theme/admin/html/user/update.php (renamed from template/admin/html/user/update.php)4
-rw-r--r--theme/admin/lang/de.php (renamed from template/admin/lang/de.php)3
-rw-r--r--theme/admin/lang/en.php (renamed from template/admin/lang/en.php)3
-rw-r--r--theme/admin/rsrc/css/import/_font-awesome.scss138
-rw-r--r--theme/admin/rsrc/css/import/_fonts.scss32
-rw-r--r--theme/admin/rsrc/css/import/_responsive.scss91
-rw-r--r--theme/admin/rsrc/css/main.css937
-rw-r--r--theme/admin/rsrc/css/main.scss768
-rw-r--r--theme/admin/rsrc/font/font-awesome-fontello.json (renamed from template/admin/rsrc/font/font-awesome-fontello.json)2
-rw-r--r--theme/admin/rsrc/font/font-awesome-fontello.woff2 (renamed from template/admin/rsrc/font/font-awesome-fontello.woff2)bin8792 -> 8792 bytes
-rw-r--r--theme/admin/rsrc/font/kadwa-n-400.woff2 (renamed from template/admin/rsrc/font/kadwa-n-400.woff2)bin18108 -> 18108 bytes
-rw-r--r--theme/admin/rsrc/font/ruda-n-400.woff2 (renamed from template/admin/rsrc/font/ruda-n-400.woff2)bin9120 -> 9120 bytes
-rw-r--r--theme/admin/rsrc/font/ruda-n-700.woff2 (renamed from template/admin/rsrc/font/ruda-n-700.woff2)bin9116 -> 9116 bytes
-rw-r--r--theme/admin/rsrc/icon-public-domain.svg (renamed from template/admin/rsrc/icon-public-domain.svg)2
-rw-r--r--theme/admin/rsrc/main.js (renamed from template/admin/rsrc/main.js)4
-rw-r--r--theme/default/html/403.php (renamed from template/standard/html/403.php)4
-rw-r--r--theme/default/html/404.php (renamed from template/standard/html/404.php)4
-rw-r--r--theme/default/html/feed/item_page.php (renamed from template/standard/html/feed/item_page.php)4
-rw-r--r--theme/default/html/feed/item_post.php (renamed from template/standard/html/feed/item_post.php)4
-rw-r--r--theme/default/html/feed/main.php (renamed from template/standard/html/feed/main.php)4
-rw-r--r--theme/default/html/home.php (renamed from template/standard/html/home.php)5
-rw-r--r--theme/default/html/main.php (renamed from template/standard/html/main.php)6
-rw-r--r--theme/default/html/page/item.php (renamed from template/standard/html/page/item.php)4
-rw-r--r--theme/default/html/page/list.php (renamed from template/standard/html/page/list.php)4
-rw-r--r--theme/default/html/page/main.php (renamed from template/standard/html/page/main.php)4
-rw-r--r--theme/default/html/pagination.php (renamed from template/standard/html/pagination.php)4
-rw-r--r--theme/default/html/post/item.php (renamed from template/standard/html/post/item.php)4
-rw-r--r--theme/default/html/post/list.php (renamed from template/standard/html/post/list.php)4
-rw-r--r--theme/default/html/post/main.php (renamed from template/standard/html/post/main.php)4
-rw-r--r--theme/default/html/search/main.php (renamed from template/standard/html/search/main.php)2
-rw-r--r--theme/default/html/search/result.php (renamed from template/standard/html/search/result.php)2
-rw-r--r--theme/default/html/user/item.php (renamed from template/standard/html/user/item.php)4
-rw-r--r--theme/default/html/user/list.php (renamed from template/standard/html/user/list.php)4
-rw-r--r--theme/default/html/user/main.php (renamed from template/standard/html/user/main.php)4
-rw-r--r--theme/default/lang/de.php (renamed from template/standard/lang/de.php)3
-rw-r--r--theme/default/lang/en.php (renamed from template/standard/lang/en.php)3
-rw-r--r--theme/default/rsrc/css/import/_font-awesome.scss65
-rw-r--r--theme/default/rsrc/css/import/_fonts.scss23
-rw-r--r--theme/default/rsrc/css/import/_responsive.scss77
-rw-r--r--theme/default/rsrc/css/main.css546
-rw-r--r--theme/default/rsrc/css/main.scss412
-rw-r--r--theme/default/rsrc/font-awesome.min.css (renamed from template/standard/rsrc/font-awesome.min.css)0
-rw-r--r--theme/default/rsrc/font/font-awesome.woff2 (renamed from template/standard/rsrc/font/font-awesome.woff2)bin77160 -> 77160 bytes
-rw-r--r--theme/default/rsrc/font/ruda-n-400.woff2 (renamed from template/standard/rsrc/font/ruda-n-400.woff2)bin9120 -> 9120 bytes
-rw-r--r--theme/default/rsrc/font/ruda-n-700.woff2 (renamed from template/standard/rsrc/font/ruda-n-700.woff2)bin9116 -> 9116 bytes
-rw-r--r--theme/default/rsrc/logo.png (renamed from template/standard/rsrc/logo.png)bin2595 -> 2595 bytes
-rw-r--r--theme/default/rsrc/main.js (renamed from template/standard/rsrc/main.js)10
153 files changed, 4400 insertions, 2011 deletions
diff --git a/.gitignore b/.gitignore
index c0cee83..5ebc515 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
.idea/
-core/configuration.php \ No newline at end of file
+*.js.map
+*.css.map
+core/configuration.php
diff --git a/.ht-nginx b/.ht-nginx
index 010f488..6b97cb8 100644
--- a/.ht-nginx
+++ b/.ht-nginx
@@ -18,7 +18,7 @@ error_page 404 /404.php;
#===============================================================================
# Forbidden directories
#===============================================================================
-location ~ ^/(core|template/([^/]+)/(html|lang)/) {
+location ~ ^/(.git|core|theme/([^/]+)/(html|lang)/) {
return 403;
}
@@ -27,4 +27,4 @@ location ~ ^/(core|template/([^/]+)/(html|lang)/) {
#===============================================================================
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php break;
-} \ No newline at end of file
+}
diff --git a/.htaccess b/.htaccess
index 950f985..b3203b2 100644
--- a/.htaccess
+++ b/.htaccess
@@ -23,7 +23,7 @@ ErrorDocument 404 /404.php
#===============================================================================
# Forbidden directories
#===============================================================================
-RewriteRule ^(core|template/([^/]+)/(html|lang)/) - [F]
+RewriteRule ^(.git|core|theme/([^/]+)/(html|lang)/) - [F]
#===============================================================================
# Main rules
@@ -31,4 +31,4 @@ RewriteRule ^(core|template/([^/]+)/(html|lang)/) - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule ^(.*)$ index.php [L] \ No newline at end of file
+RewriteRule ^(.*)$ index.php [L]
diff --git a/403.php b/403.php
index 54f01ba..82f6836 100644
--- a/403.php
+++ b/403.php
@@ -10,21 +10,11 @@ require_once 'core/application.php';
http_response_code(403);
#===============================================================================
-# TRY: Template\Exception
+# Build document
#===============================================================================
-try {
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', '403 Forbidden');
- $MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]);
- $MainTemplate->set('HTML', Template\Factory::build('403'));
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', '403 Forbidden');
+$MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]);
+$MainTemplate->set('HTML', Template\Factory::build('403'));
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+echo $MainTemplate;
diff --git a/404.php b/404.php
index f3c76de..0fdf419 100644
--- a/404.php
+++ b/404.php
@@ -9,22 +9,9 @@ require_once 'core/application.php';
#===============================================================================
http_response_code(404);
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', '404 Not Found');
- $MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]);
- $MainTemplate->set('HTML', Template\Factory::build('404'));
-
- echo $MainTemplate;
-}
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', '404 Not Found');
+$MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]);
+$MainTemplate->set('HTML', Template\Factory::build('404'));
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+echo $MainTemplate;
diff --git a/admin/auth.php b/admin/auth.php
index e2e1b57..8c6d5a6 100644
--- a/admin/auth.php
+++ b/admin/auth.php
@@ -50,29 +50,19 @@ if(HTTP::issetPOST(['token' => Application::getSecurityToken()], 'username', 'pa
}
#===============================================================================
-# TRY: Template\Exception
+# Build document
#===============================================================================
-try {
- $AuthTemplate = Template\Factory::build('auth');
- $AuthTemplate->set('FORM', [
- 'INFO' => $messages ?? [],
- 'DATA' => [
- 'USERNAME' => HTTP::POST('username'),
- 'PASSWORD' => HTTP::POST('password'),
- ],
- 'TOKEN' => Application::getSecurityToken()
- ]);
+$AuthTemplate = Template\Factory::build('auth');
+$AuthTemplate->set('FORM', [
+ 'INFO' => $messages ?? [],
+ 'DATA' => [
+ 'USERNAME' => HTTP::POST('username'),
+ 'PASSWORD' => HTTP::POST('password'),
+ ],
+ 'TOKEN' => Application::getSecurityToken()
+]);
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', 'Authentication');
- $MainTemplate->set('HTML', $AuthTemplate);
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', 'Authentication');
+$MainTemplate->set('HTML', $AuthTemplate);
+echo $MainTemplate;
diff --git a/admin/database.php b/admin/database.php
index d37e158..78d47c1 100644
--- a/admin/database.php
+++ b/admin/database.php
@@ -26,27 +26,17 @@ if(HTTP::issetPOST(['token' => Application::getSecurityToken()], 'command')) {
}
#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $DatabaseTemplate = Template\Factory::build('database');
- $DatabaseTemplate->set('FORM', [
- 'INFO' => $messages ?? [],
- 'TOKEN' => Application::getSecurityToken(),
- 'RESULT' => implode(NULL, $result ?? []),
- 'COMMAND' => HTTP::POST('command'),
- ]);
+# Build document
+#===============================================================================
+$DatabaseTemplate = Template\Factory::build('database');
+$DatabaseTemplate->set('FORM', [
+ 'INFO' => $messages ?? [],
+ 'TOKEN' => Application::getSecurityToken(),
+ 'RESULT' => implode(NULL, $result ?? []),
+ 'COMMAND' => HTTP::POST('command'),
+]);
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', 'SQL');
- $MainTemplate->set('HTML', $DatabaseTemplate);
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', 'SQL');
+$MainTemplate->set('HTML', $DatabaseTemplate);
+echo $MainTemplate;
diff --git a/admin/index.php b/admin/index.php
index 1f8d9f6..788cee4 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -11,82 +11,61 @@ define('AUTHENTICATION', TRUE);
require '../core/application.php';
#===============================================================================
-# TRY: PDOException
+# Fetch last items and item count
#===============================================================================
-try {
- $execute = 'SELECT id FROM %s ORDER BY time_insert DESC LIMIT 1';
+$execute = 'SELECT id FROM %s ORDER BY time_insert DESC LIMIT 1';
+$LastPageStatement = $Database->query(sprintf($execute, Page\Attribute::TABLE));
+$LastPostStatement = $Database->query(sprintf($execute, Post\Attribute::TABLE));
+$LastUserStatement = $Database->query(sprintf($execute, User\Attribute::TABLE));
- $LastPageStatement = $Database->query(sprintf($execute, Page\Attribute::TABLE));
- $LastPostStatement = $Database->query(sprintf($execute, Post\Attribute::TABLE));
- $LastUserStatement = $Database->query(sprintf($execute, User\Attribute::TABLE));
+$execute = 'SELECT COUNT(*) FROM %s';
+$PageCountStatement = $Database->query(sprintf($execute, Page\Attribute::TABLE));
+$PostCountStatement = $Database->query(sprintf($execute, Post\Attribute::TABLE));
+$UserCountStatement = $Database->query(sprintf($execute, User\Attribute::TABLE));
- $execute = 'SELECT COUNT(*) FROM %s';
+try {
+ $LastPage = Page\Factory::build($LastPageStatement->fetchColumn());
+ $LastPageUser = User\Factory::build($LastPage->attr('user'));
- $PageCountStatement = $Database->query(sprintf($execute, Page\Attribute::TABLE));
- $PostCountStatement = $Database->query(sprintf($execute, Post\Attribute::TABLE));
- $UserCountStatement = $Database->query(sprintf($execute, User\Attribute::TABLE));
+ $PageItemTemplate = generatePageItemTemplate($LastPage, $LastPageUser);
}
-#===============================================================================
-# CATCH: PDOException
-#===============================================================================
-catch(PDOException $Exception) {
- exit($Exception->getMessage());
-}
+catch(Page\Exception $Exception){}
+catch(User\Exception $Exception){}
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
try {
- try {
- $LastPage = Page\Factory::build($LastPageStatement->fetchColumn());
- $LastPageUser = User\Factory::build($LastPage->attr('user'));
-
- $PageItemTemplate = generatePageItemTemplate($LastPage, $LastPageUser);
- }
-
- catch(Page\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $LastPost = Post\Factory::build($LastPostStatement->fetchColumn());
+ $LastPostUser = User\Factory::build($LastPost->attr('user'));
- try {
- $LastPost = Post\Factory::build($LastPostStatement->fetchColumn());
- $LastPostUser = User\Factory::build($LastPost->attr('user'));
-
- $PostItemTemplate = generatePostItemTemplate($LastPost, $LastPostUser);
- }
-
- catch(Post\Exception $Exception){}
- catch(User\Exception $Exception){}
-
- try {
- $LastUser = User\Factory::build($LastUserStatement->fetchColumn());
- $UserItemTemplate = generateUserItemTemplate($LastUser);
- } catch(User\Exception $Exception){}
-
- $HomeTemplate = Template\Factory::build('home');
- $HomeTemplate->set('LAST', [
- 'PAGE' => $PageItemTemplate ?? FALSE,
- 'POST' => $PostItemTemplate ?? FALSE,
- 'USER' => $UserItemTemplate ?? FALSE,
-
- ]);
+ $PostItemTemplate = generatePostItemTemplate($LastPost, $LastPostUser);
+}
- $HomeTemplate->set('COUNT', [
- 'PAGE' => $PageCountStatement->fetchColumn(),
- 'POST' => $PostCountStatement->fetchColumn(),
- 'USER' => $UserCountStatement->fetchColumn(),
- ]);
+catch(Post\Exception $Exception){}
+catch(User\Exception $Exception){}
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', 'Dashboard');
- $MainTemplate->set('HTML', $HomeTemplate);
- echo $MainTemplate;
-}
+try {
+ $LastUser = User\Factory::build($LastUserStatement->fetchColumn());
+ $UserItemTemplate = generateUserItemTemplate($LastUser);
+} catch(User\Exception $Exception){}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$HomeTemplate = Template\Factory::build('home');
+$HomeTemplate->set('LAST', [
+ 'PAGE' => $PageItemTemplate ?? FALSE,
+ 'POST' => $PostItemTemplate ?? FALSE,
+ 'USER' => $UserItemTemplate ?? FALSE,
+
+]);
+
+$HomeTemplate->set('COUNT', [
+ 'PAGE' => $PageCountStatement->fetchColumn(),
+ 'POST' => $PostCountStatement->fetchColumn(),
+ 'USER' => $UserCountStatement->fetchColumn(),
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', 'Dashboard');
+$MainTemplate->set('HTML', $HomeTemplate);
+echo $MainTemplate;
diff --git a/admin/page/delete.php b/admin/page/delete.php
index d23089c..1406ece 100644
--- a/admin/page/delete.php
+++ b/admin/page/delete.php
@@ -28,33 +28,24 @@ try {
}
#===============================================================================
- # TRY: Template\Exception
+ # Build document
#===============================================================================
- try {
- $FormTemplate = Template\Factory::build('page/form');
- $FormTemplate->set('HTML', $Page->getHTML());
- $FormTemplate->set('FORM', [
- 'TYPE' => 'DELETE',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
- 'TOKEN' => Application::getSecurityToken()
- ]);
-
- $DeleteTemplate = Template\Factory::build('page/delete');
- $DeleteTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_page_delete'));
- $MainTemplate->set('HTML', $DeleteTemplate);
- echo $MainTemplate;
- }
-
- #===============================================================================
- # CATCH: Template\Exception
- #===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ $FormTemplate = Template\Factory::build('page/form');
+ $FormTemplate->set('HTML', $Page->getHTML());
+ $FormTemplate->set('FORM', [
+ 'TYPE' => 'DELETE',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
+ 'TOKEN' => Application::getSecurityToken()
+ ]);
+
+ $DeleteTemplate = Template\Factory::build('page/delete');
+ $DeleteTemplate->set('HTML', $FormTemplate);
+
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('NAME', $Language->text('title_page_delete'));
+ $MainTemplate->set('HTML', $DeleteTemplate);
+ echo $MainTemplate;
}
#===============================================================================
@@ -63,4 +54,3 @@ try {
catch(Page\Exception $Exception) {
Application::error404();
}
-?> \ No newline at end of file
diff --git a/admin/page/index.php b/admin/page/index.php
index caff257..82ac05f 100644
--- a/admin/page/index.php
+++ b/admin/page/index.php
@@ -13,8 +13,8 @@ require '../../core/application.php';
#===============================================================================
# Pagination
#===============================================================================
-$site_size = Application::get('PAGE.LIST_SIZE');
-$site_sort = Application::get('PAGE.LIST_SORT');
+$site_size = Application::get('ADMIN.PAGE.LIST_SIZE');
+$site_sort = Application::get('ADMIN.PAGE.LIST_SORT');
$lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', Page\Attribute::TABLE))->fetchColumn() / $site_size);
@@ -31,49 +31,39 @@ if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) {
$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
$Statement = $Database->query(sprintf($execSQL, Page\Attribute::TABLE));
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- while($Attribute = $Statement->fetchObject('Page\Attribute')) {
- try {
- $Page = Page\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Page->attr('user'));
+while($Attribute = $Statement->fetchObject('Page\Attribute')) {
+ try {
+ $Page = Page\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Page->attr('user'));
- $ItemTemplate = generatePageItemTemplate($Page, $User);
+ $ItemTemplate = generatePageItemTemplate($Page, $User);
- $pages[] = $ItemTemplate;
- }
- catch(Page\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $pages[] = $ItemTemplate;
}
-
- $PaginationTemplate = Template\Factory::build('pagination');
- $PaginationTemplate->set('THIS', $currentSite);
- $PaginationTemplate->set('LAST', $lastSite);
- $PaginationTemplate->set('HREF', Application::getAdminURL('page/?site=%d'));
-
- $ListTemplate = Template\Factory::build('page/index');
- $ListTemplate->set('LIST', [
- 'PAGES' => $pages ?? []
- ]);
-
- $ListTemplate->set('PAGINATION', [
- 'THIS' => $currentSite,
- 'LAST' => $lastSite,
- 'HTML' => $PaginationTemplate
- ]);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_page_overview', $currentSite));
- $MainTemplate->set('HTML', $ListTemplate);
- echo $MainTemplate;
+ catch(Page\Exception $Exception){}
+ catch(User\Exception $Exception){}
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$PaginationTemplate = Template\Factory::build('pagination');
+$PaginationTemplate->set('THIS', $currentSite);
+$PaginationTemplate->set('LAST', $lastSite);
+$PaginationTemplate->set('HREF', Application::getAdminURL('page/?site=%d'));
+
+$ListTemplate = Template\Factory::build('page/index');
+$ListTemplate->set('LIST', [
+ 'PAGES' => $pages ?? []
+]);
+
+$ListTemplate->set('PAGINATION', [
+ 'THIS' => $currentSite,
+ 'LAST' => $lastSite,
+ 'HTML' => $PaginationTemplate
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_page_overview', $currentSite));
+$MainTemplate->set('HTML', $ListTemplate);
+echo $MainTemplate;
diff --git a/admin/page/insert.php b/admin/page/insert.php
index d95a33d..ec903e7 100644
--- a/admin/page/insert.php
+++ b/admin/page/insert.php
@@ -37,43 +37,33 @@ if(HTTP::issetPOST('id', 'user', 'slug', 'name', 'body', 'argv', 'time_insert',
}
}
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
-
- foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
- $User = User\Factory::build($userID);
- $userAttributes[] = [
- 'ID' => $User->attr('id'),
- 'FULLNAME' => $User->attr('fullname'),
- 'USERNAME' => $User->attr('username'),
- ];
- }
-
- $FormTemplate = Template\Factory::build('page/form');
- $FormTemplate->set('FORM', [
- 'TYPE' => 'INSERT',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
- 'USER_LIST' => $userAttributes ?? [],
- 'TOKEN' => Application::getSecurityToken()
- ]);
+$userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
- $InsertTemplate = Template\Factory::build('page/insert');
- $InsertTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_page_insert'));
- $MainTemplate->set('HTML', $InsertTemplate);
- echo $MainTemplate;
+foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
+ $User = User\Factory::build($userID);
+ $userAttributes[] = [
+ 'ID' => $User->attr('id'),
+ 'FULLNAME' => $User->attr('fullname'),
+ 'USERNAME' => $User->attr('username'),
+ ];
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$FormTemplate = Template\Factory::build('page/form');
+$FormTemplate->set('FORM', [
+ 'TYPE' => 'INSERT',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
+ 'USER_LIST' => $userAttributes ?? [],
+ 'TOKEN' => Application::getSecurityToken()
+]);
+
+$InsertTemplate = Template\Factory::build('page/insert');
+$InsertTemplate->set('HTML', $FormTemplate);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_page_insert'));
+$MainTemplate->set('HTML', $InsertTemplate);
+echo $MainTemplate;
diff --git a/admin/page/search.php b/admin/page/search.php
index 0506a0d..9f68b69 100644
--- a/admin/page/search.php
+++ b/admin/page/search.php
@@ -27,24 +27,14 @@ if($search = HTTP::GET('q')) {
}
#===============================================================================
-# TRY: Template\Exception
+# Build document
#===============================================================================
-try {
- $SearchTemplate = Template\Factory::build('page/search');
- $SearchTemplate->set('QUERY', $search);
- $SearchTemplate->set('PAGES', $pages ?? []);
+$SearchTemplate = Template\Factory::build('page/search');
+$SearchTemplate->set('QUERY', $search);
+$SearchTemplate->set('PAGES', $pages ?? []);
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_page_search'));
- $MainTemplate->set('HTML', $SearchTemplate);
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_page_search'));
+$MainTemplate->set('HTML', $SearchTemplate);
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+echo $MainTemplate;
diff --git a/admin/page/update.php b/admin/page/update.php
index f0bef1e..ba34a86 100644
--- a/admin/page/update.php
+++ b/admin/page/update.php
@@ -39,45 +39,36 @@ try {
}
}
- #===============================================================================
- # TRY: Template\Exception
- #===============================================================================
- try {
- $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
-
- foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
- $User = User\Factory::build($userID);
- $userAttributes[] = [
- 'ID' => $User->attr('id'),
- 'FULLNAME' => $User->attr('fullname'),
- 'USERNAME' => $User->attr('username'),
- ];
- }
-
- $FormTemplate = Template\Factory::build('page/form');
- $FormTemplate->set('FORM', [
- 'TYPE' => 'UPDATE',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
- 'USER_LIST' => $userAttributes ?? [],
- 'TOKEN' => Application::getSecurityToken()
- ]);
+ $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
- $PageUpdateTemplate = Template\Factory::build('page/update');
- $PageUpdateTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_page_update'));
- $MainTemplate->set('HTML', $PageUpdateTemplate);
- echo $MainTemplate;
+ foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
+ $User = User\Factory::build($userID);
+ $userAttributes[] = [
+ 'ID' => $User->attr('id'),
+ 'FULLNAME' => $User->attr('fullname'),
+ 'USERNAME' => $User->attr('username'),
+ ];
}
#===============================================================================
- # CATCH: Template\Exception
+ # Build document
#===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ $FormTemplate = Template\Factory::build('page/form');
+ $FormTemplate->set('FORM', [
+ 'TYPE' => 'UPDATE',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
+ 'USER_LIST' => $userAttributes ?? [],
+ 'TOKEN' => Application::getSecurityToken()
+ ]);
+
+ $PageUpdateTemplate = Template\Factory::build('page/update');
+ $PageUpdateTemplate->set('HTML', $FormTemplate);
+
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('NAME', $Language->text('title_page_update'));
+ $MainTemplate->set('HTML', $PageUpdateTemplate);
+ echo $MainTemplate;
}
#===============================================================================
@@ -86,4 +77,3 @@ try {
catch(Page\Exception $Exception) {
Application::error404();
}
-?> \ No newline at end of file
diff --git a/admin/post/delete.php b/admin/post/delete.php
index 78fdf6e..6da8a68 100644
--- a/admin/post/delete.php
+++ b/admin/post/delete.php
@@ -28,33 +28,24 @@ try {
}
#===============================================================================
- # TRY: Template\Exception
+ # Build document
#===============================================================================
- try {
- $FormTemplate = Template\Factory::build('post/form');
- $FormTemplate->set('HTML', $Post->getHTML());
- $FormTemplate->set('FORM', [
- 'TYPE' => 'DELETE',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
- 'TOKEN' => Application::getSecurityToken()
- ]);
-
- $DeleteTemplate = Template\Factory::build('post/delete');
- $DeleteTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_post_delete'));
- $MainTemplate->set('HTML', $DeleteTemplate);
- echo $MainTemplate;
- }
-
- #===============================================================================
- # CATCH: Template\Exception
- #===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ $FormTemplate = Template\Factory::build('post/form');
+ $FormTemplate->set('HTML', $Post->getHTML());
+ $FormTemplate->set('FORM', [
+ 'TYPE' => 'DELETE',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
+ 'TOKEN' => Application::getSecurityToken()
+ ]);
+
+ $DeleteTemplate = Template\Factory::build('post/delete');
+ $DeleteTemplate->set('HTML', $FormTemplate);
+
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('NAME', $Language->text('title_post_delete'));
+ $MainTemplate->set('HTML', $DeleteTemplate);
+ echo $MainTemplate;
}
#===============================================================================
@@ -63,4 +54,3 @@ try {
catch(Post\Exception $Exception) {
Application::error404();
}
-?> \ No newline at end of file
diff --git a/admin/post/index.php b/admin/post/index.php
index 7e492ba..1269236 100644
--- a/admin/post/index.php
+++ b/admin/post/index.php
@@ -13,8 +13,8 @@ require '../../core/application.php';
#===============================================================================
# Pagination
#===============================================================================
-$site_size = Application::get('POST.LIST_SIZE');
-$site_sort = Application::get('POST.LIST_SORT');
+$site_size = Application::get('ADMIN.POST.LIST_SIZE');
+$site_sort = Application::get('ADMIN.POST.LIST_SORT');
$lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', Post\Attribute::TABLE))->fetchColumn() / $site_size);
@@ -31,49 +31,39 @@ if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) {
$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
$Statement = $Database->query(sprintf($execSQL, Post\Attribute::TABLE));
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- while($Attribute = $Statement->fetchObject('Post\Attribute')) {
- try {
- $Post = Post\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Post->attr('user'));
+while($Attribute = $Statement->fetchObject('Post\Attribute')) {
+ try {
+ $Post = Post\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Post->attr('user'));
- $ItemTemplate = generatePostItemTemplate($Post, $User);
+ $ItemTemplate = generatePostItemTemplate($Post, $User);
- $posts[] = $ItemTemplate;
- }
- catch(Post\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $posts[] = $ItemTemplate;
}
-
- $PaginationTemplate = Template\Factory::build('pagination');
- $PaginationTemplate->set('THIS', $currentSite);
- $PaginationTemplate->set('LAST', $lastSite);
- $PaginationTemplate->set('HREF', Application::getAdminURL('post/?site=%d'));
-
- $ListTemplate = Template\Factory::build('post/index');
- $ListTemplate->set('LIST', [
- 'POSTS' => $posts ?? []
- ]);
-
- $ListTemplate->set('PAGINATION', [
- 'THIS' => $currentSite,
- 'LAST' => $lastSite,
- 'HTML' => $PaginationTemplate
- ]);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_post_overview', $currentSite));
- $MainTemplate->set('HTML', $ListTemplate);
- echo $MainTemplate;
+ catch(Post\Exception $Exception){}
+ catch(User\Exception $Exception){}
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$PaginationTemplate = Template\Factory::build('pagination');
+$PaginationTemplate->set('THIS', $currentSite);
+$PaginationTemplate->set('LAST', $lastSite);
+$PaginationTemplate->set('HREF', Application::getAdminURL('post/?site=%d'));
+
+$ListTemplate = Template\Factory::build('post/index');
+$ListTemplate->set('LIST', [
+ 'POSTS' => $posts ?? []
+]);
+
+$ListTemplate->set('PAGINATION', [
+ 'THIS' => $currentSite,
+ 'LAST' => $lastSite,
+ 'HTML' => $PaginationTemplate
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_post_overview', $currentSite));
+$MainTemplate->set('HTML', $ListTemplate);
+echo $MainTemplate;
diff --git a/admin/post/insert.php b/admin/post/insert.php
index d35d527..6065c95 100644
--- a/admin/post/insert.php
+++ b/admin/post/insert.php
@@ -37,43 +37,33 @@ if(HTTP::issetPOST('id', 'user', 'slug', 'name', 'body', 'argv', 'time_insert',
}
}
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
-
- foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
- $User = User\Factory::build($userID);
- $userAttributes[] = [
- 'ID' => $User->attr('id'),
- 'FULLNAME' => $User->attr('fullname'),
- 'USERNAME' => $User->attr('username'),
- ];
- }
-
- $FormTemplate = Template\Factory::build('post/form');
- $FormTemplate->set('FORM', [
- 'TYPE' => 'INSERT',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
- 'USER_LIST' => $userAttributes ?? [],
- 'TOKEN' => Application::getSecurityToken()
- ]);
+$userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
- $InsertTemplate = Template\Factory::build('post/insert');
- $InsertTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_post_insert'));
- $MainTemplate->set('HTML', $InsertTemplate);
- echo $MainTemplate;
+foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
+ $User = User\Factory::build($userID);
+ $userAttributes[] = [
+ 'ID' => $User->attr('id'),
+ 'FULLNAME' => $User->attr('fullname'),
+ 'USERNAME' => $User->attr('username'),
+ ];
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$FormTemplate = Template\Factory::build('post/form');
+$FormTemplate->set('FORM', [
+ 'TYPE' => 'INSERT',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
+ 'USER_LIST' => $userAttributes ?? [],
+ 'TOKEN' => Application::getSecurityToken()
+]);
+
+$InsertTemplate = Template\Factory::build('post/insert');
+$InsertTemplate->set('HTML', $FormTemplate);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_post_insert'));
+$MainTemplate->set('HTML', $InsertTemplate);
+echo $MainTemplate;
diff --git a/admin/post/search.php b/admin/post/search.php
index ac472f8..261cc06 100644
--- a/admin/post/search.php
+++ b/admin/post/search.php
@@ -27,24 +27,14 @@ if($search = HTTP::GET('q')) {
}
#===============================================================================
-# TRY: Template\Exception
+# Build document
#===============================================================================
-try {
- $SearchTemplate = Template\Factory::build('post/search');
- $SearchTemplate->set('QUERY', $search);
- $SearchTemplate->set('POSTS', $posts ?? []);
+$SearchTemplate = Template\Factory::build('post/search');
+$SearchTemplate->set('QUERY', $search);
+$SearchTemplate->set('POSTS', $posts ?? []);
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_post_search'));
- $MainTemplate->set('HTML', $SearchTemplate);
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_post_search'));
+$MainTemplate->set('HTML', $SearchTemplate);
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+echo $MainTemplate;
diff --git a/admin/post/update.php b/admin/post/update.php
index d2cf979..d7778f8 100644
--- a/admin/post/update.php
+++ b/admin/post/update.php
@@ -39,45 +39,36 @@ try {
}
}
- #===============================================================================
- # TRY: Template\Exception
- #===============================================================================
- try {
- $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
-
- foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
- $User = User\Factory::build($userID);
- $userAttributes[] = [
- 'ID' => $User->attr('id'),
- 'FULLNAME' => $User->attr('fullname'),
- 'USERNAME' => $User->attr('username'),
- ];
- }
-
- $FormTemplate = Template\Factory::build('post/form');
- $FormTemplate->set('FORM', [
- 'TYPE' => 'UPDATE',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
- 'USER_LIST' => $userAttributes ?? [],
- 'TOKEN' => Application::getSecurityToken()
- ]);
+ $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE));
- $PostUpdateTemplate = Template\Factory::build('post/update');
- $PostUpdateTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_post_update'));
- $MainTemplate->set('HTML', $PostUpdateTemplate);
- echo $MainTemplate;
+ foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
+ $User = User\Factory::build($userID);
+ $userAttributes[] = [
+ 'ID' => $User->attr('id'),
+ 'FULLNAME' => $User->attr('fullname'),
+ 'USERNAME' => $User->attr('username'),
+ ];
}
#===============================================================================
- # CATCH: Template\Exception
+ # Build document
#===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ $FormTemplate = Template\Factory::build('post/form');
+ $FormTemplate->set('FORM', [
+ 'TYPE' => 'UPDATE',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER),
+ 'USER_LIST' => $userAttributes ?? [],
+ 'TOKEN' => Application::getSecurityToken()
+ ]);
+
+ $PostUpdateTemplate = Template\Factory::build('post/update');
+ $PostUpdateTemplate->set('HTML', $FormTemplate);
+
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('NAME', $Language->text('title_post_update'));
+ $MainTemplate->set('HTML', $PostUpdateTemplate);
+ echo $MainTemplate;
}
#===============================================================================
@@ -86,4 +77,3 @@ try {
catch(Post\Exception $Exception) {
Application::error404();
}
-?> \ No newline at end of file
diff --git a/admin/user/delete.php b/admin/user/delete.php
index 16f0d76..18a57cf 100644
--- a/admin/user/delete.php
+++ b/admin/user/delete.php
@@ -28,33 +28,24 @@ try {
}
#===============================================================================
- # TRY: Template\Exception
+ # Build document
#===============================================================================
- try {
- $FormTemplate = Template\Factory::build('user/form');
- $FormTemplate->set('HTML', $User->getHTML());
- $FormTemplate->set('FORM', [
- 'TYPE' => 'DELETE',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
- 'TOKEN' => Application::getSecurityToken()
- ]);
-
- $DeleteTemplate = Template\Factory::build('user/delete');
- $DeleteTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_user_delete'));
- $MainTemplate->set('HTML', $DeleteTemplate);
- echo $MainTemplate;
- }
-
- #===============================================================================
- # CATCH: Template\Exception
- #===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ $FormTemplate = Template\Factory::build('user/form');
+ $FormTemplate->set('HTML', $User->getHTML());
+ $FormTemplate->set('FORM', [
+ 'TYPE' => 'DELETE',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
+ 'TOKEN' => Application::getSecurityToken()
+ ]);
+
+ $DeleteTemplate = Template\Factory::build('user/delete');
+ $DeleteTemplate->set('HTML', $FormTemplate);
+
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('NAME', $Language->text('title_user_delete'));
+ $MainTemplate->set('HTML', $DeleteTemplate);
+ echo $MainTemplate;
}
#===============================================================================
@@ -63,4 +54,3 @@ try {
catch(User\Exception $Exception) {
Application::error404();
}
-?> \ No newline at end of file
diff --git a/admin/user/index.php b/admin/user/index.php
index dc5a4e7..8276d91 100644
--- a/admin/user/index.php
+++ b/admin/user/index.php
@@ -13,8 +13,8 @@ require '../../core/application.php';
#===============================================================================
# Pagination
#===============================================================================
-$site_size = Application::get('POST.LIST_SIZE');
-$site_sort = Application::get('POST.LIST_SORT');
+$site_size = Application::get('ADMIN.POST.LIST_SIZE');
+$site_sort = Application::get('ADMIN.POST.LIST_SORT');
$lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', User\Attribute::TABLE))->fetchColumn() / $site_size);
@@ -31,45 +31,35 @@ if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) {
$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
$Statement = $Database->query(sprintf($execSQL, User\Attribute::TABLE));
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- while($Attribute = $Statement->fetchObject('User\Attribute')) {
- try {
- $User = User\Factory::buildByAttribute($Attribute);
- $ItemTemplate = generateUserItemTemplate($User);
-
- $users[] = $ItemTemplate;
- } catch(User\Exception $Exception){}
- }
-
- $PaginationTemplate = Template\Factory::build('pagination');
- $PaginationTemplate->set('THIS', $currentSite);
- $PaginationTemplate->set('LAST', $lastSite);
- $PaginationTemplate->set('HREF', Application::getAdminURL('user/?site=%d'));
-
- $ListTemplate = Template\Factory::build('user/index');
- $ListTemplate->set('LIST', [
- 'USERS' => $users ?? []
- ]);
+while($Attribute = $Statement->fetchObject('User\Attribute')) {
+ try {
+ $User = User\Factory::buildByAttribute($Attribute);
+ $ItemTemplate = generateUserItemTemplate($User);
- $ListTemplate->set('PAGINATION', [
- 'THIS' => $currentSite,
- 'LAST' => $lastSite,
- 'HTML' => $PaginationTemplate
- ]);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_user_overview', $currentSite));
- $MainTemplate->set('HTML', $ListTemplate);
- echo $MainTemplate;
+ $users[] = $ItemTemplate;
+ } catch(User\Exception $Exception){}
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$PaginationTemplate = Template\Factory::build('pagination');
+$PaginationTemplate->set('THIS', $currentSite);
+$PaginationTemplate->set('LAST', $lastSite);
+$PaginationTemplate->set('HREF', Application::getAdminURL('user/?site=%d'));
+
+$ListTemplate = Template\Factory::build('user/index');
+$ListTemplate->set('LIST', [
+ 'USERS' => $users ?? []
+]);
+
+$ListTemplate->set('PAGINATION', [
+ 'THIS' => $currentSite,
+ 'LAST' => $lastSite,
+ 'HTML' => $PaginationTemplate
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_user_overview', $currentSite));
+$MainTemplate->set('HTML', $ListTemplate);
+echo $MainTemplate;
diff --git a/admin/user/insert.php b/admin/user/insert.php
index 53d35df..59b9444 100644
--- a/admin/user/insert.php
+++ b/admin/user/insert.php
@@ -40,30 +40,20 @@ if(HTTP::issetPOST('id', 'slug', 'username', 'password', 'fullname', 'mailaddr',
}
#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $FormTemplate = Template\Factory::build('user/form');
- $FormTemplate->set('FORM', [
- 'TYPE' => 'INSERT',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
- 'TOKEN' => Application::getSecurityToken()
- ]);
-
- $InsertTemplate = Template\Factory::build('user/insert');
- $InsertTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_user_insert'));
- $MainTemplate->set('HTML', $InsertTemplate);
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+# Build document
+#===============================================================================
+$FormTemplate = Template\Factory::build('user/form');
+$FormTemplate->set('FORM', [
+ 'TYPE' => 'INSERT',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
+ 'TOKEN' => Application::getSecurityToken()
+]);
+
+$InsertTemplate = Template\Factory::build('user/insert');
+$InsertTemplate->set('HTML', $FormTemplate);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_user_insert'));
+$MainTemplate->set('HTML', $InsertTemplate);
+echo $MainTemplate;
diff --git a/admin/user/update.php b/admin/user/update.php
index becfdc5..b9b5f08 100644
--- a/admin/user/update.php
+++ b/admin/user/update.php
@@ -30,8 +30,7 @@ try {
if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) {
try {
- if($Attribute->databaseUPDATE($Database)) {
- }
+ $Attribute->databaseUPDATE($Database);
} catch(PDOException $Exception) {
$messages[] = $Exception->getMessage();
}
@@ -42,33 +41,24 @@ try {
}
}
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
- try {
- $FormTemplate = Template\Factory::build('user/form');
- $FormTemplate->set('FORM', [
- 'TYPE' => 'UPDATE',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
- 'TOKEN' => Application::getSecurityToken()
- ]);
+ #===============================================================================
+ # Build document
+ #===============================================================================
+ $FormTemplate = Template\Factory::build('user/form');
+ $FormTemplate->set('FORM', [
+ 'TYPE' => 'UPDATE',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
+ 'TOKEN' => Application::getSecurityToken()
+ ]);
- $InsertTemplate = Template\Factory::build('user/update');
- $InsertTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_user_update'));
- $MainTemplate->set('HTML', $InsertTemplate);
- echo $MainTemplate;
- }
+ $InsertTemplate = Template\Factory::build('user/update');
+ $InsertTemplate->set('HTML', $FormTemplate);
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('NAME', $Language->text('title_user_update'));
+ $MainTemplate->set('HTML', $InsertTemplate);
+ echo $MainTemplate;
}
#===============================================================================
@@ -77,4 +67,3 @@ try {
catch(User\Exception $Exception) {
Application::error404();
}
-?> \ No newline at end of file
diff --git a/core/application.php b/core/application.php
index 7e4f731..a84669f 100644
--- a/core/application.php
+++ b/core/application.php
@@ -34,9 +34,9 @@ set_exception_handler(function(Throwable $Exception) {
HTTP::init($_GET, $_POST, $_FILES, TRUE);
#===============================================================================
-# Default configuration (can be overridden in configuration.php)
+# Set default configuration
#===============================================================================
-$configuration = [
+foreach([
'CORE.LANGUAGE' => 'en',
'CORE.SEND_304' => FALSE,
'BLOGMETA.NAME' => 'Example blog',
@@ -48,7 +48,7 @@ $configuration = [
'DATABASE.BASENAME' => 'blog',
'DATABASE.USERNAME' => 'blog',
'DATABASE.PASSWORD' => '',
- 'TEMPLATE.NAME' => 'standard',
+ 'TEMPLATE.NAME' => 'default',
'TEMPLATE.LANG' => 'en',
'ADMIN.TEMPLATE' => 'admin',
'ADMIN.LANGUAGE' => 'en',
@@ -82,12 +82,21 @@ $configuration = [
'POST.FEED_SORT' => 'time_insert DESC',
'PAGE.FEED_GUID' => ['id', 'time_insert'],
'POST.FEED_GUID' => ['id', 'time_insert']
-];
+] as $name => $value) {
+ Application::set($name, $value);
+}
#===============================================================================
-# Set default configuration
+# Set default configuration (for admin prefixes)
#===============================================================================
-foreach($configuration as $name => $value) {
+foreach([
+ 'ADMIN.PAGE.LIST_SIZE' => 12, # for 1/2/3-column grid layout
+ 'ADMIN.POST.LIST_SIZE' => 12, # for 1/2/3-column grid layout
+ 'ADMIN.USER.LIST_SIZE' => Application::get('USER.LIST_SIZE'),
+ 'ADMIN.PAGE.LIST_SORT' => Application::get('PAGE.LIST_SORT'),
+ 'ADMIN.POST.LIST_SORT' => Application::get('POST.LIST_SORT'),
+ 'ADMIN.USER.LIST_SORT' => Application::get('USER.LIST_SORT')
+] as $name => $value) {
Application::set($name, $value);
}
@@ -127,22 +136,23 @@ if(defined('ADMINISTRATION') AND ADMINISTRATION === TRUE) {
require 'functions.php';
#===============================================================================
-# TRY: PDOException
+# Get Language and Database singletons
#===============================================================================
-try {
- $Language = Application::getLanguage();
- $Database = Application::getDatabase();
-
- $Database->setAttribute($Database::ATTR_DEFAULT_FETCH_MODE, $Database::FETCH_ASSOC);
- $Database->setAttribute($Database::ATTR_ERRMODE, $Database::ERRMODE_EXCEPTION);
-}
+$Language = Application::getLanguage();
+$Database = Application::getDatabase();
#===============================================================================
-# CATCH: PDOException
+# Set Database attributes
#===============================================================================
-catch(PDOException $Exception) {
- Application::exit($Exception->getMessage());
-}
+$Database->setAttribute(
+ $Database::ATTR_DEFAULT_FETCH_MODE,
+ $Database::FETCH_ASSOC
+);
+
+$Database->setAttribute(
+ $Database::ATTR_ERRMODE,
+ $Database::ERRMODE_EXCEPTION
+);
#===============================================================================
# Check if "304 Not Modified" and ETag header should be sent
@@ -186,4 +196,3 @@ if(Application::get('CORE.SEND_304') === TRUE AND !defined('ADMINISTRATION')) {
}
}
}
-?> \ No newline at end of file
diff --git a/core/configuration-example.php b/core/configuration-example.php
index 6c7d40a..f99d130 100644
--- a/core/configuration-example.php
+++ b/core/configuration-example.php
@@ -13,6 +13,8 @@
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
+# setlocale(LC_TIME, ['en_US.utf8', 'en_US']);
+
Application::set('CORE.LANGUAGE', 'en');
Application::set('BLOGMETA.NAME', 'My Techblog');
Application::set('BLOGMETA.DESC', '[a creative description]');
@@ -22,7 +24,6 @@ Application::set('BLOGMETA.LANG', 'en');
Application::set('DATABASE.BASENAME', 'blog');
Application::set('DATABASE.USERNAME', '');
Application::set('DATABASE.PASSWORD', '');
-Application::set('TEMPLATE.NAME', 'standard');
+Application::set('TEMPLATE.NAME', 'default');
Application::set('TEMPLATE.LANG', Application::get('CORE.LANGUAGE'));
Application::set('ADMIN.LANGUAGE', Application::get('CORE.LANGUAGE'));
-?> \ No newline at end of file
diff --git a/database.sql b/core/db/database.sql
index 63c9765..ae61034 100644
--- a/database.sql
+++ b/core/db/database.sql
@@ -1,4 +1,11 @@
-- =============================================================================
+-- Internal information table for migrations
+-- =============================================================================
+CREATE TABLE `migration` (`schema_version` smallint(4) NOT NULL)
+ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+INSERT INTO `migration` (`schema_version`) VALUES (5);
+
+-- =============================================================================
-- Table structure for page items
-- =============================================================================
CREATE TABLE `page` (
@@ -46,9 +53,9 @@ CREATE TABLE `user` (
-- Insert demo page, post and user
-- =============================================================================
INSERT INTO `page` (`id`, `time_insert`, `time_update`, `user`, `slug`, `name`, `body`, `argv`) VALUES
-(1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 1, 'example-page', 'Example Page', 'OK. You discovered that there is also a page functionality. But what is the difference between a **page** and a **post**? This is simple: There is not really much difference. But you can style posts and pages within the templates CSS completely independent from each other. For example, use **pages** for things like your imprint, your terms of use, your FAQ or other stuff. And **posts** for your main blog posts. A **page** (and also a **user**) has exactly the same functionality as already described within the [first post]({POST[1]})! 8)', NULL);
+(1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 1, 'example-page', 'Example Page', 'OK. You discovered that there is also a page functionality. But what is the difference between a **page** and a **post**? This is simple: There is not really much difference. But you can style posts and pages within the themes CSS completely independent from each other. For example, use **pages** for things like your imprint, your terms of use, your FAQ or other stuff. And **posts** for your main blog posts. A **page** (and also a **user**) has exactly the same functionality as already described within the [first post]({POST[1]})! 8)', NULL);
INSERT INTO `post` (`id`, `time_insert`, `time_update`, `user`, `slug`, `name`, `body`, `argv`) VALUES
-(1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 1, 'hello-world', 'Hello World!', 'Hello! This is the automatically generated first post on your new blog installation. You can type [Markdown](https://daringfireball.net/projects/markdown/) plaintext into the editor to format your content as you want. In this post you can see several examples to [format your content with Markdown](https://daringfireball.net/projects/markdown/syntax) and with the special features provided by this blog application. After you are familiar with the text formatting and done with the exploration of your new blog application, you can delete this post and create your own. Have fun! :)\r\n\r\n![Demo image: Computer Guy (Public Domain)]({FILE[\"image/content/computer-guy-public-domain.svg\"]})\r\n\r\n## Parsing emoticons (if `POST.EMOTICONS` is `TRUE` within your `configuration.php`)\r\n> You can insert one or more of the following emoticons into your posts by typing the emoticon as simple ASCII text. The emoticon parser will convert your ASCII emoticon to the HTML multibyte unicode equivalent. Each emoticon comes with an further explanation if you just hold your mouse over a emoticons face: \r\n> :) :( :D :P :O ;) ;( :| :X :/ 8) :S xD ^^\r\n\r\n## Dynamic internal URLs for items\r\nIf you want to link an item, please do not put the URL to the item hardcoded into your content! What if you want to change your site address (or the base directory) in the future? Then you have to change all links in your content. This is not cool! Thus, you can use the following code **without spaces between the braces** by knowing the ID of an item to link it dynamically:\r\n\r\n1. Example: `{ POST[1] }` \r\n{POST[1]}\r\n\r\n2. Example: `{ PAGE[1] }` \r\n{PAGE[1]}\r\n\r\n3. Example: `{ USER[1] }` \r\n{USER[1]}\r\n\r\n## Dynamic internal URLs for other resources\r\nThis also applies to any other resource that exists in the blog system and that you want to link to! You can link any other resource dynamically either relative to your base directory or relative to your resource directory for static content:\r\n\r\n* Example: `{ BASE[\"foo/bar/\"] }` \r\n{BASE[\"foo/bar/\"]}\r\n\r\n* Example: `{ FILE[\"foo/bar/\"] }` \r\n{FILE[\"foo/bar/\"]}\r\n\r\n### Anywhere …\r\nYou can use these codes anywhere in your markdown plaintext. This codes will be pre-parsed before the markdown parser gets the content. If the markdown parser begins then all codes already have been converted into the URLs.', NULL);
+(1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 1, 'hello-world', 'Hello World!', 'Hello! This is the automatically generated first post on your new blog installation. You can type [Markdown](https://daringfireball.net/projects/markdown/) plaintext into the editor to format your content like you want.\r\n\r\nIn this post you can see several examples to [format your content with Markdown](https://daringfireball.net/projects/markdown/syntax) and with the *special codes* provided by this blog application. After you are familiar with the text formatting and done with the exploration of your new blog application, you can delete this post and create your own one. 😃\r\n\r\n![Demo image: Computer Guy (Public Domain)]({FILE[\"image/content/computer-guy-public-domain.svg\"]})\r\n\r\n## Dynamic internal URLs for items\r\nIf you want to link an item, please do not put the URL to the item hardcoded into your content! What if you want to change your sites address (or the base directory) in the future? Then you have to change all internal links in your content. This is not cool!\r\n\r\nTherefore, you can use the following code **without spaces between the braces** by knowing the unique ID of an item to link it dynamically:\r\n\r\n1. Example: `{ POST[1] }` \r\n{POST[1]}\r\n\r\n2. Example: `{ PAGE[1] }` \r\n{PAGE[1]}\r\n\r\n3. Example: `{ USER[1] }` \r\n{USER[1]}\r\n\r\n## Dynamic internal URLs for other resources\r\nThis also applies to any other resource that exists in the blog system and that you want to link to! You can link any other resource dynamically either relative to your base directory or relative to your resource directory (`/rsrc/`) for static files:\r\n\r\n* Example: `{ BASE[\"foo/bar/\"] }` \r\n{BASE[\"foo/bar/\"]}\r\n\r\n* Example: `{ FILE[\"foo/bar/\"] }` \r\n{FILE[\"foo/bar/\"]}', NULL);
INSERT INTO `user` (`id`, `time_insert`, `time_update`, `slug`, `username`, `password`, `fullname`, `mailaddr`, `body`, `argv`) VALUES
(1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'change-me', 'ChangeMe', '$2y$10$jH48L1K1y9dB303aI2biN.ob0biZDuUbMxPKadi3wDqOIxj6yNT6K', 'John Doe', 'mail@example.org', 'Describe yourself.', NULL);
@@ -76,4 +83,4 @@ ALTER TABLE `user` MODIFY `id` tinyint(4) NOT NULL AUTO_INCREMENT;
-- Add foreign keys for data integrity
-- =============================================================================
ALTER TABLE `page` ADD CONSTRAINT `page_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
-ALTER TABLE `post` ADD CONSTRAINT `post_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file
+ALTER TABLE `post` ADD CONSTRAINT `post_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/core/db/migrations/1.sql b/core/db/migrations/1.sql
new file mode 100644
index 0000000..a875d13
--- /dev/null
+++ b/core/db/migrations/1.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `page` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`;
+ALTER TABLE `post` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`;
+ALTER TABLE `user` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`;
diff --git a/core/db/migrations/2.sql b/core/db/migrations/2.sql
new file mode 100644
index 0000000..525b768
--- /dev/null
+++ b/core/db/migrations/2.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `page` ADD UNIQUE KEY `time_insert` (`time_insert`);
+ALTER TABLE `post` ADD UNIQUE KEY `time_insert` (`time_insert`);
+ALTER TABLE `user` ADD UNIQUE KEY `time_insert` (`time_insert`);
diff --git a/core/db/migrations/3.sql b/core/db/migrations/3.sql
new file mode 100644
index 0000000..ae46ed0
--- /dev/null
+++ b/core/db/migrations/3.sql
@@ -0,0 +1,6 @@
+ALTER TABLE `post` ENGINE=InnoDB;
+ALTER TABLE `post` DROP INDEX `body`;
+ALTER TABLE `page` ADD FULLTEXT KEY `search` (`name`, `body`);
+ALTER TABLE `post` ADD FULLTEXT KEY `search` (`name`, `body`);
+ALTER TABLE `post` ADD CONSTRAINT `post_user` FOREIGN KEY (`user`)
+ REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/core/db/migrations/4.sql b/core/db/migrations/4.sql
new file mode 100644
index 0000000..4a26c48
--- /dev/null
+++ b/core/db/migrations/4.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `page` MODIFY `argv` VARCHAR(250);
+ALTER TABLE `post` MODIFY `argv` VARCHAR(250);
+ALTER TABLE `user` MODIFY `argv` VARCHAR(250);
diff --git a/core/db/migrations/5.sql b/core/db/migrations/5.sql
new file mode 100644
index 0000000..a3c8e5a
--- /dev/null
+++ b/core/db/migrations/5.sql
@@ -0,0 +1,3 @@
+CREATE TABLE `migration` (`schema_version` smallint(4) NOT NULL)
+ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+INSERT INTO `migration` (`schema_version`) VALUES (5);
diff --git a/core/functions.php b/core/functions.php
index ad63334..517be51 100644
--- a/core/functions.php
+++ b/core/functions.php
@@ -107,37 +107,12 @@ function generateItemTemplateData(Item $Item): array {
# Parser for datetime formatted strings [YYYY-MM-DD HH:II:SS]
#===============================================================================
function parseDatetime($datetime, $format): string {
- $Language = Application::getLanguage();
-
list($date, $time) = explode(' ', $datetime);
list($DATE['Y'], $DATE['M'], $DATE['D']) = explode('-', $date);
list($TIME['H'], $TIME['M'], $TIME['S']) = explode(':', $time);
- $M_LIST = [
- '01' => $Language->text('month_01'),
- '02' => $Language->text('month_02'),
- '03' => $Language->text('month_03'),
- '04' => $Language->text('month_04'),
- '05' => $Language->text('month_05'),
- '06' => $Language->text('month_06'),
- '07' => $Language->text('month_07'),
- '08' => $Language->text('month_08'),
- '09' => $Language->text('month_09'),
- '10' => $Language->text('month_10'),
- '11' => $Language->text('month_11'),
- '12' => $Language->text('month_12'),
- ];
-
- $D_LIST = [
- 0 => $Language->text('day_6'),
- 1 => $Language->text('day_0'),
- 2 => $Language->text('day_1'),
- 3 => $Language->text('day_2'),
- 4 => $Language->text('day_3'),
- 5 => $Language->text('day_4'),
- 6 => $Language->text('day_5'),
- ];
+ $unixtime = strtotime($datetime);
return strtr($format, [
'[Y]' => $DATE['Y'],
@@ -146,11 +121,11 @@ function parseDatetime($datetime, $format): string {
'[H]' => $TIME['H'],
'[I]' => $TIME['M'],
'[S]' => $TIME['S'],
- '[W]' => $D_LIST[date('w', strtotime($datetime))],
- '[F]' => $M_LIST[date('m', strtotime($datetime))],
+ '[W]' => strftime('%A', $unixtime),
+ '[F]' => strftime('%B', $unixtime),
'[DATE]' => $date,
'[TIME]' => $time,
- '[RFC2822]' => date('r', strtotime($datetime))
+ '[RFC2822]' => date('r', $unixtime)
]);
}
@@ -184,7 +159,45 @@ function getEmoticons(): array {
function parseEmoticons($string): string {
foreach(getEmoticons() as $emoticon => $data) {
$pattern = '#(^|\s)'.preg_quote($emoticon).'#';
- $replace = " <span title=\"{$data[1]}\">{$data[0]}</span>";
+ $replace = "\\1<span title=\"{$data[1]}\">{$data[0]}</span>";
+
+ $string = preg_replace($pattern, $replace, $string);
+ }
+
+ return $string;
+}
+
+#===============================================================================
+# Get unicode emoticons with their corresponding explanation
+#===============================================================================
+function getUnicodeEmoticons(): array {
+ $Language = Application::getLanguage();
+
+ return [
+ html_entity_decode('&#x1F60A;') => $Language->text('emoticon_1F60A'),
+ html_entity_decode('&#x1F61E;') => $Language->text('emoticon_1F61E'),
+ html_entity_decode('&#x1F603;') => $Language->text('emoticon_1F603'),
+ html_entity_decode('&#x1F61B;') => $Language->text('emoticon_1F61B'),
+ html_entity_decode('&#x1F632;') => $Language->text('emoticon_1F632'),
+ html_entity_decode('&#x1F609;') => $Language->text('emoticon_1F609'),
+ html_entity_decode('&#x1F622;') => $Language->text('emoticon_1F622'),
+ html_entity_decode('&#x1F610;') => $Language->text('emoticon_1F610'),
+ html_entity_decode('&#x1F635;') => $Language->text('emoticon_1F635'),
+ html_entity_decode('&#x1F612;') => $Language->text('emoticon_1F612'),
+ html_entity_decode('&#x1F60E;') => $Language->text('emoticon_1F60E'),
+ html_entity_decode('&#x1F61F;') => $Language->text('emoticon_1F61F'),
+ html_entity_decode('&#x1F602;') => $Language->text('emoticon_1F602'),
+ html_entity_decode('&#x1F604;') => $Language->text('emoticon_1F604'),
+ ];
+}
+
+#===============================================================================
+# Wrap emoticons in <span> element with "title" attribute for explanation
+#===============================================================================
+function parseUnicodeEmoticons($string): string {
+ foreach(getUnicodeEmoticons() as $emoticon => $explanation) {
+ $pattern = '#(^|\s)'.preg_quote($emoticon).'#';
+ $replace = "\\1<span title=\"{$explanation}\">{$emoticon}</span>";
$string = preg_replace($pattern, $replace, $string);
}
@@ -221,13 +234,6 @@ function removeWhitespace($string): string {
}
#===============================================================================
-# Return pseudo-random (hex converted) string
-#===============================================================================
-function getRandomValue($length = 40): string {
- return strtoupper(bin2hex(random_bytes(ceil($length / 2))));
-}
-
-#===============================================================================
# Return truncated string
#===============================================================================
function truncate($string, $length, $replace = '') {
@@ -318,4 +324,3 @@ function USER(int $id): array {
return [];
}
}
-?> \ No newline at end of file
diff --git a/core/include/feed/main.php b/core/include/feed/main.php
index 84f3edb..59be3d1 100644
--- a/core/include/feed/main.php
+++ b/core/include/feed/main.php
@@ -11,73 +11,69 @@ $Language = Application::getLanguage();
HTTP::responseHeader(HTTP::HEADER_CONTENT_TYPE, HTTP::CONTENT_TYPE_XML);
#===============================================================================
-# TRY: Template\Exception
+# Post feed
#===============================================================================
-try {
- if(!isset($param) OR $param !== 'page') {
- $POST['FEED_SORT'] = Application::get('POST.FEED_SORT');
- $POST['FEED_SIZE'] = Application::get('POST.FEED_SIZE');
+if(!isset($param) OR $param !== 'page') {
+ $POST['FEED_SORT'] = Application::get('POST.FEED_SORT');
+ $POST['FEED_SIZE'] = Application::get('POST.FEED_SIZE');
- $execSQL = "SELECT * FROM %s ORDER BY {$POST['FEED_SORT']} LIMIT {$POST['FEED_SIZE']}";
- $Statement = $Database->query(sprintf($execSQL, Post\Attribute::TABLE));
+ $execSQL = "SELECT * FROM %s ORDER BY {$POST['FEED_SORT']} LIMIT {$POST['FEED_SIZE']}";
+ $Statement = $Database->query(sprintf($execSQL, Post\Attribute::TABLE));
- while($Attribute = $Statement->fetchObject('Post\Attribute')) {
- try {
- $Post = Post\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Post->attr('user'));
+ while($Attribute = $Statement->fetchObject('Post\Attribute')) {
+ try {
+ $Post = Post\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Post->attr('user'));
- $ItemTemplate = Template\Factory::build('feed/item_post');
- $ItemTemplate->set('POST', generateItemTemplateData($Post));
- $ItemTemplate->set('USER', generateItemTemplateData($User));
+ $ItemTemplate = Template\Factory::build('feed/item_post');
+ $ItemTemplate->set('POST', generateItemTemplateData($Post));
+ $ItemTemplate->set('USER', generateItemTemplateData($User));
- $posts[] = $ItemTemplate;
- }
-
- catch(Post\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $posts[] = $ItemTemplate;
}
- }
- if(!isset($param) OR $param !== 'post') {
- $PAGE['FEED_SORT'] = Application::get('PAGE.FEED_SORT');
- $PAGE['FEED_SIZE'] = Application::get('PAGE.FEED_SIZE');
+ catch(Post\Exception $Exception){}
+ catch(User\Exception $Exception){}
+ }
+}
- $execSQL = "SELECT * FROM %s ORDER BY {$PAGE['FEED_SORT']} LIMIT {$PAGE['FEED_SIZE']}";
- $Statement = $Database->query(sprintf($execSQL, Page\Attribute::TABLE));
+#===============================================================================
+# Page feed
+#===============================================================================
+if(!isset($param) OR $param !== 'post') {
+ $PAGE['FEED_SORT'] = Application::get('PAGE.FEED_SORT');
+ $PAGE['FEED_SIZE'] = Application::get('PAGE.FEED_SIZE');
- while($Attribute = $Statement->fetchObject('Page\Attribute')) {
- try {
- $Page = Page\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Page->attr('user'));
+ $execSQL = "SELECT * FROM %s ORDER BY {$PAGE['FEED_SORT']} LIMIT {$PAGE['FEED_SIZE']}";
+ $Statement = $Database->query(sprintf($execSQL, Page\Attribute::TABLE));
- $ItemTemplate = Template\Factory::build('feed/item_page');
- $ItemTemplate->set('PAGE', generateItemTemplateData($Page));
- $ItemTemplate->set('USER', generateItemTemplateData($User));
+ while($Attribute = $Statement->fetchObject('Page\Attribute')) {
+ try {
+ $Page = Page\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Page->attr('user'));
- $pages[] = $ItemTemplate;
- }
+ $ItemTemplate = Template\Factory::build('feed/item_page');
+ $ItemTemplate->set('PAGE', generateItemTemplateData($Page));
+ $ItemTemplate->set('USER', generateItemTemplateData($User));
- catch(Page\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $pages[] = $ItemTemplate;
}
- }
-
- $FeedTemplate = Template\Factory::build('feed/main');
- $FeedTemplate->set('FEED', [
- 'TYPE' => $param ?? NULL,
- 'LIST' => [
- 'POSTS' => $posts ?? [],
- 'PAGES' => $pages ?? [],
- ]
- ]);
- echo $FeedTemplate;
+ catch(Page\Exception $Exception){}
+ catch(User\Exception $Exception){}
+ }
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$FeedTemplate = Template\Factory::build('feed/main');
+$FeedTemplate->set('FEED', [
+ 'TYPE' => $param ?? NULL,
+ 'LIST' => [
+ 'POSTS' => $posts ?? [],
+ 'PAGES' => $pages ?? [],
+ ]
+]);
+
+echo $FeedTemplate;
diff --git a/core/include/home.php b/core/include/home.php
index 2fe81a2..fe732de 100644
--- a/core/include/home.php
+++ b/core/include/home.php
@@ -5,49 +5,39 @@
$Database = Application::getDatabase();
$Language = Application::getLanguage();
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $execSQL = 'SELECT * FROM %s ORDER BY '.Application::get('POST.LIST_SORT').' LIMIT '.Application::get('POST.LIST_SIZE');
- $Statement = $Database->query(sprintf($execSQL, Post\Attribute::TABLE));
+$execSQL = 'SELECT * FROM %s ORDER BY '.Application::get('POST.LIST_SORT').' LIMIT '.Application::get('POST.LIST_SIZE');
+$Statement = $Database->query(sprintf($execSQL, Post\Attribute::TABLE));
- while($Attribute = $Statement->fetchObject('Post\Attribute')) {
- try {
- $Post = Post\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Post->attr('user'));
+while($Attribute = $Statement->fetchObject('Post\Attribute')) {
+ try {
+ $Post = Post\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Post->attr('user'));
- $ItemTemplate = generatePostItemTemplate($Post, $User);
+ $ItemTemplate = generatePostItemTemplate($Post, $User);
- $posts[] = $ItemTemplate;
- }
- catch(Post\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $posts[] = $ItemTemplate;
}
-
- $HomeTemplate = Template\Factory::build('home');
- $HomeTemplate->set('PAGINATION', [
- 'HTML' => generatePostNaviTemplate(1)
- ]);
- $HomeTemplate->set('LIST', [
- 'POSTS' => $posts ?? []
- ]);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $HomeTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => Application::get('BLOGMETA.HOME'),
- 'DESC' => Application::get('BLOGMETA.NAME').' – '.Application::get('BLOGMETA.DESC'),
- 'PERM' => Application::getURL()
- ]);
-
- echo $MainTemplate;
+ catch(Post\Exception $Exception){}
+ catch(User\Exception $Exception){}
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$HomeTemplate = Template\Factory::build('home');
+$HomeTemplate->set('PAGINATION', [
+ 'HTML' => generatePostNaviTemplate(1)
+]);
+$HomeTemplate->set('LIST', [
+ 'POSTS' => $posts ?? []
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('HTML', $HomeTemplate);
+$MainTemplate->set('HEAD', [
+ 'NAME' => Application::get('BLOGMETA.HOME'),
+ 'DESC' => Application::get('BLOGMETA.NAME').' – '.Application::get('BLOGMETA.DESC'),
+ 'PERM' => Application::getURL()
+]);
+
+echo $MainTemplate;
diff --git a/core/include/page/list.php b/core/include/page/list.php
index 656d01a..2bb2639 100644
--- a/core/include/page/list.php
+++ b/core/include/page/list.php
@@ -30,49 +30,39 @@ if(Application::get('PAGE.SINGLE_REDIRECT') === TRUE AND $count === '1') {
HTTP::redirect($Page->getURL());
}
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
- $Statement = $Database->query(sprintf($execSQL, Page\Attribute::TABLE));
+$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
+$Statement = $Database->query(sprintf($execSQL, Page\Attribute::TABLE));
- while($Attribute = $Statement->fetchObject('Page\Attribute')) {
- try {
- $Page = Page\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Page->attr('user'));
+while($Attribute = $Statement->fetchObject('Page\Attribute')) {
+ try {
+ $Page = Page\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Page->attr('user'));
- $ItemTemplate = generatePageItemTemplate($Page, $User);
+ $ItemTemplate = generatePageItemTemplate($Page, $User);
- $pages[] = $ItemTemplate;
- }
- catch(Page\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $pages[] = $ItemTemplate;
}
-
- $ListTemplate = Template\Factory::build('page/list');
- $ListTemplate->set('PAGINATION', [
- 'THIS' => $currentSite,
- 'LAST' => $lastSite,
- 'HTML' => generatePageNaviTemplate($currentSite)
- ]);
- $ListTemplate->set('LIST', [
- 'PAGES' => $pages ?? []
- ]);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $ListTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $Language->text('title_page_overview', $currentSite)
- ]);
-
- echo $MainTemplate;
+ catch(Page\Exception $Exception){}
+ catch(User\Exception $Exception){}
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$ListTemplate = Template\Factory::build('page/list');
+$ListTemplate->set('PAGINATION', [
+ 'THIS' => $currentSite,
+ 'LAST' => $lastSite,
+ 'HTML' => generatePageNaviTemplate($currentSite)
+]);
+$ListTemplate->set('LIST', [
+ 'PAGES' => $pages ?? []
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('HTML', $ListTemplate);
+$MainTemplate->set('HEAD', [
+ 'NAME' => $Language->text('title_page_overview', $currentSite)
+]);
+
+echo $MainTemplate;
diff --git a/core/include/page/main.php b/core/include/page/main.php
index 7f1aa02..955bb35 100644
--- a/core/include/page/main.php
+++ b/core/include/page/main.php
@@ -6,7 +6,7 @@ $Database = Application::getDatabase();
$Language = Application::getLanguage();
#===============================================================================
-# TRY: Page\Exception, User\Exception
+# TRY: Page\Exception
#===============================================================================
try {
if(Application::get('PAGE.SLUG_URLS')) {
@@ -36,36 +36,27 @@ try {
} catch(Page\Exception $Exception){}
#===============================================================================
- # TRY: Template\Exception
+ # Build document
#===============================================================================
- try {
- $PageTemplate = Template\Factory::build('page/main');
- $PageTemplate->set('PAGE', $page_data);
- $PageTemplate->set('USER', $user_data);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $PageTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $page_data['ATTR']['NAME'],
- 'DESC' => description($page_data['BODY']['HTML'](), Application::get('PAGE.DESCRIPTION_SIZE')),
- 'PERM' => $page_data['URL'],
- 'OG_IMAGES' => $page_data['FILE']['LIST']
- ]);
+ $PageTemplate = Template\Factory::build('page/main');
+ $PageTemplate->set('PAGE', $page_data);
+ $PageTemplate->set('USER', $user_data);
- # Get access to the current item data from main template
- $MainTemplate->set('TYPE', 'PAGE');
- $MainTemplate->set('PAGE', $page_data);
- $MainTemplate->set('USER', $user_data);
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('HTML', $PageTemplate);
+ $MainTemplate->set('HEAD', [
+ 'NAME' => $page_data['ATTR']['NAME'],
+ 'DESC' => description($page_data['BODY']['HTML'](), Application::get('PAGE.DESCRIPTION_SIZE')),
+ 'PERM' => $page_data['URL'],
+ 'OG_IMAGES' => $page_data['FILE']['LIST']
+ ]);
- echo $MainTemplate;
- }
+ # Get access to the current item data from main template
+ $MainTemplate->set('TYPE', 'PAGE');
+ $MainTemplate->set('PAGE', $page_data);
+ $MainTemplate->set('USER', $user_data);
- #===============================================================================
- # CATCH: Template\Exception
- #===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ echo $MainTemplate;
}
#===============================================================================
@@ -86,11 +77,3 @@ catch(Page\Exception $Exception) {
Application::error404();
}
}
-
-#===============================================================================
-# CATCH: User\Exception
-#===============================================================================
-catch(User\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
diff --git a/core/include/post/list.php b/core/include/post/list.php
index 6ade592..68183c7 100644
--- a/core/include/post/list.php
+++ b/core/include/post/list.php
@@ -30,49 +30,39 @@ if(Application::get('POST.SINGLE_REDIRECT') === TRUE AND $count === '1') {
HTTP::redirect($Post->getURL());
}
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
- $Statement = $Database->query(sprintf($execSQL, Post\Attribute::TABLE));
+$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
+$Statement = $Database->query(sprintf($execSQL, Post\Attribute::TABLE));
- while($Attribute = $Statement->fetchObject('Post\Attribute')) {
- try {
- $Post = Post\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Post->attr('user'));
+while($Attribute = $Statement->fetchObject('Post\Attribute')) {
+ try {
+ $Post = Post\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Post->attr('user'));
- $ItemTemplate = generatePostItemTemplate($Post, $User);
+ $ItemTemplate = generatePostItemTemplate($Post, $User);
- $posts[] = $ItemTemplate;
- }
- catch(Post\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $posts[] = $ItemTemplate;
}
-
- $ListTemplate = Template\Factory::build('post/list');
- $ListTemplate->set('PAGINATION', [
- 'THIS' => $currentSite,
- 'LAST' => $lastSite,
- 'HTML' => generatePostNaviTemplate($currentSite)
- ]);
- $ListTemplate->set('LIST', [
- 'POSTS' => $posts ?? []
- ]);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $ListTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $Language->text('title_post_overview', $currentSite)
- ]);
-
- echo $MainTemplate;
+ catch(Post\Exception $Exception){}
+ catch(User\Exception $Exception){}
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$ListTemplate = Template\Factory::build('post/list');
+$ListTemplate->set('PAGINATION', [
+ 'THIS' => $currentSite,
+ 'LAST' => $lastSite,
+ 'HTML' => generatePostNaviTemplate($currentSite)
+]);
+$ListTemplate->set('LIST', [
+ 'POSTS' => $posts ?? []
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('HTML', $ListTemplate);
+$MainTemplate->set('HEAD', [
+ 'NAME' => $Language->text('title_post_overview', $currentSite)
+]);
+
+echo $MainTemplate;
diff --git a/core/include/post/main.php b/core/include/post/main.php
index aa5dc50..8c65740 100644
--- a/core/include/post/main.php
+++ b/core/include/post/main.php
@@ -6,7 +6,7 @@ $Database = Application::getDatabase();
$Language = Application::getLanguage();
#===============================================================================
-# TRY: Post\Exception, User\Exception
+# TRY: Post\Exception
#===============================================================================
try {
if(Application::get('POST.SLUG_URLS')) {
@@ -36,36 +36,27 @@ try {
} catch(Post\Exception $Exception){}
#===============================================================================
- # TRY: Template\Exception
+ # Build document
#===============================================================================
- try {
- $PostTemplate = Template\Factory::build('post/main');
- $PostTemplate->set('POST', $post_data);
- $PostTemplate->set('USER', $user_data);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $PostTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $post_data['ATTR']['NAME'],
- 'DESC' => description($post_data['BODY']['HTML'](), Application::get('POST.DESCRIPTION_SIZE')),
- 'PERM' => $post_data['URL'],
- 'OG_IMAGES' => $post_data['FILE']['LIST']
- ]);
+ $PostTemplate = Template\Factory::build('post/main');
+ $PostTemplate->set('POST', $post_data);
+ $PostTemplate->set('USER', $user_data);
- # Get access to the current item data from main template
- $MainTemplate->set('TYPE', 'POST');
- $MainTemplate->set('POST', $post_data);
- $MainTemplate->set('USER', $user_data);
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('HTML', $PostTemplate);
+ $MainTemplate->set('HEAD', [
+ 'NAME' => $post_data['ATTR']['NAME'],
+ 'DESC' => description($post_data['BODY']['HTML'](), Application::get('POST.DESCRIPTION_SIZE')),
+ 'PERM' => $post_data['URL'],
+ 'OG_IMAGES' => $post_data['FILE']['LIST']
+ ]);
- echo $MainTemplate;
- }
+ # Get access to the current item data from main template
+ $MainTemplate->set('TYPE', 'POST');
+ $MainTemplate->set('POST', $post_data);
+ $MainTemplate->set('USER', $user_data);
- #===============================================================================
- # CATCH: Template\Exception
- #===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ echo $MainTemplate;
}
#===============================================================================
@@ -86,11 +77,3 @@ catch(Post\Exception $Exception) {
Application::error404();
}
}
-
-#===============================================================================
-# CATCH: User\Exception
-#===============================================================================
-catch(User\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
diff --git a/core/include/search/main.php b/core/include/search/main.php
index 5a9708e..ac7e23a 100644
--- a/core/include/search/main.php
+++ b/core/include/search/main.php
@@ -35,56 +35,46 @@ $search_data = [
];
#===============================================================================
-# TRY: Template\Exception
+# Build document
#===============================================================================
-try {
- if(isset($attributes) AND !empty($attributes)) {
- foreach($attributes as $Attribute) {
- try {
- $Post = Post\Factory::buildByAttribute($Attribute);
- $User = User\Factory::build($Post->attr('user'));
+if(isset($attributes) AND !empty($attributes)) {
+ foreach($attributes as $Attribute) {
+ try {
+ $Post = Post\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Post->attr('user'));
- $posts[] = generatePostItemTemplate($Post, $User);
- }
- catch(Post\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $posts[] = generatePostItemTemplate($Post, $User);
}
-
- $ResultTemplate = Template\Factory::build('search/result');
- $ResultTemplate->set('FORM', $form_data);
- $ResultTemplate->set('SEARCH', $search_data);
- $ResultTemplate->set('RESULT', [
- 'LIST' => $posts ?? []
- ]);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $ResultTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $Language->text('title_search_results', escapeHTML($search)),
- 'PERM' => Application::getURL('search/')
- ]);
+ catch(Post\Exception $Exception){}
+ catch(User\Exception $Exception){}
}
- else {
- $SearchTemplate = Template\Factory::build('search/main');
- $SearchTemplate->set('FORM', $form_data);
- $SearchTemplate->set('SEARCH', $search_data);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $SearchTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $Language->text('title_search_request'),
- 'PERM' => Application::getURL('search/')
- ]);
- }
+ $ResultTemplate = Template\Factory::build('search/result');
+ $ResultTemplate->set('FORM', $form_data);
+ $ResultTemplate->set('SEARCH', $search_data);
+ $ResultTemplate->set('RESULT', [
+ 'LIST' => $posts ?? []
+ ]);
- echo $MainTemplate;
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('HTML', $ResultTemplate);
+ $MainTemplate->set('HEAD', [
+ 'NAME' => $Language->text('title_search_results', escapeHTML($search)),
+ 'PERM' => Application::getURL('search/')
+ ]);
}
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
+else {
+ $SearchTemplate = Template\Factory::build('search/main');
+ $SearchTemplate->set('FORM', $form_data);
+ $SearchTemplate->set('SEARCH', $search_data);
+
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('HTML', $SearchTemplate);
+ $MainTemplate->set('HEAD', [
+ 'NAME' => $Language->text('title_search_request'),
+ 'PERM' => Application::getURL('search/')
+ ]);
}
-?> \ No newline at end of file
+
+echo $MainTemplate;
diff --git a/core/include/user/list.php b/core/include/user/list.php
index adc28ec..72375a4 100644
--- a/core/include/user/list.php
+++ b/core/include/user/list.php
@@ -30,45 +30,44 @@ if(Application::get('USER.SINGLE_REDIRECT') === TRUE AND $count === '1') {
HTTP::redirect($User->getURL());
}
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
- $Statement = $Database->query(sprintf($execSQL, User\Attribute::TABLE));
+$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
+$Statement = $Database->query(sprintf($execSQL, User\Attribute::TABLE));
- while($Attribute = $Statement->fetchObject('User\Attribute')) {
- try {
- $User = User\Factory::buildByAttribute($Attribute);
- $ItemTemplate = generateUserItemTemplate($User);
+while($Attribute = $Statement->fetchObject('User\Attribute')) {
+ try {
+ $User = User\Factory::buildByAttribute($Attribute);
+ $ItemTemplate = generateUserItemTemplate($User);
- $users[] = $ItemTemplate;
- } catch(User\Exception $Exception){}
- }
-
- $ListTemplate = Template\Factory::build('user/list');
- $ListTemplate->set('PAGINATION', [
- 'THIS' => $currentSite,
- 'LAST' => $lastSite,
- 'HTML' => generateUserNaviTemplate($currentSite)
- ]);
- $ListTemplate->set('LIST', [
- 'USERS' => $users ?? []
- ]);
+ $users[] = $ItemTemplate;
+ } catch(User\Exception $Exception){}
+}
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $ListTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $Language->text('title_user_overview', $currentSite)
- ]);
+foreach($userIDs as $userID) {
+ try {
+ $User = User\Factory::build($userID);
+ $ItemTemplate = generateUserItemTemplate($User);
- echo $MainTemplate;
+ $users[] = $ItemTemplate;
+ } catch(User\Exception $Exception){}
}
#===============================================================================
-# CATCH: Template\Exception
+# Build document
#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$ListTemplate = Template\Factory::build('user/list');
+$ListTemplate->set('PAGINATION', [
+ 'THIS' => $currentSite,
+ 'LAST' => $lastSite,
+ 'HTML' => generateUserNaviTemplate($currentSite)
+]);
+$ListTemplate->set('LIST', [
+ 'USERS' => $users ?? []
+]);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('HTML', $ListTemplate);
+$MainTemplate->set('HEAD', [
+ 'NAME' => $Language->text('title_user_overview', $currentSite)
+]);
+
+echo $MainTemplate;
diff --git a/core/include/user/main.php b/core/include/user/main.php
index 4f30020..80969da 100644
--- a/core/include/user/main.php
+++ b/core/include/user/main.php
@@ -32,54 +32,33 @@ try {
$user_data['NEXT'] = generateItemTemplateData($NextUser);
} catch(User\Exception $Exception){}
+ $PostCountStatement = $Database->query(sprintf('SELECT COUNT(*) FROM %s WHERE user = %d', Post\Attribute::TABLE, $User->getID()));
+ $PageCountStatement = $Database->query(sprintf('SELECT COUNT(*) FROM %s WHERE user = %d', Page\Attribute::TABLE, $User->getID()));
+
#===============================================================================
- # TRY: Template\Exception
+ # Build document
#===============================================================================
- try {
- #===============================================================================
- # TRY: PDOException
- #===============================================================================
- try {
- $PostCountStatement = $Database->query(sprintf('SELECT COUNT(*) FROM %s WHERE user = %d', Post\Attribute::TABLE, $User->getID()));
- $PageCountStatement = $Database->query(sprintf('SELECT COUNT(*) FROM %s WHERE user = %d', Page\Attribute::TABLE, $User->getID()));
- }
-
- #===============================================================================
- # CATCH: PDOException
- #===============================================================================
- catch(PDOException $Exception) {
- exit($Exception->getMessage());
- }
-
- $UserTemplate = Template\Factory::build('user/main');
- $UserTemplate->set('USER', $user_data);
- $UserTemplate->set('COUNT', [
- 'POST' => $PostCountStatement->fetchColumn(),
- 'PAGE' => $PageCountStatement->fetchColumn()
- ]);
+ $UserTemplate = Template\Factory::build('user/main');
+ $UserTemplate->set('USER', $user_data);
+ $UserTemplate->set('COUNT', [
+ 'POST' => $PostCountStatement->fetchColumn(),
+ 'PAGE' => $PageCountStatement->fetchColumn()
+ ]);
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('HTML', $UserTemplate);
- $MainTemplate->set('HEAD', [
- 'NAME' => $user_data['ATTR']['FULLNAME'],
- 'DESC' => description($user_data['BODY']['HTML'](), Application::get('USER.DESCRIPTION_SIZE')),
- 'PERM' => $User->getURL(),
- 'OG_IMAGES' => $User->getFiles()
- ]);
+ $MainTemplate = Template\Factory::build('main');
+ $MainTemplate->set('HTML', $UserTemplate);
+ $MainTemplate->set('HEAD', [
+ 'NAME' => $user_data['ATTR']['FULLNAME'],
+ 'DESC' => description($user_data['BODY']['HTML'](), Application::get('USER.DESCRIPTION_SIZE')),
+ 'PERM' => $User->getURL(),
+ 'OG_IMAGES' => $User->getFiles()
+ ]);
- # Get access to the current item data from main template
- $MainTemplate->set('TYPE', 'USER');
- $MainTemplate->set('USER', $user_data);
+ # Get access to the current item data from main template
+ $MainTemplate->set('TYPE', 'USER');
+ $MainTemplate->set('USER', $user_data);
- echo $MainTemplate;
- }
-
- #===============================================================================
- # CATCH: Template\Exception
- #===============================================================================
- catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
- }
+ echo $MainTemplate;
}
#===============================================================================
@@ -100,4 +79,3 @@ catch(User\Exception $Exception) {
Application::error404();
}
}
-?> \ No newline at end of file
diff --git a/core/language/de.php b/core/language/de.php
index 5d29d5d..2f008da 100644
--- a/core/language/de.php
+++ b/core/language/de.php
@@ -210,4 +210,3 @@ $LANGUAGE['title_search_results'] = 'Ergebnisse für "%s"';
$LANGUAGE['feed_name_items'] = '%s [alle Inhalte]';
$LANGUAGE['feed_name_pages'] = '%s [nur Seiten]';
$LANGUAGE['feed_name_posts'] = '%s [nur Beiträge]';
-?> \ No newline at end of file
diff --git a/core/language/en.php b/core/language/en.php
index dc70154..eeec0a9 100644
--- a/core/language/en.php
+++ b/core/language/en.php
@@ -210,4 +210,3 @@ $LANGUAGE['title_search_results'] = 'Results for "%s"';
$LANGUAGE['feed_name_items'] = '%s [all content]';
$LANGUAGE['feed_name_pages'] = '%s [only pages]';
$LANGUAGE['feed_name_posts'] = '%s [only posts]';
-?> \ No newline at end of file
diff --git a/core/namespace/Application.php b/core/namespace/Application.php
index 8c3be12..6a77865 100644
--- a/core/namespace/Application.php
+++ b/core/namespace/Application.php
@@ -59,7 +59,7 @@ class Application {
$Language = new Language(self::get('CORE.LANGUAGE'));
$Language->load(sprintf(ROOT.'core/language/%s.php', Application::get('CORE.LANGUAGE')));
- $Language->load(sprintf(ROOT.'template/%s/lang/%s.php', $template_name, $template_lang));
+ $Language->load(sprintf(ROOT.'theme/%s/lang/%s.php', $template_name, $template_lang));
self::$Language = $Language;
}
@@ -72,7 +72,7 @@ class Application {
#===============================================================================
public static function getSecurityToken(): string {
if(!isset($_SESSION['token'])) {
- $_SESSION['token'] = getRandomValue();
+ $_SESSION['token'] = bin2hex(random_bytes(16));
}
return $_SESSION['token'];
@@ -136,7 +136,7 @@ class Application {
#===============================================================================
public static function getTemplateURL($more = ''): string {
$template = self::get('TEMPLATE.NAME');
- return self::getURL("template/{$template}/{$more}");
+ return self::getURL("theme/{$template}/{$more}");
}
#===============================================================================
@@ -163,4 +163,3 @@ class Application {
exit();
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Attribute.php b/core/namespace/Attribute.php
index 32cfa0a..ba782ac 100644
--- a/core/namespace/Attribute.php
+++ b/core/namespace/Attribute.php
@@ -1,5 +1,5 @@
<?php
-abstract class Attribute implements AttributeInterface {
+abstract class Attribute {
#===============================================================================
# Set attribute
@@ -82,4 +82,3 @@ abstract class Attribute implements AttributeInterface {
return $Statement->execute([$this->get('id')]);
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/AttributeInterface.php b/core/namespace/AttributeInterface.php
deleted file mode 100644
index 74cd1f1..0000000
--- a/core/namespace/AttributeInterface.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-interface AttributeInterface {
- public function databaseINSERT(\Database $Database);
- public function databaseUPDATE(\Database $Database);
- public function databaseDELETE(\Database $Database);
-}
-?> \ No newline at end of file
diff --git a/core/namespace/Database.php b/core/namespace/Database.php
index ae233f4..54fb36b 100644
--- a/core/namespace/Database.php
+++ b/core/namespace/Database.php
@@ -4,4 +4,3 @@ class Database extends \PDO {
parent::__construct("mysql:host={$hostname};dbname={$basename};charset=utf8mb4;", $username, $password);
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Factory.php b/core/namespace/Factory.php
index 38be666..779b890 100644
--- a/core/namespace/Factory.php
+++ b/core/namespace/Factory.php
@@ -16,4 +16,3 @@ abstract class Factory implements FactoryInterface {
return self::$storage[get_called_class()][$identifier] ?? FALSE;
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/FactoryInterface.php b/core/namespace/FactoryInterface.php
index 54a115b..e9017d6 100644
--- a/core/namespace/FactoryInterface.php
+++ b/core/namespace/FactoryInterface.php
@@ -2,4 +2,3 @@
interface FactoryInterface {
public static function build($identifier);
}
-?> \ No newline at end of file
diff --git a/core/namespace/HTTP.php b/core/namespace/HTTP.php
index c8aea27..9145539 100644
--- a/core/namespace/HTTP.php
+++ b/core/namespace/HTTP.php
@@ -228,4 +228,3 @@ class HTTP {
}
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Item.php b/core/namespace/Item.php
index ba54579..0a7d364 100644
--- a/core/namespace/Item.php
+++ b/core/namespace/Item.php
@@ -96,6 +96,7 @@ abstract class Item implements ItemInterface {
$content = $this->getBody();
if(\Application::get($item::CONFIGURATION.'.EMOTICONS') === TRUE) {
+ $content = parseUnicodeEmoticons($content);
$content = parseEmoticons($content);
}
@@ -196,4 +197,3 @@ abstract class Item implements ItemInterface {
}
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/ItemFactory.php b/core/namespace/ItemFactory.php
index d961028..ba32cd5 100644
--- a/core/namespace/ItemFactory.php
+++ b/core/namespace/ItemFactory.php
@@ -33,4 +33,3 @@ abstract class ItemFactory extends Factory {
return $Instance;
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/ItemInterface.php b/core/namespace/ItemInterface.php
index f2ba12d..917db6a 100644
--- a/core/namespace/ItemInterface.php
+++ b/core/namespace/ItemInterface.php
@@ -2,4 +2,3 @@
interface ItemInterface {
public function __construct($param, \Database $Database);
}
-?> \ No newline at end of file
diff --git a/core/namespace/Language.php b/core/namespace/Language.php
index fdaf104..f082b37 100644
--- a/core/namespace/Language.php
+++ b/core/namespace/Language.php
@@ -49,4 +49,3 @@ class Language {
return $this->text($name, $params);
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Page/Attribute.php b/core/namespace/Page/Attribute.php
index b1c4e01..05eaa33 100644
--- a/core/namespace/Page/Attribute.php
+++ b/core/namespace/Page/Attribute.php
@@ -20,4 +20,3 @@ class Attribute extends \Attribute {
#===============================================================================
const TABLE = 'page';
}
-?> \ No newline at end of file
diff --git a/core/namespace/Page/Exception.php b/core/namespace/Page/Exception.php
index d4794b7..c41bddc 100644
--- a/core/namespace/Page/Exception.php
+++ b/core/namespace/Page/Exception.php
@@ -2,4 +2,3 @@
namespace Page;
class Exception extends \Exception {}
-?> \ No newline at end of file
diff --git a/core/namespace/Page/Factory.php b/core/namespace/Page/Factory.php
index 4b8d390..2fcc361 100644
--- a/core/namespace/Page/Factory.php
+++ b/core/namespace/Page/Factory.php
@@ -2,4 +2,3 @@
namespace Page;
class Factory extends \ItemFactory {}
-?> \ No newline at end of file
diff --git a/core/namespace/Page/Item.php b/core/namespace/Page/Item.php
index 563602a..d875e8a 100644
--- a/core/namespace/Page/Item.php
+++ b/core/namespace/Page/Item.php
@@ -48,4 +48,3 @@ class Item extends \Item {
return $Statement->fetchObject('User\Attribute');
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Parsedown.php b/core/namespace/Parsedown.php
index e101bc5..51237b3 100644
--- a/core/namespace/Parsedown.php
+++ b/core/namespace/Parsedown.php
@@ -17,7 +17,7 @@ class Parsedown
{
# ~
- const version = '1.7.1';
+ const version = '1.7.4';
# ~
@@ -418,7 +418,21 @@ class Parsedown
if (isset($matches[1]))
{
- $class = 'language-'.$matches[1];
+ /**
+ * https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes
+ * Every HTML element may have a class attribute specified.
+ * The attribute, if specified, must have a value that is a set
+ * of space-separated tokens representing the various classes
+ * that the element belongs to.
+ * [...]
+ * The space characters, for the purposes of this specification,
+ * are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab),
+ * U+000A LINE FEED (LF), U+000C FORM FEED (FF), and
+ * U+000D CARRIAGE RETURN (CR).
+ */
+ $language = substr($matches[1], 0, strcspn($matches[1], " \t\n\f\r"));
+
+ $class = 'language-'.$language;
$Element['attributes'] = array(
'class' => $class,
@@ -1464,22 +1478,41 @@ class Parsedown
}
}
+ $permitRawHtml = false;
+
if (isset($Element['text']))
{
+ $text = $Element['text'];
+ }
+ // very strongly consider an alternative if you're writing an
+ // extension
+ elseif (isset($Element['rawHtml']))
+ {
+ $text = $Element['rawHtml'];
+ $allowRawHtmlInSafeMode = isset($Element['allowRawHtmlInSafeMode']) && $Element['allowRawHtmlInSafeMode'];
+ $permitRawHtml = !$this->safeMode || $allowRawHtmlInSafeMode;
+ }
+
+ if (isset($text))
+ {
$markup .= '>';
- if (!isset($Element['nonNestables']))
+ if (!isset($Element['nonNestables']))
{
$Element['nonNestables'] = array();
}
if (isset($Element['handler']))
{
- $markup .= $this->{$Element['handler']}($Element['text'], $Element['nonNestables']);
+ $markup .= $this->{$Element['handler']}($text, $Element['nonNestables']);
+ }
+ elseif (!$permitRawHtml)
+ {
+ $markup .= self::escape($text, true);
}
else
{
- $markup .= self::escape($Element['text'], true);
+ $markup .= $text;
}
$markup .= '</'.$Element['name'].'>';
diff --git a/core/namespace/Post/Attribute.php b/core/namespace/Post/Attribute.php
index 73af3a2..20aafae 100644
--- a/core/namespace/Post/Attribute.php
+++ b/core/namespace/Post/Attribute.php
@@ -20,4 +20,3 @@ class Attribute extends \Attribute {
#===============================================================================
const TABLE = 'post';
}
-?> \ No newline at end of file
diff --git a/core/namespace/Post/Exception.php b/core/namespace/Post/Exception.php
index 516ddbe..29b9345 100644
--- a/core/namespace/Post/Exception.php
+++ b/core/namespace/Post/Exception.php
@@ -2,4 +2,3 @@
namespace Post;
class Exception extends \Exception {}
-?> \ No newline at end of file
diff --git a/core/namespace/Post/Factory.php b/core/namespace/Post/Factory.php
index 4ad8ac8..20b29cc 100644
--- a/core/namespace/Post/Factory.php
+++ b/core/namespace/Post/Factory.php
@@ -2,4 +2,3 @@
namespace Post;
class Factory extends \ItemFactory {}
-?> \ No newline at end of file
diff --git a/core/namespace/Post/Item.php b/core/namespace/Post/Item.php
index 84b5f43..6109e20 100644
--- a/core/namespace/Post/Item.php
+++ b/core/namespace/Post/Item.php
@@ -55,4 +55,3 @@ class Item extends \Item {
return $Statement->fetchObject('User\Attribute');
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Router.php b/core/namespace/Router.php
index b6221d1..803a8e0 100644
--- a/core/namespace/Router.php
+++ b/core/namespace/Router.php
@@ -61,4 +61,3 @@ class Router {
}
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Template/Exception.php b/core/namespace/Template/Exception.php
index a38ee1d..3bfbf63 100644
--- a/core/namespace/Template/Exception.php
+++ b/core/namespace/Template/Exception.php
@@ -2,4 +2,3 @@
namespace Template;
class Exception extends \Exception {}
-?> \ No newline at end of file
diff --git a/core/namespace/Template/Factory.php b/core/namespace/Template/Factory.php
index a90c61e..7e56a79 100644
--- a/core/namespace/Template/Factory.php
+++ b/core/namespace/Template/Factory.php
@@ -3,7 +3,7 @@ namespace Template;
class Factory extends \Factory implements \FactoryInterface {
public static function build($template): Template {
- $Template = new Template(ROOT.'template/'.\Application::get('TEMPLATE.NAME')."/html/{$template}.php");
+ $Template = new Template(ROOT.'theme/'.\Application::get('TEMPLATE.NAME')."/html/{$template}.php");
$Template->set('Language', \Application::getLanguage());
$Template->set('BLOGMETA', [
'NAME' => \Application::get('BLOGMETA.NAME'),
@@ -15,4 +15,3 @@ class Factory extends \Factory implements \FactoryInterface {
return $Template;
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/Template/Template.php b/core/namespace/Template/Template.php
index 16459fb..25034a2 100644
--- a/core/namespace/Template/Template.php
+++ b/core/namespace/Template/Template.php
@@ -41,4 +41,3 @@ class Template {
return ob_get_clean();
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/User/Attribute.php b/core/namespace/User/Attribute.php
index c83fdfc..ccd31b5 100644
--- a/core/namespace/User/Attribute.php
+++ b/core/namespace/User/Attribute.php
@@ -22,4 +22,3 @@ class Attribute extends \Attribute {
#===============================================================================
const TABLE = 'user';
}
-?> \ No newline at end of file
diff --git a/core/namespace/User/Exception.php b/core/namespace/User/Exception.php
index b5bcad0..fdbe733 100644
--- a/core/namespace/User/Exception.php
+++ b/core/namespace/User/Exception.php
@@ -2,4 +2,3 @@
namespace User;
class Exception extends \Exception {}
-?> \ No newline at end of file
diff --git a/core/namespace/User/Factory.php b/core/namespace/User/Factory.php
index e352368..81930e6 100644
--- a/core/namespace/User/Factory.php
+++ b/core/namespace/User/Factory.php
@@ -6,4 +6,3 @@ class Factory extends \ItemFactory {
return self::build(Item::getIDByField('username', $username, \Application::getDatabase()));
}
}
-?> \ No newline at end of file
diff --git a/core/namespace/User/Item.php b/core/namespace/User/Item.php
index 129d8f9..a4ab799 100644
--- a/core/namespace/User/Item.php
+++ b/core/namespace/User/Item.php
@@ -33,4 +33,3 @@ class Item extends \Item {
return password_verify($password, $this->Attribute->get('password'));
}
}
-?> \ No newline at end of file
diff --git a/index.php b/index.php
index 842da61..70cd831 100644
--- a/index.php
+++ b/index.php
@@ -79,4 +79,3 @@ Router::addRedirect('favicon.ico', Application::getTemplateURL('rsrc/favicon.ico
# Execute router and route requests
#===============================================================================
Router::execute(parse_url(HTTP::requestURI(), PHP_URL_PATH));
-?> \ No newline at end of file
diff --git a/license.md b/license.md
index 444ae6d..ca0fcb0 100644
--- a/license.md
+++ b/license.md
@@ -6,4 +6,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/readme.md b/readme.md
index 2cdda49..abf1cdd 100644
--- a/readme.md
+++ b/readme.md
@@ -1,7 +1,7 @@
# PHP7 blogging application
-Easy blogging application written with PHP7! The application comes with a fulltext search functionality for posts and with customizable templates and languages. You can build your own template if the standard template does not satisfy you! You can see the application in action with a custom template on my private blog at [blog.nerdmind.de](https://blog.nerdmind.de/)!
+Easy blogging application written with PHP7! The application comes with a fulltext search functionality for posts and with customizable themes and languages. You can build your own theme if the default theme does not satisfy you.
-![Standard template](https://nmnd.de/file/p/github-blog/standard-template.png)
+![Default theme](https://nmnd.de/file/p/github-blog/default-theme.png)
## Administration interface
![Administration interface](https://nmnd.de/file/p/github-blog/admin-template-2.png)
@@ -10,10 +10,14 @@ Easy blogging application written with PHP7! The application comes with a fullte
![Content editor](https://nmnd.de/file/p/github-blog/admin-template-1.png)
## Installation
-1. Download the repository and extract it to the target directory where it should be installed.
-2. Create your MySQL database and import the `database.sql` file.
-3. Rename `core/configuration-example.php` to `core/configuration.php` and customize the configuration and set in any case the settings for the database connection.
-4. Navigate your browser to `/admin/auth.php` and authenticate with the default username `ChangeMe` and the password `changeme` (please note that the username is case-sensitive).
+1. Clone the repository to the target directory (usually your *document root*). (Alternatively you also can download a specific release as ZIP archive and extract it to the target destination and skip step 2.)
+2. Check out the latest tag (or the tag you wish) by running `git tag -l` and `git checkout <tag>`.
+3. Create your MySQL database and import `core/db/database.sql`.
+4. Copy `core/configuration-example.php` to `core/configuration.php` and customize the configuration and set in any case the settings for the database connection.
+5. Navigate your browser to `/admin/auth.php` and authenticate with the default username `ChangeMe` and the password `changeme` (please note that the username is case-sensitive).
-## Wiki
-More information about the configuration and customization on the **wiki** of this repository! \ No newline at end of file
+## Documentation
+You can find more information about the configuration and customization in the wiki:
+
+* [GitHub](https://github.com/Nerdmind/Blog/wiki)
+* [Mirror](https://code.nerdmind.de/blog/wiki/)
diff --git a/template/admin/html/auth.php b/template/admin/html/auth.php
deleted file mode 100644
index e6bfb1e..0000000
--- a/template/admin/html/auth.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<h1><i class="fa fa-sign-in"></i><?=$Language->text('authentication_text')?></h1>
-<p><?=$Language->text('authentication_desc')?></p>
-
-<form action="" method="POST">
- <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
-
- <?php if($FORM['INFO']): ?>
- <div class="flex flex-direction-column">
- <ul id="message-list">
- <?php foreach($FORM['INFO'] as $message): ?>
- <li><?=$message?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <?php endif; ?>
-
- <div class="flex">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-user-secret"></i></div>
- <div class="form-label-flex"><label for="form_username"><?=$Language->text('label_username')?></label></div>
- <div class="form-field-flex"><input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" /></div>
- </div>
- </div>
- <div class="flex">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-key"></i></div>
- <div class="form-label-flex"><label for="form_password"><?=$Language->text('label_password')?></label></div>
- <div class="form-field-flex"><input type="password" id="form_password" name="password" /></div>
- </div>
- </div>
- <div class="flex flex-padding background">
- <input type="submit" name="auth" value="<?=$Language->text('login')?>" />
- </div>
-</form> \ No newline at end of file
diff --git a/template/admin/html/page/form.php b/template/admin/html/page/form.php
deleted file mode 100644
index 5074a67..0000000
--- a/template/admin/html/page/form.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<form action="" method="POST">
- <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
-
- <?php if($FORM['INFO']): ?>
- <div class="flex flex-direction-column">
- <ul id="message-list">
- <?php foreach($FORM['INFO'] as $message): ?>
- <li><?=$message?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <?php endif; ?>
-
-<?php if($FORM['TYPE'] !== 'DELETE'): ?>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-database"></i></div>
- <div class="form-label-flex"><label for="form_id">ID</label></div>
- <div class="form-field-flex"><input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="[AUTO_INCREMENT]" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-user"></i></div>
- <div class="form-label-flex"><label for="form_user"><?=$Language->text('label_user')?></label></div>
- <div class="form-field-flex">
- <select id="form_user" name="user">
- <?php foreach($FORM['USER_LIST'] as $user): ?>
- <option value="<?=$user['ID']?>"<?=($FORM['DATA']['USER'] === $user['ID']) ? ' selected' : '' ?>><?=escapeHTML($user['FULLNAME'])?> [<?=$user['USERNAME']?>]</option>
- <?php endforeach; ?>
- </select>
- </div>
- </div>
- </div>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-file-text-o"></i></div>
- <div class="form-label-flex"><label for="form_name"><?=$Language->text('label_name')?></label></div>
- <div class="form-field-flex"><input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-link"></i></div>
- <div class="form-label-flex"><label for="form_slug"><?=$Language->text('label_slug')?></label></div>
- <div class="form-field-flex"><input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /></div>
- </div>
- </div>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
- <div class="form-label-flex"><label for="form_time_insert"><?=$Language->text('label_insert')?></label></div>
- <div class="form-field-flex"><input id="form_time_insert" name="time_insert" placeholder="[YYYY-MM-DD HH:II:SS]" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
- <div class="form-label-flex"><label for="form_time_update"><?=$Language->text('label_update')?></label></div>
- <div class="form-field-flex"><input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : '[CURRENT_TIMESTAMP]')?>" value="" /></div>
- </div>
- </div>
- <div class="flex flex-direction-column">
- <div id="button-list-wrapper">
- <ul id="markdown-list" class="button-list markdown">
- <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->text('markdown_bold')?>"></li>
- <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->text('markdown_italic')?>"></li>
- <li data-markdown="heading" class="fa fa-header" title="<?=$Language->text('markdown_heading')?>"></li>
- <li data-markdown="link" class="fa fa-link" title="<?=$Language->text('markdown_link')?>"></li>
- <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->text('markdown_image')?>"></li>
- <li data-markdown="code" class="fa fa-code" title="<?=$Language->text('markdown_code')?>"></li>
- <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->text('markdown_quote')?>"></li>
- <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->text('markdown_list_ul')?>"></li>
- <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->text('markdown_list_ol')?>"></li>
- </ul>
- </div>
- <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
- </div>
- <div class="flex flex-padding background flex-emoticons">
- <ul id="emoticon-list" class="button-list emoticons">
- <?php foreach(getEmoticons() as $emoticon => $data):?>
- <li data-emoticon="<?=$emoticon?>" title="<?=$data[1]?>"><?=$data[0]?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <div class="flex flex-padding background">
- <input id="form_argv" name="argv" maxlength="250" placeholder="[ARGUMENT_ONE=foo|ARGUMENT_TWO=bar …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
- </div>
-<?php else: ?>
- <div class="flex flex-padding background flex-direction-column">
- <?=$HTML?>
- </div>
-<?php endif; ?>
-
- <div class="flex flex-padding background">
- <?php if($FORM['TYPE'] === 'INSERT'): ?>
- <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
- <?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
- <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
- <?php elseif($FORM['TYPE'] === 'DELETE'): ?>
- <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->text('sure')?>" />
- <?php endif; ?>
- </div>
-</form> \ No newline at end of file
diff --git a/template/admin/html/post/form.php b/template/admin/html/post/form.php
deleted file mode 100644
index 50db740..0000000
--- a/template/admin/html/post/form.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<form action="" method="POST">
- <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
-
- <?php if($FORM['INFO']): ?>
- <div class="flex flex-direction-column">
- <ul id="message-list">
- <?php foreach($FORM['INFO'] as $message): ?>
- <li><?=$message?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <?php endif; ?>
-
-<?php if($FORM['TYPE'] !== 'DELETE'): ?>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-database"></i></div>
- <div class="form-label-flex"><label for="form_id">ID</label></div>
- <div class="form-field-flex"><input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="[AUTO_INCREMENT]" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-user"></i></div>
- <div class="form-label-flex"><label for="form_user"><?=$Language->text('label_user')?></label></div>
- <div class="form-field-flex">
- <select id="form_user" name="user">
- <?php foreach($FORM['USER_LIST'] as $user): ?>
- <option value="<?=$user['ID']?>"<?=($FORM['DATA']['USER'] === $user['ID']) ? ' selected' : '' ?>><?=escapeHTML($user['FULLNAME'])?> [<?=$user['USERNAME']?>]</option>
- <?php endforeach; ?>
- </select>
- </div>
- </div>
- </div>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-newspaper-o"></i></div>
- <div class="form-label-flex"><label for="form_name"><?=$Language->text('label_name')?></label></div>
- <div class="form-field-flex"><input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-link"></i></div>
- <div class="form-label-flex"><label for="form_slug"><?=$Language->text('label_slug')?></label></div>
- <div class="form-field-flex"><input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /></div>
- </div>
- </div>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
- <div class="form-label-flex"><label for="form_time_insert"><?=$Language->text('label_insert')?></label></div>
- <div class="form-field-flex"><input id="form_time_insert" name="time_insert" placeholder="[YYYY-MM-DD HH:II:SS]" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
- <div class="form-label-flex"><label for="form_time_update"><?=$Language->text('label_update')?></label></div>
- <div class="form-field-flex"><input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : '[CURRENT_TIMESTAMP]')?>" value="" /></div>
- </div>
- </div>
- <div class="flex flex-direction-column">
- <div id="button-list-wrapper">
- <ul id="markdown-list" class="button-list markdown">
- <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->text('markdown_bold')?>"></li>
- <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->text('markdown_italic')?>"></li>
- <li data-markdown="heading" class="fa fa-header" title="<?=$Language->text('markdown_heading')?>"></li>
- <li data-markdown="link" class="fa fa-link" title="<?=$Language->text('markdown_link')?>"></li>
- <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->text('markdown_image')?>"></li>
- <li data-markdown="code" class="fa fa-code" title="<?=$Language->text('markdown_code')?>"></li>
- <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->text('markdown_quote')?>"></li>
- <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->text('markdown_list_ul')?>"></li>
- <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->text('markdown_list_ol')?>"></li>
- </ul>
- </div>
- <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
- </div>
- <div class="flex flex-padding background flex-emoticons">
- <ul id="emoticon-list" class="button-list emoticons">
- <?php foreach(getEmoticons() as $emoticon => $data):?>
- <li data-emoticon="<?=$emoticon?>" title="<?=$data[1]?>"><?=$data[0]?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <div class="flex flex-padding background">
- <input id="form_argv" name="argv" maxlength="250" placeholder="[ARGUMENT_ONE=foo|ARGUMENT_TWO=bar …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
- </div>
-<?php else: ?>
- <div class="flex flex-padding background flex-direction-column">
- <?=$HTML?>
- </div>
-<?php endif; ?>
-
- <div class="flex flex-padding background">
- <?php if($FORM['TYPE'] === 'INSERT'): ?>
- <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
- <?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
- <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
- <?php elseif($FORM['TYPE'] === 'DELETE'): ?>
- <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->text('sure')?>" />
- <?php endif; ?>
- </div>
-</form> \ No newline at end of file
diff --git a/template/admin/html/user/form.php b/template/admin/html/user/form.php
deleted file mode 100644
index 50f79be..0000000
--- a/template/admin/html/user/form.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<form action="" method="POST">
- <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
-
- <?php if($FORM['INFO']): ?>
- <div class="flex flex-direction-column">
- <ul id="message-list">
- <?php foreach($FORM['INFO'] as $message): ?>
- <li><?=$message?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <?php endif; ?>
-
-<?php if($FORM['TYPE'] !== 'DELETE'): ?>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-database"></i></div>
- <div class="form-label-flex"><label for="form_id">ID</label></div>
- <div class="form-field-flex"><input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="[AUTO_INCREMENT]" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-key"></i></div>
- <div class="form-label-flex"><label for="form_password"><?=$Language->text('label_password')?></label></div>
- <div class="form-field-flex"><input id="form_password" name="password" placeholder="[NO CHANGE]" type="password" /></div>
- </div>
- </div>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-user"></i></div>
- <div class="form-label-flex"><label for="form_fullname"><?=$Language->text('label_fullname')?></label></div>
- <div class="form-field-flex"><input id="form_fullname" name="fullname" value="<?=escapeHTML($FORM['DATA']['FULLNAME'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-envelope-o"></i></div>
- <div class="form-label-flex"><label for="form_mailaddr"><?=$Language->text('label_mailaddr')?></label></div>
- <div class="form-field-flex"><input id="form_mailaddr" name="mailaddr" value="<?=escapeHTML($FORM['DATA']['MAILADDR'])?>" /></div>
- </div>
- </div>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-user-secret"></i></div>
- <div class="form-label-flex"><label for="form_username"><?=$Language->text('label_username')?></label></div>
- <div class="form-field-flex"><input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-link"></i></div>
- <div class="form-label-flex"><label for="form_slug"><?=$Language->text('label_slug')?></label></div>
- <div class="form-field-flex"><input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /></div>
- </div>
- </div>
- <div class="flex flex-responsive">
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
- <div class="form-label-flex"><label for="form_time_insert"><?=$Language->text('label_insert')?></label></div>
- <div class="form-field-flex"><input id="form_time_insert" name="time_insert" placeholder="[YYYY-MM-DD HH:II:SS]" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" /></div>
- </div>
- <div class="flex-item">
- <div class="form-icon-flex"><i class="fa fa-clock-o"></i></div>
- <div class="form-label-flex"><label for="form_time_update"><?=$Language->text('label_update')?></label></div>
- <div class="form-field-flex"><input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : '[CURRENT_TIMESTAMP]')?>" value="" /></div>
- </div>
- </div>
- <div class="flex flex-direction-column">
- <div id="button-list-wrapper">
- <ul id="markdown-list" class="button-list markdown">
- <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->text('markdown_bold')?>"></li>
- <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->text('markdown_italic')?>"></li>
- <li data-markdown="heading" class="fa fa-header" title="<?=$Language->text('markdown_heading')?>"></li>
- <li data-markdown="link" class="fa fa-link" title="<?=$Language->text('markdown_link')?>"></li>
- <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->text('markdown_image')?>"></li>
- <li data-markdown="code" class="fa fa-code" title="<?=$Language->text('markdown_code')?>"></li>
- <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->text('markdown_quote')?>"></li>
- <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->text('markdown_list_ul')?>"></li>
- <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->text('markdown_list_ol')?>"></li>
- </ul>
- </div>
- <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
- </div>
- <div class="flex flex-padding background flex-emoticons">
- <ul id="emoticon-list" class="button-list emoticons">
- <?php foreach(getEmoticons() as $emoticon => $data):?>
- <li data-emoticon="<?=$emoticon?>" title="<?=$data[1]?>"><?=$data[0]?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <div class="flex flex-padding background">
- <input id="form_argv" name="argv" maxlength="250" placeholder="[ARGUMENT_ONE=foo|ARGUMENT_TWO=bar …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
- </div>
-<?php else: ?>
- <div class="flex flex-padding background flex-direction-column">
- <?=$HTML?>
- </div>
-<?php endif; ?>
-
- <div class="flex flex-padding background">
- <?php if($FORM['TYPE'] === 'INSERT'): ?>
- <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
- <?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
- <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
- <?php elseif($FORM['TYPE'] === 'DELETE'): ?>
- <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->text('sure')?>" />
- <?php endif; ?>
- </div>
-</form> \ No newline at end of file
diff --git a/template/admin/rsrc/background.png b/template/admin/rsrc/background.png
deleted file mode 100644
index f018e81..0000000
--- a/template/admin/rsrc/background.png
+++ /dev/null
Binary files differ
diff --git a/template/admin/rsrc/main.css b/template/admin/rsrc/main.css
deleted file mode 100644
index 0f345a5..0000000
--- a/template/admin/rsrc/main.css
+++ /dev/null
@@ -1,315 +0,0 @@
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Selection
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-::-moz-selection{background:#BBB;color:#000;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Hyperlinks
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-a{color:#0060A0;text-decoration:none;}a:focus{background:#CCC;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Paragraphs
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-h1+p,h2+p,h3+p,h4+p,h5+p,h6+p{margin-top:0;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Icons
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-h1 .fa, h2 .fa, h3 .fa, h4 .fa, h5 .fa, h6 .fa{margin-right:0.25rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Headings
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-h1,h2,h3,h4,h5,h6{margin:0;text-transform:uppercase;}
-h1{font-size:0.80rem;}h2{font-size:0.70rem;}
-h3{font-size:0.65rem;}h4{font-size:0.60rem;}
-h5{font-size:0.55rem;}h6{font-size:0.50rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Document
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-html,body{margin:0;padding:0;}
-main{padding:0.75rem;}
-html{font-size:1.25rem;color:#333;background:url("background.png") fixed center #CCC;-webkit-hyphens:auto;hyphens:auto;}
-body{font-family:Ruda,sans-serif;font-size:0.7rem;line-height:1.2rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Main content
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-content{background:#FFF;border:0.05rem solid #AAA;border-top:none;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Width
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-content,.header-content{max-width:50rem;margin:0 auto;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Header
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-header{font-size:0.6rem;}
-#header-text,#header-desc{text-shadow: 0 -1px #4E718F, 1px 0 #4E718F, 0 1px #4E718F, -1px 0 #4E718F;}
-#header-text{font-size:0.8rem;font-weight:700;text-transform:uppercase;}
-#header-desc{font-size:0.6rem;font-weight:700;line-height:1rem;}
-#header-desc span{color:#CCC;}
-#header-logo{display:block;max-height:5rem;float:left;margin-right:0.5rem;}
-.header-line{padding:0.5rem 0.75rem;overflow:hidden;}
-.header-line:first-child{background:#5E819F;position:sticky;top:0;}
-.header-line:last-child{background:#EEE;border:0.05rem solid #AAA;border-left:none;border-right:none;padding:0.25rem 0.75rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Footer
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-footer{font-size:0.6rem;background:#EEE;border-top:0.05rem solid #AAA;padding:0.5rem 0.75rem;text-align:center;}
-#main-footer > ul{margin:0;padding:0;list-style:none;}
-#main-footer > ul > li{display:inline;}
-#main-footer > ul > li .fa{margin-right:0.125rem;}
-#main-footer > ul > li:before{content:"[";font-weight:700;margin-right:0.1rem;}
-#main-footer > ul > li:after{content:"]";font-weight:700;margin-left:0.1rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Main Navigation
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-navi ul{list-style:none;margin:0;padding:0;}
-#main-navi li{display:inline;}
-#main-navi li .fa{margin-right:0.25rem;}
-#main-navi li:last-child{float:right;}
-#main-navi li:first-child{float:none;}
-#main-navi a{padding:0.1rem 0.3rem;background:#DDD;border:0.05rem solid #AAA;color:inherit;text-decoration:none;text-align:center;display:inline-block;}
-#main-navi a:hover, #main-navi a:focus{text-decoration:none;background:#CCC;}
-#main-navi a:focus{background:#CCC;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Site Navigation
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#site-navi{clear:both;display:flex;box-sizing:border-box;justify-content:space-between;}
-#site-navi > div{display:flex;align-items:center;border:0.05rem solid #AAA;background:#EEE;}
-#site-navi > div > a{display:block;}
-
-#site-navi .disabled{pointer-events:none;color:#AAA;}
-#site-navi .active a{background:#CCC !important;font-weight:600;pointer-events:none;}
-
-#site-navi ol{list-style:none;margin:0;padding:0;}
-#site-navi li{float:left;display:inline-block;}
-#site-navi li+li{border-left:0.05rem solid #AAA;}
-#site-navi a{padding:0 0.5rem;text-decoration:none;color:inherit;display:inline-block;}
-#site-navi a:hover,#site-navi a:focus{background:#CCC;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Actions
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.actions{margin:0 0 0.5rem 0;padding:0;list-style:none;font-size:0.6rem;float:right;text-align:center;}
-.actions .fa{margin-right:0.1rem;}
-.actions li{display:inline-block;font-weight:bold;background:#EEE;border:0.05rem solid #AAA;}
-.actions a{color:inherit;display:block;padding:0 0.25rem;}
-.actions-before{float:left;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Elements
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-pre{margin-bottom:1rem;overflow:auto;-moz-tab-size:4;tab-size:4;}
-code,pre{font-family:monospace;color:#B03060;}
-p{margin-top:0;}
-img{border:none;max-width:100%;}
-.red{color:#B03060;}
-.blue{color:#40779A;}
-.green{color:#008B45;}
-.right{float:right;}
-.hidden{display:none;}
-#database-result{color:inherit;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Tables
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-table{width:100%;margin-bottom:1rem;}td{vertical-align:middle;}
-table,td{padding:0.5rem;border:0.05rem solid #AAA;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Brackets
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.brackets a,a.brackets{text-decoration:none;}
-.brackets:before,.brackets:after{color:#222;}
-.brackets:after{content:"]";}
-.brackets:before{content:"[";}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Item Element
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.item{display:block;border:0.05rem solid #AAA;margin-bottom:1rem;clear:both;}
-.item > header,
-.item > footer{background:#EEE;overflow:hidden;}
-.item > blockquote{margin:0;padding:0.75rem;font-family:inherit;}
-.item > header{padding:0.5rem 0.75rem;border-bottom:0.05rem solid #AAA;position:sticky;top:0;}
-.item > footer{border-top:0.05rem solid #AAA;}
-.item > footer > ul{margin:0;padding:0;list-style:none;}
-.item > footer > ul > li{display:inline-block;float:left;}
-.item > footer > ul > li:last-child{float:right;}
-.item > footer > ul > li > a{color:inherit;display:inline-block;padding:0.25rem 2rem;}
-.item > footer > ul > li > a:hover,
-.item > footer > ul > li > a:active{background:#DDD;}
-
-.item-id{float:right;color:#666;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Argument list
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.arguments{list-style:none;margin:0;padding:0.25rem 0.75rem;background:#EEE;font-size:0.6rem;text-align:center;border-top:0.05rem solid #AAA;}
-.arguments > li{display:inline;}
-.arguments > li > span{color:#40779A;}
-.arguments > li:before{content:"[";font-weight:700;margin-right:0.1rem;}
-.arguments > li:after{content:"]";font-weight:700;margin-left:0.1rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Form flex-box
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-form{border:0.05rem solid #AAA;}
-
-.flex{display:flex;width:100%;justify-content:center;overflow:hidden;box-sizing:border-box;}
-.flex + .flex{border-top:0.05rem solid #AAA;}
-.flex > .flex-item {display:flex;box-sizing:padding-box;width:100%;}
-.flex > .flex-item{border-right:0.05rem solid #AAA;}
-.flex > .flex-item:last-child{border-right:none;}
-.flex > .flex-item > div{display:flex;align-items:center;padding:0.5rem;box-sizing:border-box;}
-.flex > .flex-item > div + div{border-left:0.05rem solid #AAA;}
-.flex.flex-responsive > .flex-item{width:50%;}
-
-.form-icon-flex{background:#DDD;width:10%;justify-content:center;}
-.form-label-flex{background:#DDD;width:30%;border-left:none !important;}
-.form-field-flex{width:60%;}
-
-.background{background:#DDD;}
-.flex-padding{padding:0.5rem;}
-.flex-direction-column{flex-direction:column;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Form buttons
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#button-list-wrapper{border-bottom:0.05rem solid #AAA;background:#EEE;}
-
-.button-list{margin:0;padding:0;list-style:none;}
-.button-list.emoticons > li{display:inline-block;background:#EEE;padding:0.5rem;border:0.05rem solid #AAA;cursor:pointer;}
-.button-list.emoticons > li {padding:0.25rem 0.5rem;}
-.button-list.emoticons > li:hover,
-.button-list.emoticons > li:active{background:#CCC;}
-
-.button-list.markdown > li{float:left;padding:0.5rem;cursor:pointer;width:1.75rem;box-sizing:border-box;text-align:center;}
-.button-list.markdown > li:hover,
-.button-list.markdown > li:active{color:#40779A;}
-
-#content-editor{border:none;margin:0;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Form elements
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-input,select,textarea{width:100%;box-sizing:padding-box;background:#EEE;color:#404040;font-family:inherit;font-size:0.7rem;padding:0.25rem;border:0.05rem solid #AAA;}
-textarea{font-family:Kadwa,sans-serif;box-sizing:border-box;display:inline-block;resize:vertical;min-height:15rem;line-height:1.3rem;padding:0.5rem;-webkit-hyphens:none;hyphens:none;}
-input[type="submit"]{text-transform:uppercase;border-radius:0.1rem;}
-input:disabled{background:#DDD;color:#888;}
-input:disabled:hover{cursor:not-allowed;}
-label{text-transform:uppercase;font-weight:normal;}
-label:after{content:":";}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Form buttons
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#insert-button,
-#update-button,
-#delete-button{color:#EEE;border:0.05rem solid #404040;}
-
-#insert-button{background:#4D8D5D;}
-#update-button{background:#6A8AA5;}
-#delete-button{background:#C45C66;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Form message list
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#message-list{margin:0;padding:0.5rem;list-style:none;background:#C45C66;color:#EEE;font-size:0.6rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Search form
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#search-form{margin-bottom:1rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* FontAwesome Main
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;speak:none;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* FontAwesome Icons
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.fa-bug:before{content:"\f188"}
-.fa-key:before{content:"\f084"}
-.fa-link:before{content:"\f0c1"}
-.fa-bold:before{content:"\f032"}
-.fa-code:before{content:"\f121"}
-.fa-user:before{content:"\f007"}
-.fa-book:before{content:"\f02d"}
-.fa-italic:before{content:"\f033"}
-.fa-header:before{content:"\f1dc"}
-.fa-search:before{content:"\f002"}
-.fa-trash-o:before{content:"\f014"}
-.fa-sign-in:before{content:"\f090"}
-.fa-clock-o:before{content:"\f017"}
-.fa-list-ul:before{content:"\f0ca"}
-.fa-list-ol:before{content:"\f0cb"}
-.fa-database:before{content:"\f1c0"}
-.fa-language:before{content:"\f1ab"}
-.fa-sign-out:before{content:"\f08b"}
-.fa-dashboard:before{content:"\f0e4"}
-.fa-picture-o:before{content:"\f03e"}
-.fa-envelope-o:before{content:"\f003"}
-.fa-arrow-left:before{content:"\f060"}
-.fa-quote-right:before{content:"\f10e"}
-.fa-user-secret:before{content:"\f21b"}
-.fa-file-text-o:before{content:"\f0f6"}
-.fa-newspaper-o:before{content:"\f1ea"}
-.fa-arrow-right:before{content:"\f061"}
-.fa-external-link:before{content:"\f08e"}
-.fa-github-square:before{content:"\f092"}
-.fa-pencil-square-o:before{content:"\f044"}
-.fa-exclamation-triangle:before{content:"\f071"}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Responsive Level #1
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@media only screen and (max-width:50em) {
- html{font-size:1.125rem;/*18px*/background-image:none !important;}
-}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Responsive Level #2
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@media only screen and (max-width:37.5em) {
- .flex.flex-responsive{display:block;width:auto;}
- .flex.flex-responsive > .flex-item {width:100%;}
- .flex.flex-responsive > .flex-item + .flex-item{border-top:0.05rem solid #AAA;}
-
- #main-navi{font-size:1rem;}
- #main-navi li span{display:none;}
- #main-navi li .fa{margin-right:0;}
- #main-navi a{padding:0.5rem;}
-
- .flex-emoticons{display:none;}
-
- .actions{float:none;display:flex;width:100%;flex-grow:1;justify-content:center;overflow:hidden;box-sizing:border-box;}
- .actions li{flex-grow:1;}
- .actions li + li{border-left:none;}
- .actions-before{float:none;}
-}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Font "Font Awesome" [4.7.0] (by Fontello): SIL Open Font License (OFL)
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@font-face{font-family:FontAwesome;font-weight:400;src:url("font/font-awesome-fontello.woff2") format("woff2");}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Font "Kadwa": SIL Open Font License (OFL)
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@font-face{font-family:Kadwa;font-weight:400;src:url("font/kadwa-n-400.woff2") format("woff2");}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Font "Ruda": SIL Open Font License (OFL)
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@font-face{font-family:Ruda;font-weight:400;src:url("font/ruda-n-400.woff2") format("woff2");}
-@font-face{font-family:Ruda;font-weight:700;src:url("font/ruda-n-700.woff2") format("woff2");} \ No newline at end of file
diff --git a/template/standard/rsrc/main.css b/template/standard/rsrc/main.css
deleted file mode 100644
index 9bd285d..0000000
--- a/template/standard/rsrc/main.css
+++ /dev/null
@@ -1,191 +0,0 @@
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Hyperlinks
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-a{color:#0060A0;text-decoration:none;}a:focus{background:#CCC;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Paragraphs
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-h1+p,h2+p,h3+p,h4+p,h5+p,h6+p{margin-top:0;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Headings
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-h1,h2,h3,h4,h5,h6{margin:0;font-weight:600;}
-h1{font-size:0.80rem;}h2{font-size:0.70rem;}
-h3{font-size:0.65rem;}h4{font-size:0.60rem;}
-h5{font-size:0.55rem;}h6{font-size:0.50rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Document
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-html,body{margin:0;padding:0;}
-html{font-size:1.25rem;color:#333;background:#CCC;-webkit-hyphens:auto;hyphens:auto;}
-body{font-family:Ruda,sans-serif;font-size:0.7rem;line-height:1.2rem;}
-
-#container{max-width:45rem;margin:1rem auto;border:0.05rem solid #AAA;background:#FFF;}
-
-main,#main-header > div{padding:1rem;box-sizing:border-box;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Header
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-header > div{overflow:hidden;}
-#main-logo{height:1.75rem;display:block;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Footer
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-footer{background:#EEE;border-top:0.05rem solid #AAA;padding:0.25rem 1rem;text-align:center;font-size:0.6rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Main Navigation
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#main-navi{font-size:0.6rem;background:#EEE;border:0.05rem solid #AAA;border-left:none;border-right:none;padding:0 1rem;}
-#main-navi ul{list-style:none;margin:0;padding:0;}
-#main-navi li{display:inline;}
-#main-navi li .fa, h1 > .fa, h2 > .fa{margin-right:0.25rem;}
-#main-navi a{padding:0.25rem 0.3rem;color:inherit;text-decoration:none;text-align:center;display:inline-block;border:0.05rem solid transparent;border-top:none;border-bottom:none;}
-#main-navi a:hover, #main-navi a:focus{text-decoration:none;background:#DDD;border:0.05rem solid #AAA;border-top:none;border-bottom:none;}
-#main-navi li:last-child{float:right;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Site Navigation
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#site-navi{clear:both;display:flex;box-sizing:border-box;justify-content:space-between;}
-#site-navi > div{display:flex;align-items:center;border:0.05rem solid #AAA;background:#EEE;}
-#site-navi > div > a{display:block;}
-#site-navi > section{display:flex;overflow:hidden;align-items:center;}
-#site-navi > section > div{border:0.05rem solid #AAA;background:#EEE;}
-
-#site-navi .disabled{pointer-events:none;color:#AAA;}
-#site-navi .active a{background:#CCC !important;font-weight:600;pointer-events: none;}
-
-#site-navi ol{list-style:none;margin:0;padding:0;}
-#site-navi li{float:left;display:inline-block;}
-#site-navi li+li{border-left:0.05rem solid #AAA;}
-#site-navi a{padding:0 0.5rem;text-decoration:none;color:inherit;display:inline-block;}
-#site-navi a:hover,#site-navi a:focus{background:#CCC;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Elements
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-pre{font-family:monospace;margin-bottom:1rem;overflow:auto;-moz-tab-size:4;tab-size:4;}
-code,pre{font-family:monospace;color:#008B45;}
-strong,label{font-weight:600;}
-img{border:none;max-width:100%;}
-main img{border:0.05rem solid #000;border-radius:0.15rem;}
-table img{border:none;border-radius:0;}
-.red{color:#B03060;}
-.head-link{font-size:0.6rem;float:right;}
-.head-link .fa{margin-right:0.125rem;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Brackets
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.brackets a,a.brackets{text-decoration:none;}
-.brackets:after{content:"]"}
-.brackets:before{content:"["}
-a.brackets:before,a.brackets:after{color:#222;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Item Element
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.item{background:#EEE;border:0.05rem solid #AAA;overflow:hidden;margin:0.5rem 0;}
-.item > header{padding:0.25rem 1rem;border-bottom:0.05rem solid #AAA;overflow:hidden;text-transform:uppercase;}
-.item > header h2{font-size:0.65rem;float:left;}
-.item > header .info{float:right;font-size:0.6rem;font-weight:400;}
-.item > header a{color:inherit;}
-.item > blockquote{margin:0;padding:0 1rem;font-family:inherit;}
-.item > blockquote img{display:block;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Item content on main sites
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#content{background:#EEE;border:0.05rem solid #AAA;margin:0.5rem 0;padding:0 1rem;}
-#content img{display:block;}
-#content.page{} /* different rules for page item */
-#content.post{} /* different rules for page item */
-#content.user{} /* different rules for page item */
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Responsive
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#toogle-nav{display:none;clear:both;}
-#toogle-nav-label{display:none;cursor:pointer;font-size:1.25rem;text-align:center;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Form elements
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-input,select{background:#EEE;color:inherit;padding:0.2rem;border:0.1rem solid #AAA;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Table elements
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-table{width:100%;margin:0 0 1rem;}td{vertical-align:middle;}
-table,td{border-spacing:0;border-collapse:collapse;padding:0.5rem;border:0.05rem solid #000;}
-thead,tr:nth-child(even){background:#EEE;}
-thead > tr, th{font-weight:600;font-style:italic;}
-thead > tr > td, th > td{text-align:center;}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Responsive Level #1
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@media only screen and (max-width:50em) {
- html{font-size:1.125rem;/*18px*/background-image:none !important;}
- body{line-height:1.2rem;}
- #container{margin:0;border-right:none;border-left:none;}
-}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Responsive Level #2
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@media only screen and (max-width:37.5em) {
- main,#main-header > div{padding:1rem;}
- #main-navi{padding:0.25rem 1rem;}
- #main-navi a{border:0.05rem solid transparent;}
- #main-navi a:hover, #main-navi a:focus{border:0.05rem solid #BBB;}
- #main-navi > ul{display:none;float:none;}
- #main-navi > ul > li a{display:block;text-align:left;padding:0 0.25rem;}
- #main-navi{overflow:hidden;}
- #toogle-nav-label{display:block;}
- #toogle-nav:checked + ul{display:block;}
- #main-navi li:last-child{float:none;}
-
- .item > header{text-align:center;}
- .item > header > h2,
- .item > header > .info{float:none;display:block;}
-}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* FontAwesome Main
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.fa{display:inline-block;font:normal normal normal 14px/1 "FontAwesome";font-size:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* FontAwesome Icons
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-.fa-rss:before{content:"\f09e"}
-.fa-key:before{content:"\f084"}
-.fa-bars:before{content:"\f0c9"}
-.fa-user:before{content:"\f007"}
-.fa-home:before{content:"\f015"}
-.fa-search:before{content:"\f002"}
-.fa-rss-square:before{content:"\f143"}
-.fa-arrow-left:before{content:"\f060"}
-.fa-user-secret:before{content:"\f21b"}
-.fa-file-text-o:before{content:"\f0f6"}
-.fa-newspaper-o:before{content:"\f1ea"}
-.fa-arrow-right:before{content:"\f061"}
-.fa-exclamation-triangle:before{content:"\f071"}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Font "Font Awesome" [4.7.0]: SIL Open Font License (OFL)
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@font-face{font-family:"FontAwesome";font-weight:400;src:url("font/font-awesome.woff2") format("woff2");}
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* Font "Ruda": SIL Open Font License (OFL)
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-@font-face{font-family:Ruda;font-weight:400;src:url("font/ruda-n-400.woff2") format("woff2");}
-@font-face{font-family:Ruda;font-weight:700;src:url("font/ruda-n-700.woff2") format("woff2");} \ No newline at end of file
diff --git a/template/admin/html/403.php b/theme/admin/html/403.php
index 6fb3d16..7f23212 100644
--- a/template/admin/html/403.php
+++ b/theme/admin/html/403.php
@@ -1,2 +1,4 @@
+<main id="main-content">
<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->text('403_heading_text')?></h1>
-<p><?=$Language->text('403_heading_desc')?></p> \ No newline at end of file
+<p><?=$Language->text('403_heading_desc')?></p>
+</main>
diff --git a/template/admin/html/404.php b/theme/admin/html/404.php
index aa264cd..7fb06d8 100644
--- a/template/admin/html/404.php
+++ b/theme/admin/html/404.php
@@ -1,2 +1,4 @@
+<main id="main-content">
<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->text('404_heading_text')?></h1>
-<p><?=$Language->text('404_heading_desc')?></p> \ No newline at end of file
+<p><?=$Language->text('404_heading_desc')?></p>
+</main>
diff --git a/theme/admin/html/auth.php b/theme/admin/html/auth.php
new file mode 100644
index 0000000..45b7e14
--- /dev/null
+++ b/theme/admin/html/auth.php
@@ -0,0 +1,38 @@
+<main id="main-content">
+<h1><i class="fa fa-sign-in"></i><?=$Language->text('authentication_text')?></h1>
+<p><?=$Language->text('authentication_desc')?></p>
+
+<?php if($FORM['INFO']): ?>
+ <div id="message-list-wrapper">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach ?>
+ </ul>
+ </div>
+<?php endif ?>
+
+<form action="" method="POST">
+ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+
+ <div class="form-grid two-columns">
+ <label for="form_username">
+ <i class="fa fa-user-secret"></i><?=$Language->text('label_username')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" />
+ </div>
+
+ <label for="form_password">
+ <i class="fa fa-key"></i><?=$Language->text('label_password')?></label>
+
+ <div class="form-grid-item">
+ <input type="password" id="form_password" name="password" />
+ </div>
+ </div>
+
+ <div class="form-border-box background padding nobordertop">
+ <input type="submit" name="auth" value="<?=$Language->text('login')?>" />
+ </div>
+</form>
+</main>
diff --git a/template/admin/html/database.php b/theme/admin/html/database.php
index 983dee7..da41e68 100644
--- a/template/admin/html/database.php
+++ b/theme/admin/html/database.php
@@ -1,30 +1,32 @@
+<main id="main-content">
<h1><i class="fa fa-database"></i><?=$Language->text('overview_database_text')?></h1>
<p><?=$Language->text('overview_database_desc')?></p>
+<?php if($FORM['INFO']): ?>
+ <div id="message-list-wrapper">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach ?>
+ </ul>
+ </div>
+<?php endif ?>
+
<form action="" method="POST">
<input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
- <?php if($FORM['INFO']): ?>
- <div class="flex flex-direction-column">
- <ul id="message-list">
- <?php foreach($FORM['INFO'] as $message): ?>
- <li><?=$message?></li>
- <?php endforeach; ?>
- </ul>
- </div>
- <?php endif; ?>
-
- <div class="flex">
+ <div class="form-border-box">
<textarea id="content-editor" placeholder="<?=$Language->text('database_warning')?>" name="command"><?=escapeHTML($FORM['COMMAND'])?></textarea>
</div>
<?php if($FORM['RESULT']): ?>
- <div class="flex flex-padding background flex-direction-column">
+ <div class="form-border-box background padding">
<pre id="database-result"><?=escapeHTML($FORM['RESULT'])?></pre>
</div>
<?php endif; ?>
- <div class="flex flex-padding background">
+ <div class="form-border-box background padding">
<input id="insert-button" type="submit" name="execute" value="Execute" />
</div>
-</form> \ No newline at end of file
+</form>
+</main>
diff --git a/template/admin/html/home.php b/theme/admin/html/home.php
index a8b003e..5331fa8 100644
--- a/template/admin/html/home.php
+++ b/theme/admin/html/home.php
@@ -1,3 +1,4 @@
+<main id="main-content">
<h1><i class="fa fa-dashboard"></i><?=$Language->text('overview_dashboard_text')?></h1>
<p><?=$Language->text('overview_dashboard_desc')?></p>
@@ -42,4 +43,5 @@
</div>
<?php else: ?>
<p><em><?=$Language->text('home_no_users')?></em></p>
-<?php endif; ?> \ No newline at end of file
+<?php endif; ?>
+</main>
diff --git a/template/admin/html/main.php b/theme/admin/html/main.php
index 794f9ec..699a742 100644
--- a/template/admin/html/main.php
+++ b/theme/admin/html/main.php
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="referrer" content="origin-when-crossorigin" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="stylesheet" href="<?=Application::getTemplateURL('rsrc/main.css')?>" />
+ <link rel="stylesheet" href="<?=Application::getTemplateURL('rsrc/css/main.css')?>" />
<script defer src="<?=Application::getTemplateURL('rsrc/main.js')?>"></script>
<title><?=escapeHTML($NAME)?> | Administration</title>
</head>
@@ -12,7 +12,9 @@
<header id="main-header">
<div class="header-line">
<div class="header-content">
- <a href="<?=Application::getAdminURL()?>"><img id="header-logo" src="<?=Application::getTemplateURL('rsrc/icon-public-domain.svg')?>" alt="Administration" /></a>
+ <a href="<?=Application::getURL()?>">
+ <img id="header-logo" src="<?=Application::getTemplateURL('rsrc/icon-public-domain.svg')?>" alt="Administration" />
+ </a>
<div id="header-text">Administration</div>
<div id="header-desc">PHP7 blogging application by <span>Nerdmind</span>!</div>
</div>
@@ -36,17 +38,15 @@
</div>
</div>
</header>
- <div id="main-content">
- <main>
- <?=$HTML?>
- </main>
- <footer id="main-footer">
- <ul>
- <li><i class="fa fa-github-square"></i><a href="https://github.com/Nerdmind/Blog/releases" target="_blank">Releases</a></li>
- <li><i class="fa fa-book"></i><a href="https://github.com/Nerdmind/Blog/wiki" target="_blank">Documentation</a></li>
- <li><i class="fa fa-bug"></i><a href="https://github.com/Nerdmind/Blog/issues">Bugreport</a></li>
- </ul>
- </footer>
- </div>
+
+ <?=$HTML?>
+
+ <footer id="main-footer">
+ <ul>
+ <li><i class="fa fa-github-square"></i><a href="https://github.com/Nerdmind/Blog/releases" target="_blank">Releases</a></li>
+ <li><i class="fa fa-book"></i><a href="https://github.com/Nerdmind/Blog/wiki" target="_blank">Documentation</a></li>
+ <li><i class="fa fa-bug"></i><a href="https://github.com/Nerdmind/Blog/issues">Bugreport</a></li>
+ </ul>
+ </footer>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/template/admin/html/page/delete.php b/theme/admin/html/page/delete.php
index ccc569f..006090e 100644
--- a/template/admin/html/page/delete.php
+++ b/theme/admin/html/page/delete.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-trash-o"></i><?=$Language->text('delete_page')?></h1>
<p><?=$Language->text('delete_page_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/theme/admin/html/page/form.php b/theme/admin/html/page/form.php
new file mode 100644
index 0000000..eee61bf
--- /dev/null
+++ b/theme/admin/html/page/form.php
@@ -0,0 +1,104 @@
+<?php if($FORM['INFO']): ?>
+ <div id="message-list-wrapper">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach ?>
+ </ul>
+ </div>
+<?php endif ?>
+
+<form action="" method="POST">
+ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+
+<?php if($FORM['TYPE'] !== 'DELETE'): ?>
+ <div class="form-grid">
+ <label for="form_id">
+ <i class="fa fa-database"></i>ID</label>
+
+ <div class="form-grid-item">
+ <input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="AUTO_INCREMENT" value="<?=escapeHTML($FORM['DATA']['ID'])?>" />
+ </div>
+
+ <label for="form_user">
+ <i class="fa fa-user"></i><?=$Language->text('label_user')?></label>
+
+ <div class="form-grid-item">
+ <select id="form_user" name="user">
+ <?php foreach($FORM['USER_LIST'] as $user): ?>
+ <option value="<?=$user['ID']?>"<?=($FORM['DATA']['USER'] === $user['ID']) ? ' selected' : '' ?>><?=escapeHTML($user['FULLNAME'])?> [<?=$user['USERNAME']?>]</option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+
+ <label for="form_name">
+ <i class="fa fa-file-text-o"></i><?=$Language->text('label_name')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" />
+ </div>
+
+ <label for="form_slug">
+ <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" />
+ </div>
+
+ <label for="form_time_insert">
+ <i class="fa fa-clock-o"></i><?=$Language->text('label_insert')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_time_insert" name="time_insert" placeholder="YYYY-MM-DD HH:II:SS" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" />
+ </div>
+
+ <label for="form_time_update">
+ <i class="fa fa-clock-o"></i><?=$Language->text('label_update')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : 'CURRENT_TIMESTAMP')?>" value="" />
+ </div>
+ </div>
+
+ <div id="content-editor-wrapper" class="form-border-box">
+ <div id="button-list-wrapper">
+ <ul id="markdown-list" class="button-list markdown">
+ <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->text('markdown_bold')?>"></li>
+ <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->text('markdown_italic')?>"></li>
+ <li data-markdown="heading" class="fa fa-header" title="<?=$Language->text('markdown_heading')?>"></li>
+ <li data-markdown="link" class="fa fa-link" title="<?=$Language->text('markdown_link')?>"></li>
+ <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->text('markdown_image')?>"></li>
+ <li data-markdown="code" class="fa fa-code" title="<?=$Language->text('markdown_code')?>"></li>
+ <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->text('markdown_quote')?>"></li>
+ <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->text('markdown_list_ul')?>"></li>
+ <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->text('markdown_list_ol')?>"></li>
+ </ul>
+ </div>
+ <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
+ </div>
+ <div id="emoticon-list-wrapper" class="form-border-box background padding">
+ <ul id="emoticon-list" class="button-list emoticons">
+ <?php foreach(getUnicodeEmoticons() as $emoticon => $explanation):?>
+ <li data-emoticon="<?=$emoticon?>" title="<?=$explanation?>"><?=$emoticon?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <div class="form-border-box background padding">
+ <input id="form_argv" name="argv" maxlength="250" placeholder="[ARGUMENT_ONE=foo|ARGUMENT_TWO=bar …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
+ </div>
+<?php else: ?>
+ <div class="form-border-box background padding">
+ <?=$HTML?>
+ </div>
+<?php endif; ?>
+
+ <div class="form-border-box background padding">
+ <?php if($FORM['TYPE'] === 'INSERT'): ?>
+ <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
+ <?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
+ <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
+ <?php elseif($FORM['TYPE'] === 'DELETE'): ?>
+ <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->text('sure')?>" />
+ <?php endif; ?>
+ </div>
+</form>
diff --git a/template/admin/html/page/index.php b/theme/admin/html/page/index.php
index 7067c40..bdc7f94 100644
--- a/template/admin/html/page/index.php
+++ b/theme/admin/html/page/index.php
@@ -1,3 +1,4 @@
+<main id="main-content" class="wide">
<h1><i class="fa fa-file-text-o"></i><?=$Language->text('page_overview')?></h1>
<p class="actions-before"><?=$Language->text('overview_page_desc')?></p>
<ul class="actions">
@@ -5,10 +6,11 @@
<li><a href="<?=Application::getAdminURL('page/search.php')?>" title="<?=$Language->text('search_page')?>"><i class="fa fa-search"></i><?=$Language->text('search')?></a></li>
</ul>
-<div class="item-container page">
+<div class="item-container page grid">
<?php foreach($LIST['PAGES'] as $page): ?>
<?php echo $page; ?>
<?php endforeach; ?>
</div>
-<?=$PAGINATION['HTML']?> \ No newline at end of file
+<?=$PAGINATION['HTML']?>
+</main>
diff --git a/template/admin/html/page/insert.php b/theme/admin/html/page/insert.php
index 7442200..a77e47f 100644
--- a/template/admin/html/page/insert.php
+++ b/theme/admin/html/page/insert.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('insert_page')?></h1>
<p><?=$Language->text('insert_page_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/template/admin/html/page/item.php b/theme/admin/html/page/item.php
index a92b2fd..c61984c 100644
--- a/template/admin/html/page/item.php
+++ b/theme/admin/html/page/item.php
@@ -8,6 +8,9 @@
</div>
</header>
<blockquote cite="<?=$PAGE['URL']?>">
+ <?php if(isset($PAGE['FILE']['LIST'][0])): ?>
+ <img class="item-image" src="<?=$PAGE['FILE']['LIST'][0]?>" alt="" />
+ <?php endif; ?>
<p><?=excerpt($PAGE['BODY']['HTML']())?></p>
</blockquote>
@@ -26,4 +29,4 @@
<li><a href="<?=Application::getAdminURL("page/delete.php?id={$PAGE['ATTR']['ID']}")?>" title="<?=$Language->text('delete_page')?>"><i class="fa fa-trash-o"></i><span class="hidden"><?=$Language->text('delete_page')?></span></a></li>
</ul>
</footer>
-</article> \ No newline at end of file
+</article>
diff --git a/template/admin/html/page/search.php b/theme/admin/html/page/search.php
index a48f604..145b0f9 100644
--- a/template/admin/html/page/search.php
+++ b/theme/admin/html/page/search.php
@@ -1,17 +1,19 @@
+<main id="main-content" <?=!$PAGES ?: 'class="wide"'?>>
<h1><i class="fa fa-search"></i><?=$Language->text('title_page_search')?></h1>
<p><?=$Language->text('search_page_desc')?></p>
<form id="search-form" method="GET">
- <div class="flex flex-padding background">
+ <div class="form-border-box background padding">
<input id="search-text" type="search" name="q" placeholder="<?=$Language->text('placeholder_search')?>" value="<?=escapeHTML($QUERY)?>" />
</div>
- <div class="flex flex-padding background">
+ <div class="form-border-box background padding">
<input id="update-button" type="submit" value="<?=$Language->text('search')?>" />
</div>
</form>
-<div class="item-container post">
+<div class="item-container post grid">
<?php foreach($PAGES as $page): ?>
<?php echo $page; ?>
<?php endforeach; ?>
-</div> \ No newline at end of file
+</div>
+</main>
diff --git a/template/admin/html/page/update.php b/theme/admin/html/page/update.php
index 77a7eb2..ce51d2a 100644
--- a/template/admin/html/page/update.php
+++ b/theme/admin/html/page/update.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('update_page')?></h1>
<p><?=$Language->text('update_page_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/template/admin/html/pagination.php b/theme/admin/html/pagination.php
index 42eb378..70720b6 100644
--- a/template/admin/html/pagination.php
+++ b/theme/admin/html/pagination.php
@@ -27,4 +27,4 @@
<?php else: ?>
<div><a class="disabled"><i class="fa fa-arrow-right"></i></a></div>
<?php endif; ?>
-</div> \ No newline at end of file
+</div>
diff --git a/template/admin/html/post/delete.php b/theme/admin/html/post/delete.php
index 6654377..ed82197 100644
--- a/template/admin/html/post/delete.php
+++ b/theme/admin/html/post/delete.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-trash-o"></i><?=$Language->text('delete_post')?></h1>
<p><?=$Language->text('delete_post_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/theme/admin/html/post/form.php b/theme/admin/html/post/form.php
new file mode 100644
index 0000000..58ac122
--- /dev/null
+++ b/theme/admin/html/post/form.php
@@ -0,0 +1,104 @@
+<?php if($FORM['INFO']): ?>
+ <div id="message-list-wrapper">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach ?>
+ </ul>
+ </div>
+<?php endif ?>
+
+<form action="" method="POST">
+ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+
+<?php if($FORM['TYPE'] !== 'DELETE'): ?>
+ <div class="form-grid">
+ <label for="form_id">
+ <i class="fa fa-database"></i>ID</label>
+
+ <div class="form-grid-item">
+ <input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="AUTO_INCREMENT" value="<?=escapeHTML($FORM['DATA']['ID'])?>" />
+ </div>
+
+ <label for="form_user">
+ <i class="fa fa-user"></i><?=$Language->text('label_user')?></label>
+
+ <div class="form-grid-item">
+ <select id="form_user" name="user">
+ <?php foreach($FORM['USER_LIST'] as $user): ?>
+ <option value="<?=$user['ID']?>"<?=($FORM['DATA']['USER'] === $user['ID']) ? ' selected' : '' ?>><?=escapeHTML($user['FULLNAME'])?> [<?=$user['USERNAME']?>]</option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+
+ <label for="form_name">
+ <i class="fa fa-newspaper-o"></i><?=$Language->text('label_name')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" />
+ </div>
+
+ <label for="form_slug">
+ <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" />
+ </div>
+
+ <label for="form_time_insert">
+ <i class="fa fa-clock-o"></i><?=$Language->text('label_insert')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_time_insert" name="time_insert" placeholder="YYYY-MM-DD HH:II:SS" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" />
+ </div>
+
+ <label for="form_time_update">
+ <i class="fa fa-clock-o"></i><?=$Language->text('label_update')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : 'CURRENT_TIMESTAMP')?>" value="" />
+ </div>
+ </div>
+
+ <div id="content-editor-wrapper" class="form-border-box">
+ <div id="button-list-wrapper">
+ <ul id="markdown-list" class="button-list markdown">
+ <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->text('markdown_bold')?>"></li>
+ <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->text('markdown_italic')?>"></li>
+ <li data-markdown="heading" class="fa fa-header" title="<?=$Language->text('markdown_heading')?>"></li>
+ <li data-markdown="link" class="fa fa-link" title="<?=$Language->text('markdown_link')?>"></li>
+ <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->text('markdown_image')?>"></li>
+ <li data-markdown="code" class="fa fa-code" title="<?=$Language->text('markdown_code')?>"></li>
+ <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->text('markdown_quote')?>"></li>
+ <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->text('markdown_list_ul')?>"></li>
+ <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->text('markdown_list_ol')?>"></li>
+ </ul>
+ </div>
+ <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
+ </div>
+ <div id="emoticon-list-wrapper" class="form-border-box background padding">
+ <ul id="emoticon-list" class="button-list emoticons">
+ <?php foreach(getUnicodeEmoticons() as $emoticon => $explanation):?>
+ <li data-emoticon="<?=$emoticon?>" title="<?=$explanation?>"><?=$emoticon?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <div class="form-border-box background padding">
+ <input id="form_argv" name="argv" maxlength="250" placeholder="[ARGUMENT_ONE=foo|ARGUMENT_TWO=bar …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
+ </div>
+<?php else: ?>
+ <div class="form-border-box background padding">
+ <?=$HTML?>
+ </div>
+<?php endif; ?>
+
+ <div class="form-border-box background padding">
+ <?php if($FORM['TYPE'] === 'INSERT'): ?>
+ <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
+ <?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
+ <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
+ <?php elseif($FORM['TYPE'] === 'DELETE'): ?>
+ <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->text('sure')?>" />
+ <?php endif; ?>
+ </div>
+</form>
diff --git a/template/admin/html/post/index.php b/theme/admin/html/post/index.php
index f884b05..83dd5dc 100644
--- a/template/admin/html/post/index.php
+++ b/theme/admin/html/post/index.php
@@ -1,3 +1,4 @@
+<main id="main-content" class="wide">
<h1><i class="fa fa-newspaper-o"></i><?=$Language->text('post_overview')?></h1>
<p class="actions-before"><?=$Language->text('overview_post_desc')?></p>
<ul class="actions">
@@ -5,10 +6,11 @@
<li><a href="<?=Application::getAdminURL('post/search.php')?>" title="<?=$Language->text('search_post')?>"><i class="fa fa-search"></i><?=$Language->text('search')?></a></li>
</ul>
-<div class="item-container post">
+<div class="item-container post grid">
<?php foreach($LIST['POSTS'] as $post): ?>
<?php echo $post; ?>
<?php endforeach; ?>
</div>
-<?=$PAGINATION['HTML']?> \ No newline at end of file
+<?=$PAGINATION['HTML']?>
+</main>
diff --git a/template/admin/html/post/insert.php b/theme/admin/html/post/insert.php
index dc32c24..9b7c588 100644
--- a/template/admin/html/post/insert.php
+++ b/theme/admin/html/post/insert.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('insert_post')?></h1>
<p><?=$Language->text('insert_post_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/template/admin/html/post/item.php b/theme/admin/html/post/item.php
index 8258d30..ae06752 100644
--- a/template/admin/html/post/item.php
+++ b/theme/admin/html/post/item.php
@@ -8,6 +8,9 @@
</div>
</header>
<blockquote cite="<?=$POST['URL']?>">
+ <?php if(isset($POST['FILE']['LIST'][0])): ?>
+ <img class="item-image" src="<?=$POST['FILE']['LIST'][0]?>" alt="" />
+ <?php endif; ?>
<p><?=excerpt($POST['BODY']['HTML']())?></p>
</blockquote>
@@ -26,4 +29,4 @@
<li><a href="<?=Application::getAdminURL("post/delete.php?id={$POST['ATTR']['ID']}")?>" title="<?=$Language->text('delete_post')?>"><i class="fa fa-trash-o"></i><span class="hidden"><?=$Language->text('delete_post')?></span></a></li>
</ul>
</footer>
-</article> \ No newline at end of file
+</article>
diff --git a/template/admin/html/post/search.php b/theme/admin/html/post/search.php
index 4476786..00bd016 100644
--- a/template/admin/html/post/search.php
+++ b/theme/admin/html/post/search.php
@@ -1,17 +1,19 @@
+<main id="main-content" <?=!$POSTS ?: 'class="wide"'?>>
<h1><i class="fa fa-search"></i><?=$Language->text('title_post_search')?></h1>
<p><?=$Language->text('search_post_desc')?></p>
<form id="search-form" method="GET">
- <div class="flex flex-padding background">
+ <div class="form-border-box background padding">
<input id="search-text" type="search" name="q" placeholder="<?=$Language->text('placeholder_search')?>" value="<?=escapeHTML($QUERY)?>" />
</div>
- <div class="flex flex-padding background">
+ <div class="form-border-box background padding">
<input id="update-button" type="submit" value="<?=$Language->text('search')?>" />
</div>
</form>
-<div class="item-container post">
+<div class="item-container post grid">
<?php foreach($POSTS as $post): ?>
<?php echo $post; ?>
<?php endforeach; ?>
-</div> \ No newline at end of file
+</div>
+</main>
diff --git a/template/admin/html/post/update.php b/theme/admin/html/post/update.php
index a577bec..aa3835d 100644
--- a/template/admin/html/post/update.php
+++ b/theme/admin/html/post/update.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('update_post')?></h1>
<p><?=$Language->text('update_post_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/template/admin/html/user/delete.php b/theme/admin/html/user/delete.php
index 01927b2..b500a12 100644
--- a/template/admin/html/user/delete.php
+++ b/theme/admin/html/user/delete.php
@@ -1,6 +1,8 @@
+<main id="main-content">
<h1><i class="fa fa-trash-o"></i><?=$Language->text('delete_user')?></h1>
<p><?=$Language->text('delete_user_desc')?></p>
<p class="red"><?=$Language->text('delete_user_warning')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/theme/admin/html/user/form.php b/theme/admin/html/user/form.php
new file mode 100644
index 0000000..7e370e5
--- /dev/null
+++ b/theme/admin/html/user/form.php
@@ -0,0 +1,114 @@
+<?php if($FORM['INFO']): ?>
+ <div id="message-list-wrapper">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach ?>
+ </ul>
+ </div>
+<?php endif ?>
+
+<form action="" method="POST">
+ <input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+
+<?php if($FORM['TYPE'] !== 'DELETE'): ?>
+ <div class="form-grid">
+ <label for="form_id">
+ <i class="fa fa-database"></i>ID</label>
+
+ <div class="form-grid-item">
+ <input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="AUTO_INCREMENT" value="<?=escapeHTML($FORM['DATA']['ID'])?>" />
+ </div>
+
+ <label for="form_password">
+ <i class="fa fa-key"></i><?=$Language->text('label_password')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_password" name="password" placeholder="NO CHANGE" type="password" />
+ </div>
+
+ <label for="form_fullname">
+ <i class="fa fa-user"></i><?=$Language->text('label_fullname')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_fullname" name="fullname" value="<?=escapeHTML($FORM['DATA']['FULLNAME'])?>" />
+ </div>
+
+ <label for="form_mailaddr">
+ <i class="fa fa-envelope-o"></i><?=$Language->text('label_mailaddr')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_mailaddr" name="mailaddr" value="<?=escapeHTML($FORM['DATA']['MAILADDR'])?>" />
+ </div>
+
+ <label for="form_username">
+ <i class="fa fa-user-secret"></i><?=$Language->text('label_username')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" />
+ </div>
+
+ <label for="form_slug">
+ <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" />
+ </div>
+
+ <label for="form_time_insert">
+ <i class="fa fa-clock-o"></i><?=$Language->text('label_insert')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_time_insert" name="time_insert" placeholder="YYYY-MM-DD HH:II:SS" value="<?=escapeHTML($FORM['DATA']['TIME_INSERT'])?>" />
+ </div>
+
+ <label for="form_time_update">
+ <i class="fa fa-clock-o"></i><?=$Language->text('label_update')?></label>
+
+ <div class="form-grid-item">
+ <input id="form_time_update" name="time_update" placeholder="<?=escapeHTML($FORM['DATA']['TIME_UPDATE'] ? $FORM['DATA']['TIME_UPDATE'] : 'CURRENT_TIMESTAMP')?>" value="" />
+ </div>
+ </div>
+
+ <div id="content-editor-wrapper" class="form-border-box">
+ <div id="button-list-wrapper">
+ <ul id="markdown-list" class="button-list markdown">
+ <li data-markdown="bold" class="fa fa-bold" title="<?=$Language->text('markdown_bold')?>"></li>
+ <li data-markdown="italic" class="fa fa-italic" title="<?=$Language->text('markdown_italic')?>"></li>
+ <li data-markdown="heading" class="fa fa-header" title="<?=$Language->text('markdown_heading')?>"></li>
+ <li data-markdown="link" class="fa fa-link" title="<?=$Language->text('markdown_link')?>"></li>
+ <li data-markdown="image" class="fa fa-picture-o" title="<?=$Language->text('markdown_image')?>"></li>
+ <li data-markdown="code" class="fa fa-code" title="<?=$Language->text('markdown_code')?>"></li>
+ <li data-markdown="quote" class="fa fa-quote-right" title="<?=$Language->text('markdown_quote')?>"></li>
+ <li data-markdown="list_ul" class="fa fa-list-ul" title="<?=$Language->text('markdown_list_ul')?>"></li>
+ <li data-markdown="list_ol" class="fa fa-list-ol" title="<?=$Language->text('markdown_list_ol')?>"></li>
+ </ul>
+ </div>
+ <textarea id="content-editor" name="body" placeholder="[…]"><?=escapeHTML($FORM['DATA']['BODY'])?></textarea>
+ </div>
+ <div id="emoticon-list-wrapper" class="form-border-box background padding">
+ <ul id="emoticon-list" class="button-list emoticons">
+ <?php foreach(getUnicodeEmoticons() as $emoticon => $explanation):?>
+ <li data-emoticon="<?=$emoticon?>" title="<?=$explanation?>"><?=$emoticon?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <div class="form-border-box background padding">
+ <input id="form_argv" name="argv" maxlength="250" placeholder="[ARGUMENT_ONE=foo|ARGUMENT_TWO=bar …]" value="<?=escapeHTML($FORM['DATA']['ARGV'])?>" />
+ </div>
+<?php else: ?>
+ <div class="form-border-box background padding">
+ <?=$HTML?>
+ </div>
+<?php endif; ?>
+
+ <div class="form-border-box background padding">
+ <?php if($FORM['TYPE'] === 'INSERT'): ?>
+ <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
+ <?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
+ <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
+ <?php elseif($FORM['TYPE'] === 'DELETE'): ?>
+ <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->text('sure')?>" />
+ <?php endif; ?>
+ </div>
+</form>
diff --git a/template/admin/html/user/index.php b/theme/admin/html/user/index.php
index aae8ee8..7e1d794 100644
--- a/template/admin/html/user/index.php
+++ b/theme/admin/html/user/index.php
@@ -1,3 +1,4 @@
+<main id="main-content">
<h1><i class="fa fa-user"></i><?=$Language->text('user_overview')?></h1>
<p class="actions-before"><?=$Language->text('overview_user_desc')?></p>
<ul class="actions">
@@ -10,4 +11,5 @@
<?php endforeach; ?>
</div>
-<?=$PAGINATION['HTML']?> \ No newline at end of file
+<?=$PAGINATION['HTML']?>
+</main>
diff --git a/template/admin/html/user/insert.php b/theme/admin/html/user/insert.php
index 5cbdd06..7c7aba2 100644
--- a/template/admin/html/user/insert.php
+++ b/theme/admin/html/user/insert.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('insert_user')?></h1>
<p><?=$Language->text('insert_user_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/template/admin/html/user/item.php b/theme/admin/html/user/item.php
index d8e43cf..ae16637 100644
--- a/template/admin/html/user/item.php
+++ b/theme/admin/html/user/item.php
@@ -7,6 +7,9 @@
</div>
</header>
<blockquote cite="<?=$USER['URL']?>">
+ <?php if(isset($USER['FILE']['LIST'][0])): ?>
+ <img class="item-image" src="<?=$USER['FILE']['LIST'][0]?>" alt="" />
+ <?php endif; ?>
<p><?=excerpt($USER['BODY']['HTML']())?></p>
</blockquote>
@@ -25,4 +28,4 @@
<li><a href="<?=Application::getAdminURL("user/delete.php?id={$USER['ATTR']['ID']}")?>" title="<?=$Language->text('delete_user')?>"><i class="fa fa-trash-o"></i><span class="hidden"><?=$Language->text('delete_user')?></span></a></li>
</ul>
</footer>
-</article> \ No newline at end of file
+</article>
diff --git a/template/admin/html/user/update.php b/theme/admin/html/user/update.php
index e023925..ad12677 100644
--- a/template/admin/html/user/update.php
+++ b/theme/admin/html/user/update.php
@@ -1,4 +1,6 @@
+<main id="main-content">
<h1><i class="fa fa-pencil-square-o"></i><?=$Language->text('update_user')?></h1>
<p><?=$Language->text('update_user_desc')?></p>
-<?=$HTML?> \ No newline at end of file
+<?=$HTML?>
+</main>
diff --git a/template/admin/lang/de.php b/theme/admin/lang/de.php
index 288a5f7..0a848a6 100644
--- a/template/admin/lang/de.php
+++ b/theme/admin/lang/de.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Admin: Internationalization [DE] [Thomas Lange <code@nerdmind.de>] #
+# Internationalization [DE] [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# This file contains template internationalization strings for the DE language #
@@ -143,4 +143,3 @@ $LANGUAGE['markdown_code'] = 'Codeblock';
$LANGUAGE['markdown_quote'] = 'Zitat';
$LANGUAGE['markdown_list_ul'] = 'Liste [ungeordnet]';
$LANGUAGE['markdown_list_ol'] = 'Liste [geordnet]';
-?> \ No newline at end of file
diff --git a/template/admin/lang/en.php b/theme/admin/lang/en.php
index d774a36..174a1d7 100644
--- a/template/admin/lang/en.php
+++ b/theme/admin/lang/en.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Admin: Internationalization [EN] [Thomas Lange <code@nerdmind.de>] #
+# Internationalization [EN] [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# This file contains template internationalization strings for the EN language #
@@ -143,4 +143,3 @@ $LANGUAGE['markdown_code'] = 'Code block';
$LANGUAGE['markdown_quote'] = 'Quote';
$LANGUAGE['markdown_list_ul'] = 'List [unordered]';
$LANGUAGE['markdown_list_ol'] = 'List [ordered]';
-?> \ No newline at end of file
diff --git a/theme/admin/rsrc/css/import/_font-awesome.scss b/theme/admin/rsrc/css/import/_font-awesome.scss
new file mode 100644
index 0000000..448491f
--- /dev/null
+++ b/theme/admin/rsrc/css/import/_font-awesome.scss
@@ -0,0 +1,138 @@
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Main
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa {
+ font: normal normal normal 14px/1 "FontAwesome";
+ font-size: inherit;
+ speak: none;
+ display: inline-block;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Icons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa-bug:before {
+ content: "\f188";
+}
+
+.fa-key:before {
+ content: "\f084";
+}
+
+.fa-link:before {
+ content: "\f0c1";
+}
+
+.fa-bold:before {
+ content: "\f032";
+}
+
+.fa-code:before {
+ content: "\f121";
+}
+
+.fa-user:before {
+ content: "\f007";
+}
+
+.fa-book:before {
+ content: "\f02d";
+}
+
+.fa-italic:before {
+ content: "\f033";
+}
+
+.fa-header:before {
+ content: "\f1dc";
+}
+
+.fa-search:before {
+ content: "\f002";
+}
+
+.fa-trash-o:before {
+ content: "\f014";
+}
+
+.fa-sign-in:before {
+ content: "\f090";
+}
+
+.fa-clock-o:before {
+ content: "\f017";
+}
+
+.fa-list-ul:before {
+ content: "\f0ca";
+}
+
+.fa-list-ol:before {
+ content: "\f0cb";
+}
+
+.fa-database:before {
+ content: "\f1c0";
+}
+
+.fa-language:before {
+ content: "\f1ab";
+}
+
+.fa-sign-out:before {
+ content: "\f08b";
+}
+
+.fa-dashboard:before {
+ content: "\f0e4";
+}
+
+.fa-picture-o:before {
+ content: "\f03e";
+}
+
+.fa-envelope-o:before {
+ content: "\f003";
+}
+
+.fa-arrow-left:before {
+ content: "\f060";
+}
+
+.fa-quote-right:before {
+ content: "\f10e";
+}
+
+.fa-user-secret:before {
+ content: "\f21b";
+}
+
+.fa-file-text-o:before {
+ content: "\f0f6";
+}
+
+.fa-newspaper-o:before {
+ content: "\f1ea";
+}
+
+.fa-arrow-right:before {
+ content: "\f061";
+}
+
+.fa-external-link:before {
+ content: "\f08e";
+}
+
+.fa-github-square:before {
+ content: "\f092";
+}
+
+.fa-pencil-square-o:before {
+ content: "\f044";
+}
+
+.fa-exclamation-triangle:before {
+ content: "\f071";
+}
diff --git a/theme/admin/rsrc/css/import/_fonts.scss b/theme/admin/rsrc/css/import/_fonts.scss
new file mode 100644
index 0000000..2145065
--- /dev/null
+++ b/theme/admin/rsrc/css/import/_fonts.scss
@@ -0,0 +1,32 @@
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Font Awesome" [4.7.0] (by Fontello): SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "FontAwesome";
+ font-weight: 400;
+ src: url("../font/font-awesome-fontello.woff2") format("woff2");
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Kadwa": SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "Kadwa";
+ font-weight: 400;
+ src: url("../font/kadwa-n-400.woff2") format("woff2");
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Ruda": SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "Ruda";
+ font-weight: 400;
+ src: url("../font/ruda-n-400.woff2") format("woff2");
+}
+
+@font-face {
+ font-family: "Ruda";
+ font-weight: 700;
+ src: url("../font/ruda-n-700.woff2") format("woff2");
+}
diff --git a/theme/admin/rsrc/css/import/_responsive.scss b/theme/admin/rsrc/css/import/_responsive.scss
new file mode 100644
index 0000000..e387c98
--- /dev/null
+++ b/theme/admin/rsrc/css/import/_responsive.scss
@@ -0,0 +1,91 @@
+@media only screen and (max-width: 90em /*1440px*/) {
+ .item-container.grid {
+ grid-template-columns: auto auto;
+ }
+}
+
+@media only screen and (min-width: 62.5em /*1000px*/) {
+ #main-content {
+ border: 0.05rem solid #AAA;
+ border-top: none;
+ border-bottom: none;
+ }
+}
+
+@media only screen and (max-width: 62.5em /*1000px*/) {
+ .item-container.grid {
+ grid-template-columns: auto;
+ }
+}
+
+@media only screen and (max-width: 50em /*800px*/) {
+ html {
+ font-size: 1.125rem; /*18px*/
+ }
+}
+
+@media only screen and (max-width: 37.5em /*600px*/) {
+ #main-content {
+ padding: 0.5rem;
+ }
+
+ #main-navi {
+ font-size: 1rem;
+
+ li {
+ span {
+ display: none;
+ }
+
+ .fa {
+ margin-right: 0;
+ }
+ }
+
+ a {
+ padding: 0.5rem;
+ }
+ }
+
+ #emoticon-list-wrapper {
+ display: none;
+ }
+
+ .item-container.grid {
+ grid-column-gap: 0.75rem;
+ grid-row-gap: 0.75rem;
+ column-gap: 0.75rem;
+ row-gap: 0.75rem;
+ }
+
+ .form-grid {
+ grid-template-columns: auto auto;
+ }
+
+ .actions {
+ float: none;
+ display: flex;
+ width: 100%;
+ flex-grow: 1;
+ justify-content: center;
+ overflow: hidden;
+ box-sizing: border-box;
+
+ li {
+ flex-grow: 1;
+
+ + li {
+ border-left: none;
+ }
+ }
+ }
+
+ .actions-before {
+ float: none;
+ }
+
+ .arguments {
+ font-size: 0.5rem;
+ line-height: 0.75rem;
+ }
+}
diff --git a/theme/admin/rsrc/css/main.css b/theme/admin/rsrc/css/main.css
new file mode 100644
index 0000000..f482179
--- /dev/null
+++ b/theme/admin/rsrc/css/main.css
@@ -0,0 +1,937 @@
+@charset "UTF-8";
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Selection
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+::-moz-selection {
+ background: #BBB;
+ color: #000;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Hyperlinks
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+a {
+ color: #0060A0;
+ text-decoration: none;
+}
+a:focus {
+ background: #CCC;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Headings
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+h1, h2, h3, h4, h5, h6 {
+ margin-bottom: 0;
+ text-transform: uppercase;
+}
+h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p {
+ margin-top: 0;
+}
+h1 .fa, h2 .fa, h3 .fa, h4 .fa, h5 .fa, h6 .fa {
+ margin-right: 0.25rem;
+}
+
+h1 {
+ margin-top: 0;
+ font-size: 0.8rem;
+}
+
+h2 {
+ font-size: 0.7rem;
+}
+
+h3 {
+ font-size: 0.65rem;
+}
+
+h4 {
+ font-size: 0.6rem;
+}
+
+h5 {
+ font-size: 0.55rem;
+}
+
+h6 {
+ font-size: 0.5rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Document
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+html, body {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-size: 1.25rem;
+ color: #333;
+ background: #DDD;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+}
+
+body {
+ font-family: "Ruda", "sans-serif";
+ font-size: 0.7rem;
+ line-height: 1.2rem;
+ display: flex;
+ min-height: 100vh;
+ flex-direction: column;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Main content
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-content {
+ flex: 1;
+ width: 100%;
+ background: #FFF;
+ box-sizing: border-box;
+ padding: 0.75rem;
+}
+#main-content.wide {
+ max-width: 90rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Width
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-content, .header-content {
+ max-width: 50rem;
+ margin: 0 auto;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Header
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-header {
+ font-size: 0.6rem;
+}
+
+#header-text, #header-desc {
+ text-shadow: 0 -1px #4E718F, 1px 0 #4E718F, 0 1px #4E718F, -1px 0 #4E718F;
+}
+
+#header-text {
+ font-size: 0.8rem;
+ font-weight: 700;
+ text-transform: uppercase;
+}
+
+#header-desc {
+ font-size: 0.6rem;
+ font-weight: 700;
+ line-height: 1rem;
+}
+#header-desc span {
+ color: #CCC;
+}
+
+#header-logo {
+ display: block;
+ max-height: 5rem;
+ float: left;
+ margin-right: 0.5rem;
+}
+
+.header-line {
+ padding: 0.5rem 0.75rem;
+ overflow: hidden;
+}
+.header-line:first-child {
+ background: #5E819F;
+ position: sticky;
+ top: 0;
+}
+.header-line:last-child {
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ border-left: none;
+ border-right: none;
+ padding: 0.25rem 0.75rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Footer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-footer {
+ font-size: 0.6rem;
+ background: #EEE;
+ border-top: 0.05rem solid #AAA;
+ padding: 0.5rem 0.75rem;
+ text-align: center;
+}
+#main-footer ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+#main-footer ul li {
+ display: inline;
+}
+#main-footer ul li .fa {
+ margin-right: 0.125rem;
+}
+#main-footer ul li:after {
+ content: " · ";
+ font-weight: bold;
+}
+#main-footer ul li:last-child:after {
+ content: none;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Main Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-navi ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+#main-navi ul li {
+ display: inline;
+}
+#main-navi ul li .fa {
+ margin-right: 0.25rem;
+}
+#main-navi ul li:last-child {
+ float: right;
+}
+#main-navi ul li:first-child {
+ float: none;
+}
+#main-navi a {
+ padding: 0.1rem 0.3rem;
+ background: #DDD;
+ border: 0.05rem solid #AAA;
+ color: inherit;
+ text-decoration: none;
+ text-align: center;
+ display: inline-block;
+}
+#main-navi a:hover, #main-navi a:focus {
+ text-decoration: none;
+ background: #CCC;
+}
+#main-navi a:focus {
+ background: #CCC;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Site Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#site-navi {
+ clear: both;
+ display: flex;
+ box-sizing: border-box;
+ justify-content: space-between;
+ margin-top: 0.75rem;
+}
+#site-navi > div {
+ display: flex;
+ align-items: center;
+ border: 0.05rem solid #AAA;
+ background: #EEE;
+}
+#site-navi > div > a {
+ display: block;
+}
+#site-navi .disabled {
+ pointer-events: none;
+ color: #AAA;
+}
+#site-navi .active a {
+ background: #CCC !important;
+ font-weight: 600;
+ pointer-events: none;
+}
+#site-navi ol {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+#site-navi ol li {
+ float: left;
+ display: inline-block;
+}
+#site-navi ol li + li {
+ border-left: 0.05rem solid #AAA;
+}
+#site-navi a {
+ padding: 0 0.5rem;
+ text-decoration: none;
+ color: inherit;
+ display: inline-block;
+}
+#site-navi a:hover, #site-navi a:focus {
+ background: #CCC;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Actions
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.actions {
+ margin: 0 0 0.5rem 0;
+ padding: 0;
+ list-style: none;
+ font-size: 0.6rem;
+ float: right;
+ text-align: center;
+}
+.actions .fa {
+ margin-right: 0.1rem;
+}
+.actions li {
+ display: inline-block;
+ font-weight: bold;
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+}
+.actions a {
+ color: inherit;
+ display: block;
+ padding: 0 0.25rem;
+}
+
+.actions-before {
+ float: left;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+pre {
+ margin-bottom: 1rem;
+ overflow: auto;
+ -moz-tab-size: 4;
+ tab-size: 4;
+}
+
+code, pre {
+ font-family: "monospace";
+ color: #B03060;
+}
+
+p {
+ margin-top: 0;
+}
+
+img {
+ border: none;
+ max-width: 100%;
+}
+
+.red {
+ color: #B03060;
+}
+
+.blue {
+ color: #40779A;
+}
+
+.green {
+ color: #008B45;
+}
+
+.right {
+ float: right;
+}
+
+.hidden {
+ display: none;
+}
+
+#database-result {
+ color: inherit;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Tables
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+table {
+ width: 100%;
+ margin-bottom: 1rem;
+}
+
+td {
+ vertical-align: middle;
+}
+
+table, td {
+ padding: 0.5rem;
+ border: 0.05rem solid #AAA;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Brackets
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.brackets:after, .brackets:before {
+ color: #222;
+}
+.brackets:before {
+ content: "[";
+}
+.brackets:after {
+ content: "]";
+}
+
+.brackets a, a.brackets {
+ text-decoration: none;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Item Element
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.item {
+ display: flex;
+ flex-direction: column;
+ border: 0.05rem solid #AAA;
+ clear: both;
+}
+.item header {
+ padding: 0.5rem 0.75rem;
+ border-bottom: 0.05rem solid #AAA;
+ position: sticky;
+ top: 0;
+}
+.item header h2 {
+ margin-top: 0;
+}
+.item footer {
+ border-top: 0.05rem solid #AAA;
+}
+.item footer ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+.item footer ul li {
+ display: inline-block;
+ float: left;
+}
+.item footer ul li:last-child {
+ float: right;
+}
+.item footer a {
+ color: inherit;
+ display: inline-block;
+ padding: 0.25rem 2rem;
+}
+.item footer a:hover, .item footer a:active {
+ background: #DDD;
+}
+.item header, .item footer {
+ background: #EEE;
+ overflow: hidden;
+}
+.item blockquote {
+ margin: 0;
+ padding: 0.75rem;
+ overflow: hidden;
+ font-family: inherit;
+ flex-grow: 1;
+}
+.item blockquote p {
+ margin-bottom: 0;
+}
+.item-id {
+ float: right;
+ color: #666;
+}
+.item-image {
+ float: left;
+ display: block;
+ margin-right: 0.75rem;
+ width: 10rem;
+ height: 7rem;
+ object-fit: cover;
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+}
+.item-container.grid {
+ width: 100%;
+ display: grid;
+ grid-template-columns: auto auto auto;
+ grid-column-gap: 1rem;
+ grid-row-gap: 1rem;
+ column-gap: 1rem;
+ row-gap: 1rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Argument list
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.arguments {
+ list-style: none;
+ margin: 0;
+ padding: 0.25rem 0.75rem;
+ background: #EEE;
+ font-size: 0.6rem;
+ text-align: center;
+ border-top: 0.05rem solid #AAA;
+}
+.arguments li {
+ display: inline;
+}
+.arguments li > span {
+ color: #40779A;
+}
+.arguments li:after {
+ content: " · ";
+ font-weight: bold;
+}
+.arguments li:last-child:after {
+ content: none;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Grids
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.form-grid {
+ display: grid;
+ grid-template-columns: 8rem auto 8rem auto;
+ border-left: 0.05rem solid #AAA;
+ border-bottom: 0.05rem solid #AAA;
+}
+.form-grid.two-columns {
+ grid-template-columns: auto auto;
+}
+.form-grid > label {
+ display: flex;
+ align-items: center;
+ background: #DDD;
+}
+.form-grid > label .fa {
+ margin-left: 0.5rem;
+ margin-right: 1rem;
+}
+.form-grid-item,
+.form-grid > label {
+ padding: 0.5rem;
+ border-top: 0.05rem solid #AAA;
+ border-right: 0.05rem solid #AAA;
+}
+
+.form-border-box {
+ border: 0.05rem solid #AAA;
+}
+.form-border-box.padding {
+ padding: 0.5rem;
+}
+.form-border-box.background {
+ background: #DDD;
+}
+.form-border-box.nobordertop {
+ border-top: none;
+}
+.form-border-box + .form-border-box {
+ border-top: none;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form buttons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#emoticon-list-wrapper {
+ display: flex;
+ width: 100%;
+ justify-content: center;
+ box-sizing: border-box;
+}
+
+#button-list-wrapper {
+ border-bottom: 0.05rem solid #AAA;
+ background: #EEE;
+ overflow: hidden;
+}
+
+.button-list {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.button-list.emoticons > li {
+ font-size: 1.25rem;
+ display: inline-block;
+ padding: 0.2rem;
+ border-bottom: 0.2rem solid transparent;
+ border-radius: 0.1rem;
+ cursor: pointer;
+}
+.button-list.emoticons > li:hover, .button-list.emoticons > li:active {
+ border-bottom: 0.2rem solid #AAA;
+}
+
+.button-list.markdown > li {
+ float: left;
+ padding: 0.5rem;
+ cursor: pointer;
+ width: 1.75rem;
+ box-sizing: border-box;
+ text-align: center;
+}
+.button-list.markdown > li:hover, .button-list.markdown > li:active {
+ color: #40779A;
+}
+
+#content-editor {
+ border: none;
+ margin: 0;
+}
+#content-editor-wrapper {
+ border-top: none;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+input, select, textarea {
+ width: 100%;
+ background: #EEE;
+ color: #404040;
+ font-family: inherit;
+ font-size: 0.7rem;
+ padding: 0.25rem;
+ border: 0.05rem solid #AAA;
+ box-sizing: border-box;
+}
+input:focus, select:focus, textarea:focus {
+ outline: none;
+}
+
+textarea {
+ font-family: "Kadwa", "sans-serif";
+ box-sizing: border-box;
+ display: block;
+ resize: vertical;
+ min-height: 15rem;
+ line-height: 1.2rem;
+ padding: 0.5rem;
+ -webkit-hyphens: none;
+ hyphens: none;
+}
+
+input[type=submit] {
+ text-transform: uppercase;
+ border-radius: 0.1rem;
+}
+input:disabled {
+ background: #DDD;
+ color: #888;
+}
+input:disabled:hover {
+ cursor: not-allowed;
+}
+
+label {
+ text-transform: uppercase;
+ font-weight: normal;
+}
+label:after {
+ content: ":";
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form buttons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#insert-button, #update-button, #delete-button {
+ color: #EEE;
+ border: 0.05rem solid #404040;
+}
+
+#insert-button {
+ background: #4D8D5D;
+}
+#insert-button:active, #insert-button:focus {
+ background: #3b6c47;
+}
+
+#update-button {
+ background: #6A8AA5;
+}
+#update-button:active, #update-button:focus {
+ background: #537089;
+}
+
+#delete-button {
+ background: #C45C66;
+}
+#delete-button:active, #delete-button:focus {
+ background: #ae3f4a;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form message list
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#message-list {
+ margin: 0;
+ padding: 0.5rem;
+ list-style: none;
+ background: #C45C66;
+ color: #EEE;
+ font-size: 0.6rem;
+}
+#message-list-wrapper {
+ margin-bottom: 0.5rem;
+ border: 0.1rem solid #ae3f4a;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Search form
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#search-form {
+ margin-bottom: 1rem;
+}
+
+@media only screen and (max-width: 90em) {
+ .item-container.grid {
+ grid-template-columns: auto auto;
+ }
+}
+@media only screen and (min-width: 62.5em) {
+ #main-content {
+ border: 0.05rem solid #AAA;
+ border-top: none;
+ border-bottom: none;
+ }
+}
+@media only screen and (max-width: 62.5em) {
+ .item-container.grid {
+ grid-template-columns: auto;
+ }
+}
+@media only screen and (max-width: 50em) {
+ html {
+ font-size: 1.125rem;
+ /*18px*/
+ }
+}
+@media only screen and (max-width: 37.5em) {
+ #main-content {
+ padding: 0.5rem;
+ }
+
+ #main-navi {
+ font-size: 1rem;
+ }
+ #main-navi li span {
+ display: none;
+ }
+ #main-navi li .fa {
+ margin-right: 0;
+ }
+ #main-navi a {
+ padding: 0.5rem;
+ }
+
+ #emoticon-list-wrapper {
+ display: none;
+ }
+
+ .item-container.grid {
+ grid-column-gap: 0.75rem;
+ grid-row-gap: 0.75rem;
+ column-gap: 0.75rem;
+ row-gap: 0.75rem;
+ }
+
+ .form-grid {
+ grid-template-columns: auto auto;
+ }
+
+ .actions {
+ float: none;
+ display: flex;
+ width: 100%;
+ flex-grow: 1;
+ justify-content: center;
+ overflow: hidden;
+ box-sizing: border-box;
+ }
+ .actions li {
+ flex-grow: 1;
+ }
+ .actions li + li {
+ border-left: none;
+ }
+
+ .actions-before {
+ float: none;
+ }
+
+ .arguments {
+ font-size: 0.5rem;
+ line-height: 0.75rem;
+ }
+}
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Main
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa {
+ font: normal normal normal 14px/1 "FontAwesome";
+ font-size: inherit;
+ speak: none;
+ display: inline-block;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Icons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa-bug:before {
+ content: "";
+}
+
+.fa-key:before {
+ content: "";
+}
+
+.fa-link:before {
+ content: "";
+}
+
+.fa-bold:before {
+ content: "";
+}
+
+.fa-code:before {
+ content: "";
+}
+
+.fa-user:before {
+ content: "";
+}
+
+.fa-book:before {
+ content: "";
+}
+
+.fa-italic:before {
+ content: "";
+}
+
+.fa-header:before {
+ content: "";
+}
+
+.fa-search:before {
+ content: "";
+}
+
+.fa-trash-o:before {
+ content: "";
+}
+
+.fa-sign-in:before {
+ content: "";
+}
+
+.fa-clock-o:before {
+ content: "";
+}
+
+.fa-list-ul:before {
+ content: "";
+}
+
+.fa-list-ol:before {
+ content: "";
+}
+
+.fa-database:before {
+ content: "";
+}
+
+.fa-language:before {
+ content: "";
+}
+
+.fa-sign-out:before {
+ content: "";
+}
+
+.fa-dashboard:before {
+ content: "";
+}
+
+.fa-picture-o:before {
+ content: "";
+}
+
+.fa-envelope-o:before {
+ content: "";
+}
+
+.fa-arrow-left:before {
+ content: "";
+}
+
+.fa-quote-right:before {
+ content: "";
+}
+
+.fa-user-secret:before {
+ content: "";
+}
+
+.fa-file-text-o:before {
+ content: "";
+}
+
+.fa-newspaper-o:before {
+ content: "";
+}
+
+.fa-arrow-right:before {
+ content: "";
+}
+
+.fa-external-link:before {
+ content: "";
+}
+
+.fa-github-square:before {
+ content: "";
+}
+
+.fa-pencil-square-o:before {
+ content: "";
+}
+
+.fa-exclamation-triangle:before {
+ content: "";
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Font Awesome" [4.7.0] (by Fontello): SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "FontAwesome";
+ font-weight: 400;
+ src: url("../font/font-awesome-fontello.woff2") format("woff2");
+}
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Kadwa": SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "Kadwa";
+ font-weight: 400;
+ src: url("../font/kadwa-n-400.woff2") format("woff2");
+}
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Ruda": SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "Ruda";
+ font-weight: 400;
+ src: url("../font/ruda-n-400.woff2") format("woff2");
+}
+@font-face {
+ font-family: "Ruda";
+ font-weight: 700;
+ src: url("../font/ruda-n-700.woff2") format("woff2");
+}
diff --git a/theme/admin/rsrc/css/main.scss b/theme/admin/rsrc/css/main.scss
new file mode 100644
index 0000000..571bafa
--- /dev/null
+++ b/theme/admin/rsrc/css/main.scss
@@ -0,0 +1,768 @@
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Selection
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+::-moz-selection {
+ background: #BBB;
+ color: #000;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Hyperlinks
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+a {
+ color: #0060A0;
+ text-decoration: none;
+
+ &:focus {
+ background: #CCC;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Headings
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+h1, h2, h3, h4, h5, h6 {
+ margin-bottom: 0;
+ text-transform: uppercase;
+
+ +p {
+ margin-top: 0;
+ }
+
+ .fa {
+ margin-right: 0.25rem;
+ }
+}
+
+h1 {
+ margin-top: 0;
+ font-size: 0.80rem;
+}
+
+h2 {
+ font-size: 0.70rem;
+}
+
+h3 {
+ font-size: 0.65rem;
+}
+
+h4 {
+ font-size: 0.60rem;
+}
+
+h5 {
+ font-size: 0.55rem;
+}
+
+h6 {
+ font-size: 0.50rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Document
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+html, body {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-size: 1.25rem;
+ color: #333;
+ background: #DDD;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+}
+
+body {
+ font-family: "Ruda", "sans-serif";
+ font-size: 0.7rem;
+ line-height: 1.2rem;
+ display: flex;
+ min-height: 100vh;
+ flex-direction: column;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Main content
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-content {
+ flex: 1;
+ width: 100%;
+ background: #FFF;
+ box-sizing: border-box;
+ padding: 0.75rem;
+ // border definition in _responsive.scss
+
+ &.wide {
+ max-width: 90rem;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Width
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-content, .header-content {
+ max-width: 50rem;
+ margin: 0 auto;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Header
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-header {
+ font-size: 0.6rem;
+}
+
+#header-text, #header-desc {
+ text-shadow: 0 -1px #4E718F, 1px 0 #4E718F, 0 1px #4E718F, -1px 0 #4E718F;
+}
+
+#header-text {
+ font-size: 0.8rem;
+ font-weight: 700;
+ text-transform: uppercase;
+}
+
+#header-desc {
+ font-size: 0.6rem;
+ font-weight: 700;
+ line-height: 1rem;
+
+ span {
+ color: #CCC;
+ }
+}
+
+#header-logo {
+ display: block;
+ max-height: 5rem;
+ float: left;
+ margin-right: 0.5rem;
+}
+
+.header-line {
+ padding: 0.5rem 0.75rem;
+ overflow: hidden;
+
+ &:first-child {
+ background: #5E819F;
+ position: sticky;
+ top: 0;
+ }
+
+ &:last-child {
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ border-left: none;
+ border-right: none;
+ padding: 0.25rem 0.75rem;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Footer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-footer {
+ font-size: 0.6rem;
+ background: #EEE;
+ border-top: 0.05rem solid #AAA;
+ padding: 0.5rem 0.75rem;
+ text-align: center;
+
+ ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+
+ li {
+ display: inline;
+
+ .fa {
+ margin-right: 0.125rem;
+ }
+ }
+
+ li:after {
+ content: " · ";
+ font-weight: bold;
+ }
+
+ li:last-child:after {
+ content: none;
+ }
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Main Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-navi {
+ ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+
+ li {
+ display: inline;
+
+ .fa {
+ margin-right: 0.25rem;
+ }
+ }
+
+ li:last-child {
+ float: right;
+ }
+
+ li:first-child {
+ float: none;
+ }
+ }
+
+ a {
+ padding: 0.1rem 0.3rem;
+ background: #DDD;
+ border: 0.05rem solid #AAA;
+ color: inherit;
+ text-decoration: none;
+ text-align: center;
+ display: inline-block;
+
+ &:hover, &:focus {
+ text-decoration: none;
+ background: #CCC;
+ }
+
+ &:focus {
+ background: #CCC;
+ }
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Site Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#site-navi {
+ clear: both;
+ display: flex;
+ box-sizing: border-box;
+ justify-content: space-between;
+ margin-top: 0.75rem;
+
+ > div {
+ display: flex;
+ align-items: center;
+ border: 0.05rem solid #AAA;
+ background: #EEE;
+
+ > a {
+ display: block;
+ }
+ }
+
+ .disabled {
+ pointer-events: none;
+ color: #AAA;
+ }
+
+ .active a {
+ background: #CCC !important;
+ font-weight: 600;
+ pointer-events: none;
+ }
+
+ ol {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+
+ li {
+ float: left;
+ display: inline-block;
+
+ + li {
+ border-left: 0.05rem solid #AAA;
+ }
+ }
+ }
+
+ a {
+ padding: 0 0.5rem;
+ text-decoration: none;
+ color: inherit;
+ display: inline-block;
+
+ &:hover, &:focus {
+ background: #CCC;
+ }
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Actions
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.actions {
+ margin: 0 0 0.5rem 0;
+ padding: 0;
+ list-style: none;
+ font-size: 0.6rem;
+ float: right;
+ text-align: center;
+
+ .fa {
+ margin-right: 0.1rem;
+ }
+
+ li {
+ display: inline-block;
+ font-weight: bold;
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ }
+
+ a {
+ color: inherit;
+ display: block;
+ padding: 0 0.25rem;
+ }
+}
+
+.actions-before {
+ float: left;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+pre {
+ margin-bottom: 1rem;
+ overflow: auto;
+ -moz-tab-size: 4;
+ tab-size: 4;
+}
+
+code, pre {
+ font-family: "monospace";
+ color: #B03060;
+}
+
+p {
+ margin-top: 0;
+}
+
+img {
+ border: none;
+ max-width: 100%;
+}
+
+.red {
+ color: #B03060;
+}
+
+.blue {
+ color: #40779A;
+}
+
+.green {
+ color: #008B45;
+}
+
+.right {
+ float: right;
+}
+
+.hidden {
+ display: none;
+}
+
+#database-result {
+ color: inherit;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Tables
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+table {
+ width: 100%;
+ margin-bottom: 1rem;
+}
+
+td {
+ vertical-align: middle;
+}
+
+table, td {
+ padding: 0.5rem;
+ border: 0.05rem solid #AAA;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Brackets
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.brackets {
+ &:after, &:before {
+ color: #222;
+ }
+
+ &:before {
+ content: "[";
+ }
+
+ &:after {
+ content: "]";
+ }
+}
+
+.brackets a, a.brackets {
+ text-decoration: none;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Item Element
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.item {
+ display: flex;
+ flex-direction: column;
+ border: 0.05rem solid #AAA;
+ clear: both;
+
+ header {
+ padding: 0.5rem 0.75rem;
+ border-bottom: 0.05rem solid #AAA;
+ position: sticky;
+ top: 0;
+
+ h2 {
+ margin-top: 0;
+ }
+ }
+
+ footer {
+ border-top: 0.05rem solid #AAA;
+
+ ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+
+ li {
+ display: inline-block;
+ float: left;
+
+ &:last-child {
+ float: right;
+ }
+ }
+ }
+
+ a {
+ color: inherit;
+ display: inline-block;
+ padding: 0.25rem 2rem;
+
+ &:hover, &:active {
+ background: #DDD;
+ }
+ }
+ }
+
+ header, footer {
+ background: #EEE;
+ overflow: hidden;
+ }
+
+ blockquote {
+ margin: 0;
+ padding: 0.75rem;
+ overflow: hidden;
+ font-family: inherit;
+ flex-grow: 1;
+
+ p {
+ margin-bottom: 0;
+ }
+ }
+
+ &-id {
+ float: right;
+ color: #666;
+ }
+
+ &-image {
+ float: left;
+ display: block;
+ margin-right: 0.75rem;
+ width: 10rem;
+ height: 7rem;
+ object-fit: cover;
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ }
+
+ &-container.grid {
+ width: 100%;
+ display: grid;
+ grid-template-columns: auto auto auto;
+ grid-column-gap: 1rem;
+ grid-row-gap: 1rem;
+ column-gap: 1rem;
+ row-gap: 1rem;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Argument list
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.arguments {
+ list-style: none;
+ margin: 0;
+ padding: 0.25rem 0.75rem;
+ background: #EEE;
+ font-size: 0.6rem;
+ text-align: center;
+ border-top: 0.05rem solid #AAA;
+
+ li {
+ display: inline;
+
+ > span {
+ color: #40779A;
+ }
+
+ &:after {
+ content: " · ";
+ font-weight: bold;
+ }
+
+ &:last-child:after {
+ content: none;
+ }
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Grids
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.form-grid {
+ display: grid;
+ grid-template-columns: 8rem auto 8rem auto;
+
+ border-left: 0.05rem solid #AAA;
+ border-bottom: 0.05rem solid #AAA;
+
+ &.two-columns {
+ grid-template-columns: auto auto;
+ }
+
+ > label {
+ display: flex;
+ align-items: center;
+ background: #DDD;
+
+ .fa {
+ margin-left: 0.5rem;
+ margin-right: 1rem;
+ }
+ }
+
+ &-item,
+ > label {
+ padding: 0.5rem;
+ border-top: 0.05rem solid #AAA;
+ border-right: 0.05rem solid #AAA;
+ }
+}
+
+.form-border-box {
+ border: 0.05rem solid #AAA;
+
+ &.padding {
+ padding: 0.5rem;
+ }
+
+ &.background {
+ background: #DDD;
+ }
+
+ &.nobordertop {
+ border-top: none;
+ }
+
+ +.form-border-box {
+ border-top: none;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form buttons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#emoticon-list-wrapper {
+ display: flex;
+ width: 100%;
+ justify-content: center;
+ box-sizing: border-box;
+}
+
+#button-list-wrapper {
+ border-bottom: 0.05rem solid #AAA;
+ background: #EEE;
+ overflow: hidden;
+}
+
+.button-list {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.button-list.emoticons > li {
+ font-size: 1.25rem;
+ display: inline-block;
+ padding: 0.2rem;
+ border-bottom: 0.2rem solid transparent;
+ border-radius: 0.1rem;
+ cursor: pointer;
+
+ &:hover, &:active {
+ border-bottom: 0.2rem solid #AAA;
+ }
+}
+
+.button-list.markdown > li {
+ float: left;
+ padding: 0.5rem;
+ cursor: pointer;
+ width: 1.75rem;
+ box-sizing: border-box;
+ text-align: center;
+
+ &:hover, &:active {
+ color: #40779A;
+ }
+}
+
+#content-editor {
+ border: none;
+ margin: 0;
+
+ &-wrapper {
+ border-top: none;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+input, select, textarea {
+ width: 100%;
+ background: #EEE;
+ color: #404040;
+ font-family: inherit;
+ font-size: 0.7rem;
+ padding: 0.25rem;
+ border: 0.05rem solid #AAA;
+ box-sizing: border-box;
+
+ &:focus {
+ outline: none;
+ }
+}
+
+textarea {
+ font-family: "Kadwa", "sans-serif";
+ box-sizing: border-box;
+ display: block;
+ resize: vertical;
+ min-height: 15rem;
+ line-height: 1.2rem;
+ padding: 0.5rem;
+ -webkit-hyphens: none;
+ hyphens: none;
+}
+
+input {
+ &[type="submit"] {
+ text-transform: uppercase;
+ border-radius: 0.1rem;
+ }
+
+ &:disabled {
+ background: #DDD;
+ color: #888;
+
+ &:hover {
+ cursor: not-allowed;
+ }
+ }
+}
+
+label {
+ text-transform: uppercase;
+ font-weight: normal;
+
+ &:after {
+ content: ":";
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form buttons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#insert-button, #update-button, #delete-button {
+ color: #EEE;
+ border: 0.05rem solid #404040;
+}
+
+#insert-button {
+ background: #4D8D5D;
+
+ &:active, &:focus {
+ background: darken(#4D8D5D, 10%)
+ }
+}
+
+#update-button {
+ background: #6A8AA5;
+
+ &:active, &:focus {
+ background: darken(#6A8AA5, 10%)
+ }
+}
+
+#delete-button {
+ background: #C45C66;
+
+ &:active, &:focus {
+ background: darken(#C45C66, 10%)
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form message list
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#message-list {
+ margin: 0;
+ padding: 0.5rem;
+ list-style: none;
+ background: #C45C66;
+ color: #EEE;
+ font-size: 0.6rem;
+
+ &-wrapper {
+ margin-bottom: 0.5rem;
+ border: 0.1rem solid darken(#C45C66, 10%);
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Search form
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#search-form {
+ margin-bottom: 1rem;
+}
+
+@import "import/responsive";
+@import "import/font-awesome";
+@import "import/fonts";
diff --git a/template/admin/rsrc/font/font-awesome-fontello.json b/theme/admin/rsrc/font/font-awesome-fontello.json
index 515e8a7..599f149 100644
--- a/template/admin/rsrc/font/font-awesome-fontello.json
+++ b/theme/admin/rsrc/font/font-awesome-fontello.json
@@ -193,4 +193,4 @@
"src": "fontawesome"
}
]
-} \ No newline at end of file
+}
diff --git a/template/admin/rsrc/font/font-awesome-fontello.woff2 b/theme/admin/rsrc/font/font-awesome-fontello.woff2
index 5b5c567..5b5c567 100644
--- a/template/admin/rsrc/font/font-awesome-fontello.woff2
+++ b/theme/admin/rsrc/font/font-awesome-fontello.woff2
Binary files differ
diff --git a/template/admin/rsrc/font/kadwa-n-400.woff2 b/theme/admin/rsrc/font/kadwa-n-400.woff2
index 1566426..1566426 100644
--- a/template/admin/rsrc/font/kadwa-n-400.woff2
+++ b/theme/admin/rsrc/font/kadwa-n-400.woff2
Binary files differ
diff --git a/template/admin/rsrc/font/ruda-n-400.woff2 b/theme/admin/rsrc/font/ruda-n-400.woff2
index 6435a0d..6435a0d 100644
--- a/template/admin/rsrc/font/ruda-n-400.woff2
+++ b/theme/admin/rsrc/font/ruda-n-400.woff2
Binary files differ
diff --git a/template/admin/rsrc/font/ruda-n-700.woff2 b/theme/admin/rsrc/font/ruda-n-700.woff2
index 0066431..0066431 100644
--- a/template/admin/rsrc/font/ruda-n-700.woff2
+++ b/theme/admin/rsrc/font/ruda-n-700.woff2
Binary files differ
diff --git a/template/admin/rsrc/icon-public-domain.svg b/theme/admin/rsrc/icon-public-domain.svg
index e0f0b0f..88f7227 100644
--- a/template/admin/rsrc/icon-public-domain.svg
+++ b/theme/admin/rsrc/icon-public-domain.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 53.869999 53.509998" version="1" width="53.87" height="53.51"><rect rx="2" width="50.745" y="1.563" x="1.563" height="50.385" fill="#b3b3b3" fill-rule="evenodd" stroke="#333" stroke-width="3.125" stroke-linejoin="round"/><g transform="translate(-3.116 -3.554)" fill-rule="evenodd" stroke="#333" stroke-linecap="round" stroke-linejoin="round"><path d="M25.96 22.992c-2.403 1.28-3.964 3.706-4.993 6.316h18.198c-.944-2.547-2.39-4.947-4.593-6.316-2.478-.108-5.595 0-8.612 0z" fill="#7f7f7f" stroke-width="1.87471319"/><circle transform="matrix(.6206 0 0 .6206 17.702 3.554)" cx="19.524" cy="22.301" r="12.326" fill="#bfbfbf" stroke-width="3.021"/></g><path d="M12.76 27.584c-.84 0-1.513.674-1.513 1.512v18.116h31.72V29.096c0-.838-.674-1.512-1.51-1.512H12.758z" fill="#999" fill-rule="evenodd" stroke="#333" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M18.55 29.705l-9.617-13.27 5.385-2.694" fill="none" stroke="#333" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><circle cx="13.934" cy="13.741" r="2.308" fill="#7f7f7f" fill-rule="evenodd" stroke="#333" stroke-width="1.25"/><rect rx="2.267" height="4.616" width="36.929" y="24.705" x="8.548" fill="#4c4c4c" fill-rule="evenodd" stroke="#333" stroke-width="2.5" stroke-linejoin="round"/><path d="M18.29 45.03c2.917-1.836 6.143-2.33 7.4-2.043.14-1.242 2.07-3.303 5.54-5.486-4.107 1.048-4.96 1.32-6.74 3.745-3.04.3-3.913 1.192-6.2 3.785zM25.543 36.904c2.02-1.27 4.253-1.612 5.122-1.415.098-.86 1.434-2.287 3.835-3.797-2.842.724-3.433.912-4.664 2.59-2.105.208-2.71.826-4.293 2.62z" fill="#4c4c4c" fill-rule="evenodd" stroke="#333" stroke-width=".625" stroke-linecap="round" stroke-linejoin="round"/></svg> \ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 53.869999 53.509998" version="1" width="53.87" height="53.51"><rect rx="2" width="50.745" y="1.563" x="1.563" height="50.385" fill="#b3b3b3" fill-rule="evenodd" stroke="#333" stroke-width="3.125" stroke-linejoin="round"/><g transform="translate(-3.116 -3.554)" fill-rule="evenodd" stroke="#333" stroke-linecap="round" stroke-linejoin="round"><path d="M25.96 22.992c-2.403 1.28-3.964 3.706-4.993 6.316h18.198c-.944-2.547-2.39-4.947-4.593-6.316-2.478-.108-5.595 0-8.612 0z" fill="#7f7f7f" stroke-width="1.87471319"/><circle transform="matrix(.6206 0 0 .6206 17.702 3.554)" cx="19.524" cy="22.301" r="12.326" fill="#bfbfbf" stroke-width="3.021"/></g><path d="M12.76 27.584c-.84 0-1.513.674-1.513 1.512v18.116h31.72V29.096c0-.838-.674-1.512-1.51-1.512H12.758z" fill="#999" fill-rule="evenodd" stroke="#333" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M18.55 29.705l-9.617-13.27 5.385-2.694" fill="none" stroke="#333" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><circle cx="13.934" cy="13.741" r="2.308" fill="#7f7f7f" fill-rule="evenodd" stroke="#333" stroke-width="1.25"/><rect rx="2.267" height="4.616" width="36.929" y="24.705" x="8.548" fill="#4c4c4c" fill-rule="evenodd" stroke="#333" stroke-width="2.5" stroke-linejoin="round"/><path d="M18.29 45.03c2.917-1.836 6.143-2.33 7.4-2.043.14-1.242 2.07-3.303 5.54-5.486-4.107 1.048-4.96 1.32-6.74 3.745-3.04.3-3.913 1.192-6.2 3.785zM25.543 36.904c2.02-1.27 4.253-1.612 5.122-1.415.098-.86 1.434-2.287 3.835-3.797-2.842.724-3.433.912-4.664 2.59-2.105.208-2.71.826-4.293 2.62z" fill="#4c4c4c" fill-rule="evenodd" stroke="#333" stroke-width=".625" stroke-linecap="round" stroke-linejoin="round"/></svg>
diff --git a/template/admin/rsrc/main.js b/theme/admin/rsrc/main.js
index 1870ced..842ef47 100644
--- a/template/admin/rsrc/main.js
+++ b/theme/admin/rsrc/main.js
@@ -8,7 +8,7 @@ const next = document.getElementById("next-site");
// Handle arrow keys and change the location to the desired direction
//==============================================================================
document.addEventListener("keyup", function(e) {
- if(!e.ctrlKey && !e.shiftKey) {
+ if(!e.ctrlKey && !e.shiftKey && !e.altKey) {
(e.keyCode === 37 && prev) && (window.location.href = prev.getAttribute("href"));
(e.keyCode === 39 && next) && (window.location.href = next.getAttribute("href"));
}
@@ -157,4 +157,4 @@ if(document.getElementById("delete-button")) {
};
}
}
-})(); \ No newline at end of file
+})();
diff --git a/template/standard/html/403.php b/theme/default/html/403.php
index 092988e..1e78316 100644
--- a/template/standard/html/403.php
+++ b/theme/default/html/403.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: 403 Template [Thomas Lange <code@nerdmind.de>] #
+# 403 Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -8,4 +8,4 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->text('403_heading_text')?></h1>
-<p><?=$Language->text('403_heading_desc')?></p> \ No newline at end of file
+<p><?=$Language->text('403_heading_desc')?></p>
diff --git a/template/standard/html/404.php b/theme/default/html/404.php
index a45eecc..9495944 100644
--- a/template/standard/html/404.php
+++ b/theme/default/html/404.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: 404 Template [Thomas Lange <code@nerdmind.de>] #
+# 404 Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -8,4 +8,4 @@
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
?>
<h1><i class="fa fa-exclamation-triangle"></i><?=$Language->text('404_heading_text')?></h1>
-<p><?=$Language->text('404_heading_desc')?></p> \ No newline at end of file
+<p><?=$Language->text('404_heading_desc')?></p>
diff --git a/template/standard/html/feed/item_page.php b/theme/default/html/feed/item_page.php
index 4935282..82568a1 100644
--- a/template/standard/html/feed/item_page.php
+++ b/theme/default/html/feed/item_page.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Feed Item Template [page] [Thomas Lange <code@nerdmind.de>] #
+# Feed Item Template [page] [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -24,4 +24,4 @@ $HTML = $PAGE['BODY']['HTML']();
<?php foreach($PAGE['FILE']['LIST'] as $fileURL): ?>
<media:content url="<?=$fileURL?>" medium="image"></media:content>
<?php endforeach; ?>
-</item> \ No newline at end of file
+</item>
diff --git a/template/standard/html/feed/item_post.php b/theme/default/html/feed/item_post.php
index 30e97ab..0bf23fc 100644
--- a/template/standard/html/feed/item_post.php
+++ b/theme/default/html/feed/item_post.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Feed Item Template [post] [Thomas Lange <code@nerdmind.de>] #
+# Feed Item Template [post] [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -24,4 +24,4 @@ $HTML = $POST['BODY']['HTML']();
<?php foreach($POST['FILE']['LIST'] as $fileURL): ?>
<media:content url="<?=$fileURL?>" medium="image"></media:content>
<?php endforeach; ?>
-</item> \ No newline at end of file
+</item>
diff --git a/template/standard/html/feed/main.php b/theme/default/html/feed/main.php
index 84e7888..317bd31 100644
--- a/template/standard/html/feed/main.php
+++ b/theme/default/html/feed/main.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Feed Template [Thomas Lange <code@nerdmind.de>] #
+# Feed Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -49,4 +49,4 @@ switch($FEED['TYPE']) {
<?php echo $item ?>
<?php endforeach; ?>
</channel>
-</rss> \ No newline at end of file
+</rss>
diff --git a/template/standard/html/home.php b/theme/default/html/home.php
index d49c71b..b412f22 100644
--- a/template/standard/html/home.php
+++ b/theme/default/html/home.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Home Template [Thomas Lange <code@nerdmind.de>] #
+# Home Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -16,4 +16,5 @@
<?php endforeach; ?>
</div>
-<?=$PAGINATION['HTML']?> \ No newline at end of file
+<?=$PAGINATION['HTML']?>
+
diff --git a/template/standard/html/main.php b/theme/default/html/main.php
index 19eceec..e84618b 100644
--- a/template/standard/html/main.php
+++ b/theme/default/html/main.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Main Template [Thomas Lange <code@nerdmind.de>] #
+# Main Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -41,7 +41,7 @@ $BLOGMETA_DESC = escapeHTML($BLOGMETA['DESC']);
<?php endif; ?>
<link rel="icon" href="<?=Application::getTemplateURL('rsrc/favicon.ico')?>" />
- <link rel="stylesheet" href="<?=Application::getTemplateURL('rsrc/main.css')?>" title="<?=$BLOGMETA_NAME?>" />
+ <link rel="stylesheet" href="<?=Application::getTemplateURL('rsrc/css/main.css')?>" title="<?=$BLOGMETA_NAME?>" />
<link rel="alternate" type="application/rss+xml" title="<?=$Language->text('feed_name_items', $BLOGMETA_NAME)?>" href="<?=Application::getURL('feed/')?>" />
<link rel="alternate" type="application/rss+xml" title="<?=$Language->text('feed_name_posts', $BLOGMETA_NAME)?>" href="<?=Application::getURL('feed/post/')?>" />
@@ -99,4 +99,4 @@ $BLOGMETA_DESC = escapeHTML($BLOGMETA['DESC']);
</footer>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/template/standard/html/page/item.php b/theme/default/html/page/item.php
index f2803fa..20937b9 100644
--- a/template/standard/html/page/item.php
+++ b/theme/default/html/page/item.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Page Item Template [Thomas Lange <code@nerdmind.de>] #
+# Page Item Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -17,4 +17,4 @@
<blockquote cite="<?=$PAGE['URL']?>">
<p><?=excerpt($PAGE['BODY']['HTML'](), 600)?></p>
</blockquote>
-</article> \ No newline at end of file
+</article>
diff --git a/template/standard/html/page/list.php b/theme/default/html/page/list.php
index b2361bf..665301e 100644
--- a/template/standard/html/page/list.php
+++ b/theme/default/html/page/list.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Page List Template [Thomas Lange <code@nerdmind.de>] #
+# Page List Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -16,4 +16,4 @@
<?php endforeach; ?>
</div>
-<?=$PAGINATION['HTML']?> \ No newline at end of file
+<?=$PAGINATION['HTML']?>
diff --git a/template/standard/html/page/main.php b/theme/default/html/page/main.php
index aa2a5a0..7e37805 100644
--- a/template/standard/html/page/main.php
+++ b/theme/default/html/page/main.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Page Main Template [Thomas Lange <code@nerdmind.de>] #
+# Page Main Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -31,4 +31,4 @@ $time = "<time datetime=\"{$PAGE['ATTR']['TIME_INSERT']}\" title=\"".parseDateti
<div><a class="disabled"><i class="fa fa-arrow-right"></i></a></div>
<?php endif; ?>
-</section> \ No newline at end of file
+</section>
diff --git a/template/standard/html/pagination.php b/theme/default/html/pagination.php
index df5293e..012c891 100644
--- a/template/standard/html/pagination.php
+++ b/theme/default/html/pagination.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Pagination Template [Thomas Lange <code@nerdmind.de>] #
+# Pagination Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -36,4 +36,4 @@
<?php else: ?>
<div><a class="disabled"><i class="fa fa-arrow-right"></i></a></div>
<?php endif; ?>
-</div> \ No newline at end of file
+</div>
diff --git a/template/standard/html/post/item.php b/theme/default/html/post/item.php
index c4035cb..6f68d79 100644
--- a/template/standard/html/post/item.php
+++ b/theme/default/html/post/item.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Post Item Template [Thomas Lange <code@nerdmind.de>] #
+# Post Item Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -17,4 +17,4 @@
<blockquote cite="<?=$POST['URL']?>">
<?=$POST['BODY']['HTML']()?>
</blockquote>
-</article> \ No newline at end of file
+</article>
diff --git a/template/standard/html/post/list.php b/theme/default/html/post/list.php
index 7622170..37fca86 100644
--- a/template/standard/html/post/list.php
+++ b/theme/default/html/post/list.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Post List Template [Thomas Lange <code@nerdmind.de>] #
+# Post List Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -16,4 +16,4 @@
<?php endforeach; ?>
</div>
-<?=$PAGINATION['HTML']?> \ No newline at end of file
+<?=$PAGINATION['HTML']?>
diff --git a/template/standard/html/post/main.php b/theme/default/html/post/main.php
index e91fa4e..4b84ed9 100644
--- a/template/standard/html/post/main.php
+++ b/theme/default/html/post/main.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Post Main Template [Thomas Lange <code@nerdmind.de>] #
+# Post Main Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -31,4 +31,4 @@ $time = "<time datetime=\"{$POST['ATTR']['TIME_INSERT']}\" title=\"".parseDateti
<div><a class="disabled"><i class="fa fa-arrow-right"></i></a></div>
<?php endif; ?>
-</section> \ No newline at end of file
+</section>
diff --git a/template/standard/html/search/main.php b/theme/default/html/search/main.php
index 61bd6a5..e7522ff 100644
--- a/template/standard/html/search/main.php
+++ b/theme/default/html/search/main.php
@@ -31,4 +31,4 @@
</select>
<input type="submit" value="<?=$Language->text('search')?>" />
-</form> \ No newline at end of file
+</form>
diff --git a/template/standard/html/search/result.php b/theme/default/html/search/result.php
index 044afe1..2dac0ec 100644
--- a/template/standard/html/search/result.php
+++ b/theme/default/html/search/result.php
@@ -33,4 +33,4 @@
<?php foreach($RESULT['LIST'] as $post): ?>
<?php echo $post; ?>
<?php endforeach; ?>
-</div> \ No newline at end of file
+</div>
diff --git a/template/standard/html/user/item.php b/theme/default/html/user/item.php
index 45106af..7d2c36b 100644
--- a/template/standard/html/user/item.php
+++ b/theme/default/html/user/item.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: User Item Template [Thomas Lange <code@nerdmind.de>] #
+# User Item Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -17,4 +17,4 @@
<blockquote cite="<?=$USER['URL']?>">
<?=$USER['BODY']['HTML']()?>
</blockquote>
-</article> \ No newline at end of file
+</article>
diff --git a/template/standard/html/user/list.php b/theme/default/html/user/list.php
index ebc231d..59bc5ee 100644
--- a/template/standard/html/user/list.php
+++ b/theme/default/html/user/list.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: User List Template [Thomas Lange <code@nerdmind.de>] #
+# User List Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -16,4 +16,4 @@
<?php endforeach; ?>
</div>
-<?=$PAGINATION['HTML']?> \ No newline at end of file
+<?=$PAGINATION['HTML']?>
diff --git a/template/standard/html/user/main.php b/theme/default/html/user/main.php
index a72b3d3..5b4e2d7 100644
--- a/template/standard/html/user/main.php
+++ b/theme/default/html/user/main.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: User Main Template [Thomas Lange <code@nerdmind.de>] #
+# User Main Template [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# [see documentation] #
@@ -28,4 +28,4 @@
<div><a class="disabled"><i class="fa fa-arrow-right"></i></a></div>
<?php endif; ?>
-</section> \ No newline at end of file
+</section>
diff --git a/template/standard/lang/de.php b/theme/default/lang/de.php
index 6a18831..221322c 100644
--- a/template/standard/lang/de.php
+++ b/theme/default/lang/de.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Internationalization [DE] Thomas Lange <code@nerdmind.de>] #
+# Internationalization [DE] [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# This file contains template internationalization strings for the DE language #
@@ -69,4 +69,3 @@ $LANGUAGE['403_heading_desc'] = 'Der Zugriff auf diese Ressource wurde dir verwe
#===============================================================================
$LANGUAGE['404_heading_text'] = 'Nicht gefunden';
$LANGUAGE['404_heading_desc'] = 'Die angeforderte Ressource konnte nicht gefunden werden.';
-?> \ No newline at end of file
diff --git a/template/standard/lang/en.php b/theme/default/lang/en.php
index 17d638f..644d364 100644
--- a/template/standard/lang/en.php
+++ b/theme/default/lang/en.php
@@ -1,6 +1,6 @@
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
-# Standard: Internationalization [EN] Thomas Lange <code@nerdmind.de>] #
+# Internationalization [EN] [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# This file contains template internationalization strings for the EN language #
@@ -69,4 +69,3 @@ $LANGUAGE['403_heading_desc'] = 'You are denied to access this resource because
#===============================================================================
$LANGUAGE['404_heading_text'] = 'Not found';
$LANGUAGE['404_heading_desc'] = 'The requested resource could not be found.';
-?> \ No newline at end of file
diff --git a/theme/default/rsrc/css/import/_font-awesome.scss b/theme/default/rsrc/css/import/_font-awesome.scss
new file mode 100644
index 0000000..733022c
--- /dev/null
+++ b/theme/default/rsrc/css/import/_font-awesome.scss
@@ -0,0 +1,65 @@
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Main
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa {
+ display: inline-block;
+ font: normal normal normal 14px/1 "FontAwesome";
+ font-size: inherit;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Icons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa-rss:before {
+ content: "\f09e";
+}
+
+.fa-key:before {
+ content: "\f084";
+}
+
+.fa-bars:before {
+ content: "\f0c9";
+}
+
+.fa-user:before {
+ content: "\f007";
+}
+
+.fa-home:before {
+ content: "\f015";
+}
+
+.fa-search:before {
+ content: "\f002";
+}
+
+.fa-rss-square:before {
+ content: "\f143";
+}
+
+.fa-arrow-left:before {
+ content: "\f060";
+}
+
+.fa-user-secret:before {
+ content: "\f21b";
+}
+
+.fa-file-text-o:before {
+ content: "\f0f6";
+}
+
+.fa-newspaper-o:before {
+ content: "\f1ea";
+}
+
+.fa-arrow-right:before {
+ content: "\f061";
+}
+
+.fa-exclamation-triangle:before {
+ content: "\f071";
+}
diff --git a/theme/default/rsrc/css/import/_fonts.scss b/theme/default/rsrc/css/import/_fonts.scss
new file mode 100644
index 0000000..2477120
--- /dev/null
+++ b/theme/default/rsrc/css/import/_fonts.scss
@@ -0,0 +1,23 @@
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Font Awesome" [4.7.0]: SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "FontAwesome";
+ font-weight: 400;
+ src: url("../font/font-awesome.woff2") format("woff2");
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Ruda": SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "Ruda";
+ font-weight: 400;
+ src: url("../font/ruda-n-400.woff2") format("woff2");
+}
+
+@font-face {
+ font-family: "Ruda";
+ font-weight: 700;
+ src: url("../font/ruda-n-700.woff2") format("woff2");
+}
diff --git a/theme/default/rsrc/css/import/_responsive.scss b/theme/default/rsrc/css/import/_responsive.scss
new file mode 100644
index 0000000..d248bf4
--- /dev/null
+++ b/theme/default/rsrc/css/import/_responsive.scss
@@ -0,0 +1,77 @@
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Responsive Level #1
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@media only screen and (max-width: 50em) {
+ html {
+ font-size: 1.125rem; /*18px*/
+ background-image: none !important;
+ }
+
+ body {
+ line-height: 1.2rem;
+ }
+
+ #container {
+ margin: 0;
+ border-right: none;
+ border-left: none;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Responsive Level #2
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@media only screen and (max-width: 37.5em) {
+ main, #main-header > div {
+ padding: 1rem;
+ }
+
+ #main-navi {
+ padding: 0.25rem 1rem;
+ }
+
+ #main-navi a {
+ border: 0.05rem solid transparent;
+ }
+
+ #main-navi a:hover, #main-navi a:focus {
+ border: 0.05rem solid #BBB;
+ }
+
+ #main-navi > ul {
+ display: none;
+ float: none;
+ }
+
+ #main-navi > ul > li a {
+ display: block;
+ text-align: left;
+ padding: 0 0.25rem;
+ }
+
+ #main-navi {
+ overflow: hidden;
+ }
+
+ #toogle-nav-label {
+ display: block;
+ }
+
+ #toogle-nav:checked + ul {
+ display: block;
+ }
+
+ #main-navi li:last-child {
+ float: none;
+ }
+
+ .item > header {
+ text-align: center;
+ }
+
+ .item > header > h2,
+ .item > header > .info {
+ float: none;
+ display: block;
+ }
+}
diff --git a/theme/default/rsrc/css/main.css b/theme/default/rsrc/css/main.css
new file mode 100644
index 0000000..5797447
--- /dev/null
+++ b/theme/default/rsrc/css/main.css
@@ -0,0 +1,546 @@
+@charset "UTF-8";
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Hyperlinks
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+a {
+ color: #0060A0;
+ text-decoration: none;
+}
+a:focus {
+ background: #CCC;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Headings
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+h1, h2, h3, h4, h5, h6 {
+ margin: 0;
+ font-weight: 600;
+}
+h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p {
+ margin-top: 0;
+}
+
+h1 {
+ font-size: 0.8rem;
+}
+
+h2 {
+ font-size: 0.7rem;
+}
+
+h3 {
+ font-size: 0.65rem;
+}
+
+h4 {
+ font-size: 0.6rem;
+}
+
+h5 {
+ font-size: 0.55rem;
+}
+
+h6 {
+ font-size: 0.5rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Document
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+html, body {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-size: 1.25rem;
+ color: #333;
+ background: #CCC;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+}
+
+body {
+ font-family: "Ruda", "sans-serif";
+ font-size: 0.7rem;
+ line-height: 1.2rem;
+}
+
+#container {
+ max-width: 45rem;
+ margin: 1rem auto;
+ border: 0.05rem solid #AAA;
+ background: #FFF;
+}
+
+main, #main-header > div {
+ padding: 1rem;
+ box-sizing: border-box;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Header
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-header > div {
+ overflow: hidden;
+}
+
+#main-logo {
+ height: 1.75rem;
+ display: block;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Footer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-footer {
+ background: #EEE;
+ border-top: 0.05rem solid #AAA;
+ padding: 0.25rem 1rem;
+ text-align: center;
+ font-size: 0.6rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Main Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-navi {
+ font-size: 0.6rem;
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ border-left: none;
+ border-right: none;
+ padding: 0 1rem;
+}
+#main-navi ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+#main-navi ul li {
+ display: inline;
+}
+#main-navi ul li:last-child {
+ float: right;
+}
+#main-navi a {
+ padding: 0.25rem 0.3rem;
+ color: inherit;
+ text-decoration: none;
+ text-align: center;
+ display: inline-block;
+ border: 0.05rem solid transparent;
+ border-top: none;
+ border-bottom: none;
+}
+#main-navi a:hover, #main-navi a:focus {
+ text-decoration: none;
+ background: #DDD;
+ border: 0.05rem solid #AAA;
+ border-top: none;
+ border-bottom: none;
+}
+
+#main-navi li .fa, h1 > .fa, h2 > .fa {
+ margin-right: 0.25rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Site Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#site-navi {
+ clear: both;
+ display: flex;
+ box-sizing: border-box;
+ justify-content: space-between;
+}
+#site-navi > div {
+ display: flex;
+ align-items: center;
+ border: 0.05rem solid #AAA;
+ background: #EEE;
+}
+#site-navi > div > a {
+ display: block;
+}
+#site-navi > section {
+ display: flex;
+ overflow: hidden;
+ align-items: center;
+}
+#site-navi > section > div {
+ border: 0.05rem solid #AAA;
+ background: #EEE;
+}
+#site-navi .disabled {
+ pointer-events: none;
+ color: #AAA;
+}
+#site-navi .active a {
+ background: #CCC !important;
+ font-weight: 600;
+ pointer-events: none;
+}
+#site-navi ol {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+#site-navi ol li {
+ float: left;
+ display: inline-block;
+}
+#site-navi ol li + li {
+ border-left: 0.05rem solid #AAA;
+}
+#site-navi a {
+ padding: 0 0.5rem;
+ text-decoration: none;
+ color: inherit;
+ display: inline-block;
+}
+#site-navi a:hover, #site-navi a:focus {
+ background: #CCC;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+pre {
+ font-family: "monospace";
+ margin-bottom: 1rem;
+ overflow: auto;
+ -moz-tab-size: 4;
+ tab-size: 4;
+}
+
+code, pre {
+ font-family: "monospace";
+ color: #008B45;
+}
+
+strong, label {
+ font-weight: 600;
+}
+
+img {
+ border: none;
+ max-width: 100%;
+}
+
+main img {
+ border: 0.05rem solid #000;
+ border-radius: 0.15rem;
+}
+
+table img {
+ border: none;
+ border-radius: 0;
+}
+
+.red {
+ color: #B03060;
+}
+
+.head-link {
+ font-size: 0.6rem;
+ float: right;
+}
+.head-link .fa {
+ margin-right: 0.125rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Brackets
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.brackets:before {
+ content: "[";
+}
+.brackets:after {
+ content: "]";
+}
+.brackets:before, .brackets:after {
+ color: #222;
+}
+
+.brackets a, a.brackets {
+ text-decoration: none;
+}
+
+a.brackets:before, a.brackets:after {
+ color: #222;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Item Element
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.item {
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ overflow: hidden;
+ margin: 0.5rem 0;
+}
+.item header {
+ padding: 0.25rem 1rem;
+ border-bottom: 0.05rem solid #AAA;
+ overflow: hidden;
+ text-transform: uppercase;
+}
+.item header h2 {
+ font-size: 0.65rem;
+ float: left;
+}
+.item header .info {
+ float: right;
+ font-size: 0.6rem;
+ font-weight: 400;
+}
+.item header a {
+ color: inherit;
+}
+.item blockquote {
+ margin: 0;
+ padding: 0 1rem;
+ font-family: inherit;
+}
+.item blockquote img {
+ display: block;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Item content on main sites
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#content {
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ margin: 0.5rem 0;
+ padding: 0 1rem;
+}
+#content img {
+ display: block;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Responsive
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#toogle-nav {
+ display: none;
+ clear: both;
+}
+
+#toogle-nav-label {
+ display: none;
+ cursor: pointer;
+ font-size: 1.25rem;
+ text-align: center;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+input, select {
+ background: #EEE;
+ color: inherit;
+ padding: 0.2rem;
+ border: 0.1rem solid #AAA;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Table elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+table {
+ width: 100%;
+ margin: 0 0 1rem;
+}
+
+td {
+ vertical-align: middle;
+}
+
+table, td {
+ border-spacing: 0;
+ border-collapse: collapse;
+ padding: 0.5rem;
+ border: 0.05rem solid #000;
+}
+
+thead, tr:nth-child(even) {
+ background: #EEE;
+}
+
+thead > tr, th {
+ font-weight: 600;
+ font-style: italic;
+}
+
+thead > tr > td, th > td {
+ text-align: center;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Responsive Level #1
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@media only screen and (max-width: 50em) {
+ html {
+ font-size: 1.125rem;
+ /*18px*/
+ background-image: none !important;
+ }
+
+ body {
+ line-height: 1.2rem;
+ }
+
+ #container {
+ margin: 0;
+ border-right: none;
+ border-left: none;
+ }
+}
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Responsive Level #2
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@media only screen and (max-width: 37.5em) {
+ main, #main-header > div {
+ padding: 1rem;
+ }
+
+ #main-navi {
+ padding: 0.25rem 1rem;
+ }
+
+ #main-navi a {
+ border: 0.05rem solid transparent;
+ }
+
+ #main-navi a:hover, #main-navi a:focus {
+ border: 0.05rem solid #BBB;
+ }
+
+ #main-navi > ul {
+ display: none;
+ float: none;
+ }
+
+ #main-navi > ul > li a {
+ display: block;
+ text-align: left;
+ padding: 0 0.25rem;
+ }
+
+ #main-navi {
+ overflow: hidden;
+ }
+
+ #toogle-nav-label {
+ display: block;
+ }
+
+ #toogle-nav:checked + ul {
+ display: block;
+ }
+
+ #main-navi li:last-child {
+ float: none;
+ }
+
+ .item > header {
+ text-align: center;
+ }
+
+ .item > header > h2,
+.item > header > .info {
+ float: none;
+ display: block;
+ }
+}
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Main
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa {
+ display: inline-block;
+ font: normal normal normal 14px/1 "FontAwesome";
+ font-size: inherit;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# FontAwesome Icons
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.fa-rss:before {
+ content: "";
+}
+
+.fa-key:before {
+ content: "";
+}
+
+.fa-bars:before {
+ content: "";
+}
+
+.fa-user:before {
+ content: "";
+}
+
+.fa-home:before {
+ content: "";
+}
+
+.fa-search:before {
+ content: "";
+}
+
+.fa-rss-square:before {
+ content: "";
+}
+
+.fa-arrow-left:before {
+ content: "";
+}
+
+.fa-user-secret:before {
+ content: "";
+}
+
+.fa-file-text-o:before {
+ content: "";
+}
+
+.fa-newspaper-o:before {
+ content: "";
+}
+
+.fa-arrow-right:before {
+ content: "";
+}
+
+.fa-exclamation-triangle:before {
+ content: "";
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Font Awesome" [4.7.0]: SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "FontAwesome";
+ font-weight: 400;
+ src: url("../font/font-awesome.woff2") format("woff2");
+}
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Font "Ruda": SIL Open Font License (OFL)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+@font-face {
+ font-family: "Ruda";
+ font-weight: 400;
+ src: url("../font/ruda-n-400.woff2") format("woff2");
+}
+@font-face {
+ font-family: "Ruda";
+ font-weight: 700;
+ src: url("../font/ruda-n-700.woff2") format("woff2");
+}
+
+/*# sourceMappingURL=main.css.map */
diff --git a/theme/default/rsrc/css/main.scss b/theme/default/rsrc/css/main.scss
new file mode 100644
index 0000000..8215934
--- /dev/null
+++ b/theme/default/rsrc/css/main.scss
@@ -0,0 +1,412 @@
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Hyperlinks
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+a {
+ color: #0060A0;
+ text-decoration: none;
+
+ &:focus {
+ background: #CCC;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Headings
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+h1, h2, h3, h4, h5, h6 {
+ margin: 0;
+ font-weight: 600;
+
+ + p {
+ margin-top: 0;
+ }
+}
+
+h1 {
+ font-size: 0.80rem;
+}
+
+h2 {
+ font-size: 0.70rem;
+}
+
+h3 {
+ font-size: 0.65rem;
+}
+
+h4 {
+ font-size: 0.60rem;
+}
+
+h5 {
+ font-size: 0.55rem;
+}
+
+h6 {
+ font-size: 0.50rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Document
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+html, body {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-size: 1.25rem;
+ color: #333;
+ background: #CCC;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+}
+
+body {
+ font-family: "Ruda", "sans-serif";
+ font-size: 0.7rem;
+ line-height: 1.2rem;
+}
+
+#container {
+ max-width: 45rem;
+ margin: 1rem auto;
+ border: 0.05rem solid #AAA;
+ background: #FFF;
+}
+
+main, #main-header > div {
+ padding: 1rem;
+ box-sizing: border-box;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Header
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-header > div {
+ overflow: hidden;
+}
+
+#main-logo {
+ height: 1.75rem;
+ display: block;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Footer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-footer {
+ background: #EEE;
+ border-top: 0.05rem solid #AAA;
+ padding: 0.25rem 1rem;
+ text-align: center;
+ font-size: 0.6rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Main Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#main-navi {
+ font-size: 0.6rem;
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ border-left: none;
+ border-right: none;
+ padding: 0 1rem;
+
+ ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+
+ li {
+ display: inline;
+
+ &:last-child {
+ float: right;
+ }
+ }
+ }
+
+ a {
+ padding: 0.25rem 0.3rem;
+ color: inherit;
+ text-decoration: none;
+ text-align: center;
+ display: inline-block;
+ border: 0.05rem solid transparent;
+ border-top: none;
+ border-bottom: none;
+
+ &:hover, &:focus {
+ text-decoration: none;
+ background: #DDD;
+ border: 0.05rem solid #AAA;
+ border-top: none;
+ border-bottom: none;
+ }
+ }
+}
+
+#main-navi li .fa, h1 > .fa, h2 > .fa {
+ margin-right: 0.25rem;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Site Navigation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#site-navi {
+ clear: both;
+ display: flex;
+ box-sizing: border-box;
+ justify-content: space-between;
+
+ > div {
+ display: flex;
+ align-items: center;
+ border: 0.05rem solid #AAA;
+ background: #EEE;
+
+ > a {
+ display: block;
+ }
+ }
+
+ > section {
+ display: flex;
+ overflow: hidden;
+ align-items: center;
+
+ > div {
+ border: 0.05rem solid #AAA;
+ background: #EEE;
+ }
+ }
+
+ .disabled {
+ pointer-events: none;
+ color: #AAA;
+ }
+
+ .active a {
+ background: #CCC !important;
+ font-weight: 600;
+ pointer-events: none;
+ }
+
+ ol {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+
+ li {
+ float: left;
+ display: inline-block;
+
+ + li {
+ border-left: 0.05rem solid #AAA;
+ }
+ }
+ }
+
+ a {
+ padding: 0 0.5rem;
+ text-decoration: none;
+ color: inherit;
+ display: inline-block;
+
+ &:hover, &:focus {
+ background: #CCC;
+ }
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+pre {
+ font-family: "monospace";
+ margin-bottom: 1rem;
+ overflow: auto;
+ -moz-tab-size: 4;
+ tab-size: 4;
+}
+
+code, pre {
+ font-family: "monospace";
+ color: #008B45;
+}
+
+strong, label {
+ font-weight: 600;
+}
+
+img {
+ border: none;
+ max-width: 100%;
+}
+
+main img {
+ border: 0.05rem solid #000;
+ border-radius: 0.15rem;
+}
+
+table img {
+ border: none;
+ border-radius: 0;
+}
+
+.red {
+ color: #B03060;
+}
+
+.head-link {
+ font-size: 0.6rem;
+ float: right;
+
+ .fa {
+ margin-right: 0.125rem;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Brackets
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.brackets {
+ &:before {
+ content: "[";
+ }
+
+ &:after {
+ content: "]";
+ }
+
+ &:before, &:after {
+ color: #222;
+ }
+}
+
+.brackets a, a.brackets {
+ text-decoration: none;
+}
+
+a.brackets:before, a.brackets:after {
+ color: #222;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Item Element
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+.item {
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ overflow: hidden;
+ margin: 0.5rem 0;
+
+ header {
+ padding: 0.25rem 1rem;
+ border-bottom: 0.05rem solid #AAA;
+ overflow: hidden;
+ text-transform: uppercase;
+
+ h2 {
+ font-size: 0.65rem;
+ float: left;
+ }
+
+ .info {
+ float: right;
+ font-size: 0.6rem;
+ font-weight: 400;
+ }
+
+ a {
+ color: inherit;
+ }
+ }
+
+ blockquote {
+ margin: 0;
+ padding: 0 1rem;
+ font-family: inherit;
+
+ img {
+ display: block;
+ }
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Item content on main sites
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#content {
+ background: #EEE;
+ border: 0.05rem solid #AAA;
+ margin: 0.5rem 0;
+ padding: 0 1rem;
+
+ img {
+ display: block;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Responsive
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#toogle-nav {
+ display: none;
+ clear: both;
+}
+
+#toogle-nav-label {
+ display: none;
+ cursor: pointer;
+ font-size: 1.25rem;
+ text-align: center;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Form elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+input, select {
+ background: #EEE;
+ color: inherit;
+ padding: 0.2rem;
+ border: 0.1rem solid #AAA;
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# Table elements
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+table {
+ width: 100%;
+ margin: 0 0 1rem;
+}
+
+td {
+ vertical-align: middle;
+}
+
+table, td {
+ border-spacing: 0;
+ border-collapse: collapse;
+ padding: 0.5rem;
+ border: 0.05rem solid #000;
+}
+
+thead, tr:nth-child(even) {
+ background: #EEE;
+}
+
+thead > tr, th {
+ font-weight: 600;
+ font-style: italic;
+}
+
+thead > tr > td, th > td {
+ text-align: center;
+}
+
+@import "import/responsive";
+@import "import/font-awesome";
+@import "import/fonts";
diff --git a/template/standard/rsrc/font-awesome.min.css b/theme/default/rsrc/font-awesome.min.css
index 540440c..540440c 100644
--- a/template/standard/rsrc/font-awesome.min.css
+++ b/theme/default/rsrc/font-awesome.min.css
diff --git a/template/standard/rsrc/font/font-awesome.woff2 b/theme/default/rsrc/font/font-awesome.woff2
index 4d13fc6..4d13fc6 100644
--- a/template/standard/rsrc/font/font-awesome.woff2
+++ b/theme/default/rsrc/font/font-awesome.woff2
Binary files differ
diff --git a/template/standard/rsrc/font/ruda-n-400.woff2 b/theme/default/rsrc/font/ruda-n-400.woff2
index 6435a0d..6435a0d 100644
--- a/template/standard/rsrc/font/ruda-n-400.woff2
+++ b/theme/default/rsrc/font/ruda-n-400.woff2
Binary files differ
diff --git a/template/standard/rsrc/font/ruda-n-700.woff2 b/theme/default/rsrc/font/ruda-n-700.woff2
index 0066431..0066431 100644
--- a/template/standard/rsrc/font/ruda-n-700.woff2
+++ b/theme/default/rsrc/font/ruda-n-700.woff2
Binary files differ
diff --git a/template/standard/rsrc/logo.png b/theme/default/rsrc/logo.png
index 7a62549..7a62549 100644
--- a/template/standard/rsrc/logo.png
+++ b/theme/default/rsrc/logo.png
Binary files differ
diff --git a/template/standard/rsrc/main.js b/theme/default/rsrc/main.js
index a7a424c..164c50f 100644
--- a/template/standard/rsrc/main.js
+++ b/theme/default/rsrc/main.js
@@ -7,9 +7,9 @@ const next = document.getElementById("next-site");
//==============================================================================
// Handle arrow keys and change the location to the desired direction
//==============================================================================
-document.addEventListener("keyup", function(event) {
- if(!event.ctrlKey && !event.shiftKey) {
- (event.keyCode === 37 && prev) && (window.location.href = prev.getAttribute("href"));
- (event.keyCode === 39 && next) && (window.location.href = next.getAttribute("href"));
+document.addEventListener("keyup", function(e) {
+ if(!e.ctrlKey && !e.shiftKey && !e.altKey) {
+ (e.keyCode === 37 && prev) && (window.location.href = prev.getAttribute("href"));
+ (e.keyCode === 39 && next) && (window.location.href = next.getAttribute("href"));
}
-}, false); \ No newline at end of file
+}, false);