From 2eb8a4bfac0796815e507a8ea48d9ff7ae020264 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 5 Jun 2018 23:50:03 +0200 Subject: [PATCH] Login frontend --- bl-kernel/admin/controllers/login.php | 4 +- bl-kernel/admin/themes/booty/css/bludit.css | 28 +++++++- bl-kernel/admin/themes/booty/html/sidebar.php | 5 ++ bl-kernel/admin/themes/booty/login.php | 64 ++++++++++++------- bl-kernel/admin/views/login.php | 46 ++++++++----- bl-kernel/dbpages.class.php | 2 +- 6 files changed, 102 insertions(+), 47 deletions(-) diff --git a/bl-kernel/admin/controllers/login.php b/bl-kernel/admin/controllers/login.php index de7e95af..716b19df 100644 --- a/bl-kernel/admin/controllers/login.php +++ b/bl-kernel/admin/controllers/login.php @@ -15,7 +15,7 @@ function checkLogin($args) global $Language; if ($Security->isBlocked()) { - Alert::set($Language->g('IP address has been blocked').'
'.$Language->g('Try again in a few minutes')); + Alert::set($Language->g('IP address has been blocked').'
'.$Language->g('Try again in a few minutes'), ALERT_STATUS_FAIL); return false; } @@ -33,7 +33,7 @@ function checkLogin($args) $Security->addToBlacklist(); // Create alert - Alert::set($Language->g('Username or password incorrect')); + Alert::set($Language->g('Username or password incorrect'), ALERT_STATUS_FAIL); return false; } diff --git a/bl-kernel/admin/themes/booty/css/bludit.css b/bl-kernel/admin/themes/booty/css/bludit.css index a8cbea96..27f3f502 100644 --- a/bl-kernel/admin/themes/booty/css/bludit.css +++ b/bl-kernel/admin/themes/booty/css/bludit.css @@ -1,6 +1,7 @@ html { font-size: 0.9em; + height: 100%; } /* @@ -35,6 +36,16 @@ a:hover { border-color: #4a90e2; } +/* + LOGIN +*/ +body.login { + background: rgb(255,255,255); + background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 53%); + height: 100%; +} + + /* DASHBOARD */ @@ -83,11 +94,22 @@ a:hover { */ #alert { display: none; - position: absolute; - right: 0px; - padding: 16px 90px; + position: fixed; + text-align: center; border-radius: 0px; border: 0; + z-index: 1000; + width: 100%; +} + +.alert-success { + background-color: #4586d4; + color: #ffffff; +} + +.alert-danger { + background-color: #d44545; + color: #ffffff; } /* diff --git a/bl-kernel/admin/themes/booty/html/sidebar.php b/bl-kernel/admin/themes/booty/html/sidebar.php index 80aac22d..1524b500 100644 --- a/bl-kernel/admin/themes/booty/html/sidebar.php +++ b/bl-kernel/admin/themes/booty/html/sidebar.php @@ -11,6 +11,7 @@ + @@ -43,4 +44,8 @@ + + \ No newline at end of file diff --git a/bl-kernel/admin/themes/booty/login.php b/bl-kernel/admin/themes/booty/login.php index 0d307088..6c43e34d 100644 --- a/bl-kernel/admin/themes/booty/login.php +++ b/bl-kernel/admin/themes/booty/login.php @@ -1,45 +1,61 @@ - - + + - - - - Bludit + + + - - - + - - + + + + '; + include(PATH_CORE_JS.'bludit-ajax.php'); + echo ''; + ?> - + -
-'; - } + + - if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) { - include(PATH_ADMIN_VIEWS.$layout['view'].'.php'); - } -?> -
+
+
+
+ +
+
diff --git a/bl-kernel/admin/views/login.php b/bl-kernel/admin/views/login.php index 8c8329a9..e3edb9fb 100644 --- a/bl-kernel/admin/views/login.php +++ b/bl-kernel/admin/views/login.php @@ -1,25 +1,37 @@ -
+ +echo '

BLUDIT

'; - +echo Bootstrap::formOpen(array()); -
- + echo Bootstrap::formInputHidden(array( + 'name'=>'tokenCSRF', + 'value'=>$Security->getTokenCSRF() + )); + + echo ' +
+ +
+ '; + + echo ' +
+ +
+ '; + + echo ' +
+ +
-
- +
+
+ '; -
- -
+echo Bootstrap::formClose(); -
- -
- - - -
\ No newline at end of file +?> \ No newline at end of file diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index 553b74e1..df14d23d 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -59,7 +59,7 @@ class dbPages extends dbJSON $args['tags'] = array(); } - // Slug from title or content + // Slug from the title or the content if (empty($args['slug'])) { if (!empty($args['title'])) { $args['slug'] = $this->generateSlug($args['title']);