From 4ee833ffcd9706b1a1bf3f39dea6bee20144a820 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 18 Jan 2025 10:57:53 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Init=20a=20new=20koblog=20admin?= =?UTF-8?q?=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/koblog/css/koblog.bootstrap.css | 58 +++ bl-kernel/admin/themes/koblog/css/koblog.css | 367 ++++++++++++++++ bl-kernel/admin/themes/koblog/html/alert.php | 17 + bl-kernel/admin/themes/koblog/html/media.php | 262 ++++++++++++ bl-kernel/admin/themes/koblog/html/navbar.php | 76 ++++ .../admin/themes/koblog/html/sidebar.php | 80 ++++ bl-kernel/admin/themes/koblog/index.php | 98 +++++ bl-kernel/admin/themes/koblog/init.php | 403 ++++++++++++++++++ bl-kernel/admin/themes/koblog/login.php | 57 +++ 9 files changed, 1418 insertions(+) create mode 100644 bl-kernel/admin/themes/koblog/css/koblog.bootstrap.css create mode 100644 bl-kernel/admin/themes/koblog/css/koblog.css create mode 100644 bl-kernel/admin/themes/koblog/html/alert.php create mode 100644 bl-kernel/admin/themes/koblog/html/media.php create mode 100644 bl-kernel/admin/themes/koblog/html/navbar.php create mode 100644 bl-kernel/admin/themes/koblog/html/sidebar.php create mode 100644 bl-kernel/admin/themes/koblog/index.php create mode 100644 bl-kernel/admin/themes/koblog/init.php create mode 100644 bl-kernel/admin/themes/koblog/login.php diff --git a/bl-kernel/admin/themes/koblog/css/koblog.bootstrap.css b/bl-kernel/admin/themes/koblog/css/koblog.bootstrap.css new file mode 100644 index 00000000..181955f0 --- /dev/null +++ b/bl-kernel/admin/themes/koblog/css/koblog.bootstrap.css @@ -0,0 +1,58 @@ +a { + color: #0078D4; +} + +a:hover { + color: #003f6f; + text-decoration: none; +} + +.bg-success { + background-color: #8BC34A!important; +} + +.text-primary { + color: #0078D4!important; +} + +.text-danger { + color: #D40000!important; +} +a.text-danger:focus, +a.text-danger:hover { + color: #790000!important; +} + +/* Buttons */ +.btn-primary { + background-color: #0078D4; + border-color: #0078D4; +} + +.btn-primary:hover { + background-color: #4585CF; + border-color: #4a90e2; +} + +.btn-light.focus, .btn-light:focus { + box-shadow: none; +} + +.btn.focus, .btn:focus { + box-shadow: none; +} + +/* Form */ +.form-control:focus { + box-shadow: none; +} + +/* Tables */ +.table-striped tbody tr:nth-of-type(odd) { + background-color: rgba(0, 0, 0, 0.02); +} + +.table thead th { + font-size: 0.8em; + text-transform: uppercase!important; +} diff --git a/bl-kernel/admin/themes/koblog/css/koblog.css b/bl-kernel/admin/themes/koblog/css/koblog.css new file mode 100644 index 00000000..e1e455dd --- /dev/null +++ b/bl-kernel/admin/themes/koblog/css/koblog.css @@ -0,0 +1,367 @@ +html { + height: 100%; + font-size: 0.9rem; + background: #fcfcfc; +} + +body { + background: #fcfcfc; +} + +/* Prevent events in iframes */ +/* iframe{ + pointer-events: none; +} */ + +/* + ICONS +*/ +.fa { + margin-right: .5rem !important; + line-height: inherit; +} + +/* + SIDEBAR +*/ + +div.sidebar .nav-item a { + padding-left: 0; + padding-right: 0; + color: #555; + padding-top: 5px; + padding-bottom: 5px; +} + +div.sidebar .nav-item a:hover { + color: #0078D4; +} + +div.sidebar .nav-item h4 { + font-size: 1.2em; + text-transform: uppercase; + font-weight: 400; + margin-top: 10px; +} + +/* + AUTOCOMPLETE SEARCH +*/ +.search-suggestion { + padding: 5px; +} + +.search-suggestion-options { + font-size: 0.9em; + padding-top: 2px; +} + +/* + BOOTSTRAP Hacks +*/ + +@media (min-width: 1200px) { + .container { + max-width: 1250px; + } +} + +/* for small devices */ +@media (max-width: 575.98px) { + + #jsmediaManagerButton, + #jscategoryButton, + #jsdescriptionButton { + width: 100%; + text-align: left; + } +} + + + + +.btn-light { + color: #212529; + background-color: #f3f3f3; + border-color: #ced4d9; +} + +.btn-form { + background-color: #F3F3F3; + border-color: #DDD; + color: #000; +} + +.btn-form:hover { + background-color: rgb(228, 228, 228); + border-color: #DDD; + color: #000; +} + + + +code { + padding: 3px 5px 2px; + margin: 0 1px; + background: #eaeaea; + background: rgba(0, 0, 0, .07); + color: #444; +} + +.list-group-sortable { + cursor: pointer; +} + +.modal-body { + padding: 2rem; +} + +.modal-footer { + background-color: rgb(247, 247, 247); +} + +.modal-dialog .btn-link { + color: #000; +} + +/* + 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 +*/ + +#dashboard ul.list-group.list-group-striped li { + border: none; + word-break: break-word; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + +#dashboard ul.list-group.list-group-striped li:nth-of-type(even) { + background: #f1f1f1; + +} + +#dashboard div.quick-links-icons { + font-size: 3em; + width: 100%; +} + +#dashboard a.quick-links { + color: #777; +} + +#dashboard a.quick-links:hover { + text-decoration: none; + color: #4586d4; +} + +#hello-message { + padding: 10px 0; + margin-bottom: 20px; +} + +#hello-message span.oi { + top: 3px; +} + +.ct-series-a .ct-line { + /* Set the colour of this series line */ + stroke: #4a90e2; + /* Control the thikness of your lines */ + stroke-width: 2px; + /* Create a dashed line with a pattern */ +} + +.ct-series-a .ct-point { + /* Colour of your points */ + stroke: #4a90e2; + /* Size of your points */ + stroke-width: 8px; +} + +/* + ALERT +*/ + +#alert { + display: none; + position: fixed; + text-align: center; + border-radius: 0px; + border: 0; + z-index: 1000; + bottom: 0; + right: 0; + margin: 0; +} + +.alert-success { + background-color: #4586d4; + border-left: 6px solid #abd1ff !important; + color: #ffffff; +} + +.alert-danger { + background-color: #d44545; + border-left: 6px solid #ff9c9c !important; + color: #ffffff; +} + + + +/* + PLUGINS +*/ + +.plugin-form label { + display: block; + margin-top: 1rem !important; +} + +.plugin-form input[type="text"], +.plugin-form textarea, +.plugin-form select { + display: block; + width: 100%; + padding: .375rem .75rem; + font-size: 1rem; + line-height: 1.5; + color: #495057; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + border-radius: .25rem; + transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; +} + +.plugin-form textarea { + min-height: 120px; +} + +.plugin-form span.tip { + display: block; + font-size: 80%; + font-weight: 400; + margin-top: .25rem; + color: #6c757d !important; +} + +/* + Manage > Content +*/ + +td.child { + padding-left: 30px; +} + +/* + Manage > New Content +*/ + +#jseditor { + background: #fff; + padding: 10px 5% !important; + font-size: 16px; + line-height: 1.5em; + border: 1px solid #ced4da; +} + +#jseditorSidebar { + display: none; + height: calc(100% - 45px); + width: 50%; + max-width: 350px; + position: absolute; + z-index: 50; + top: 45px; + right: 15px; + background-color: #fff; + overflow-x: hidden; + transition: 0.5s; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + border-top: 1px solid #ccc; +} + +@media (max-width: 575.98px) { + #jseditorSidebar { + width: 100%; + max-width: 100%; + right: 0; + } + + #jseditorToolbarRight button { + font-size: 0px !important; + } + + #jseditorToolbarRight button span { + font-size: 16px !important; + } + + .contentTools .btn { + font-size: 0px !important; + margin-right: 5px; + } + + .contentTools .btn span { + font-size: 16px !important; + } +} + +#jseditorSidebar nav { + background: #f3f3f3; +} + +#jseditorSidebar nav a { + color: #000; +} + +#jseditorSidebar .nav-tabs .nav-link { + border: none; +} + +#jseditorSidebar .nav-link.active { + background: none; + border: none; + border-bottom: 3px solid #ccc; +} + +#jsshadow { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(72, 72, 72, 0.7); + z-index: 10; + display: none; +} + +img.profilePicture { + width: 30px; + height: 30px; + border-radius: 30px; + border: 1px solid #ccc; +} + +/* Switch button */ +.switch-button { + font-size: 0.9em; + text-transform: uppercase; + cursor: pointer; +} + +.switch-icon-publish { + color: #1cb11c; +} diff --git a/bl-kernel/admin/themes/koblog/html/alert.php b/bl-kernel/admin/themes/koblog/html/alert.php new file mode 100644 index 00000000..dc9770dc --- /dev/null +++ b/bl-kernel/admin/themes/koblog/html/alert.php @@ -0,0 +1,17 @@ + + +
diff --git a/bl-kernel/admin/themes/koblog/html/media.php b/bl-kernel/admin/themes/koblog/html/media.php new file mode 100644 index 00000000..3c53a992 --- /dev/null +++ b/bl-kernel/admin/themes/koblog/html/media.php @@ -0,0 +1,262 @@ + + + + + diff --git a/bl-kernel/admin/themes/koblog/html/navbar.php b/bl-kernel/admin/themes/koblog/html/navbar.php new file mode 100644 index 00000000..6854f8fd --- /dev/null +++ b/bl-kernel/admin/themes/koblog/html/navbar.php @@ -0,0 +1,76 @@ + diff --git a/bl-kernel/admin/themes/koblog/html/sidebar.php b/bl-kernel/admin/themes/koblog/html/sidebar.php new file mode 100644 index 00000000..771f6cad --- /dev/null +++ b/bl-kernel/admin/themes/koblog/html/sidebar.php @@ -0,0 +1,80 @@ + + diff --git a/bl-kernel/admin/themes/koblog/index.php b/bl-kernel/admin/themes/koblog/index.php new file mode 100644 index 00000000..a0d18aa6 --- /dev/null +++ b/bl-kernel/admin/themes/koblog/index.php @@ -0,0 +1,98 @@ + + + + <?php echo $layout['title'] ?> + + + + + + + + + + + + + + + + + + + + + + + + +'.PHP_EOL; + include(PATH_CORE_JS.'variables.php'); + echo ''.PHP_EOL; + + echo ''.PHP_EOL; +?> + + +
+ + + + + + + +
+ +
+ + + + + +
+ adminView(); + } else { + echo '

'.$L->g('Page not found').'

'; + echo '

'.$L->g('Choose a page from the sidebar.').'

'; + } + ?> +
+
+
+ + + + + + diff --git a/bl-kernel/admin/themes/koblog/init.php b/bl-kernel/admin/themes/koblog/init.php new file mode 100644 index 00000000..2a93dcea --- /dev/null +++ b/bl-kernel/admin/themes/koblog/init.php @@ -0,0 +1,403 @@ + + + +EOF; + } + + public static function link($args) + { + $options = 'href="' . $args['href'] . '"'; + if (isset($args['class'])) { + $options .= ' class="' . $args['class'] . '"'; + } + if (isset($args['target'])) { + $options .= ' target="' . $args['target'] . '"'; + } + + if (isset($args['icon'])) { + return '' . $args['title'] . ''; + } + + return '' . $args['title'] . ''; + } + + public static function pageTitle($args) + { + $icon = $args['icon']; + $title = $args['title']; + return << + $title + +EOF; + } + + public static function formOpen($args) + { + $class = empty($args['class']) ? '' : 'class="' . $args['class'] . '"'; + $id = empty($args['id']) ? '' : 'id="' . $args['id'] . '"'; + $enctype = empty($args['enctype']) ? '' : 'enctype="' . $args['enctype'] . '"'; + $action = empty($args['action']) ? 'action=""' : 'action="' . $args['action'] . '"'; + $method = empty($args['method']) ? 'method="post"' : 'method="' . $args['method'] . '"'; + $style = empty($args['style']) ? '' : 'style="' . $args['style'] . '"'; + + return << +EOF; + } + + public static function formClose() + { + return << + +EOF; + } + + public static function formTitle($args) + { + $title = $args['title']; + return <<$title +EOF; + } + + public static function formInputTextBlock($args) + { + $name = $args['name']; + $disabled = empty($args['disabled']) ? '' : 'disabled'; + $placeholder = isset($args['placeholder']) ? $args['placeholder'] : ''; + $value = isset($args['value']) ? $args['value'] : ''; + + $id = 'js' . $name; + if (isset($args['id'])) { + $id = $args['id']; + } + + $tip = ''; + if (!empty($args['tip'])) { + $tip = '' . $args['tip'] . ''; + } + + $class = 'form-group m-0 mb-2'; + if (isset($args['class'])) { + $class = $args['class']; + } + + $labelClass = 'mt-4 mb-2 pb-2 border-bottom text-uppercase w-100'; + if (isset($args['labelClass'])) { + $labelClass = $args['labelClass']; + } + + $label = ''; + if (!empty($args['label'])) { + $label = ''; + } + + $type = 'text'; + if (isset($args['type'])) { + $type = $args['type']; + } + + return << + $label + + $tip + +EOF; + } + + public static function formInputFile($args) + { + $id = 'js' . $args['name']; + if (isset($args['id'])) { + $id = $args['id']; + } + + $class = 'custom-file mb-2'; + if (isset($args['class'])) { + $class = $class . ' ' . $args['class']; + } + + $html = '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + + return $html; + } + + public static function formTextarea($args) + { + $id = 'js' . $args['name']; + if (isset($args['id'])) { + $id = $args['id']; + } + + $class = 'form-control'; + if (isset($args['class'])) { + $class = $class . ' ' . $args['class']; + } + + $html = '
'; + + if (!empty($args['label'])) { + $html .= ''; + } + + $html .= '
'; + $html .= ''; + if (isset($args['tip'])) { + $html .= '' . $args['tip'] . ''; + } + $html .= '
'; + $html .= '
'; + + return $html; + } + + public static function formTextareaBlock($args) + { + $id = 'js' . $args['name']; + if (isset($args['id'])) { + $id = $args['id']; + } + + $class = 'form-control'; + if (!empty($args['class'])) { + $class = $class . ' ' . $args['class']; + } + + $html = '
'; + if (!empty($args['label'])) { + $html .= ''; + } + + $html .= ''; + if (!empty($args['tip'])) { + $html .= '' . $args['tip'] . ''; + } + $html .= '
'; + + return $html; + } + + public static function formInputText($args) + { + $name = $args['name']; + $disabled = empty($args['disabled']) ? '' : 'disabled'; + $readonly = empty($args['readonly']) ? '' : 'readonly'; + $placeholder = isset($args['placeholder']) ? $args['placeholder'] : ''; + $value = isset($args['value']) ? $args['value'] : ''; + + $id = 'js' . $name; + if (isset($args['id'])) { + $id = $args['id']; + } + + $tip = ''; + if (isset($args['tip'])) { + $tip = '' . $args['tip'] . ''; + } + + $label = ''; + if (isset($args['label'])) { + $label = ''; + } + + $class = 'form-control'; + if (isset($args['class'])) { + $class = $class . ' ' . $args['class']; + } + + $type = 'text'; + if (isset($args['type'])) { + $type = $args['type']; + } + + return << + $label +
+ + $tip +
+ +EOF; + } + + public static function formCheckbox($args) + { + $labelForCheckbox = isset($args['labelForCheckbox']) ? $args['labelForCheckbox'] : ''; + $placeholder = isset($args['placeholder']) ? $args['placeholder'] : ''; + $tip = isset($args['tip']) ? '' . $args['tip'] . '' : ''; + $value = isset($args['value']) ? $args['value'] : ''; + $name = $args['name']; + $id = 'js' . $name; + if (isset($args['id'])) { + $id = $args['id']; + } + $disabled = isset($args['disabled']) ? 'disabled' : ''; + + $class = 'form-group m-0'; + if (isset($args['class'])) { + $class = $args['class']; + } + + $labelClass = 'mt-4 mb-2 pb-2 border-bottom text-uppercase w-100'; + if (isset($args['labelClass'])) { + $labelClass = $args['labelClass']; + } + + $type = 'text'; + if (isset($args['type'])) { + $type = $args['type']; + } + + $label = ''; + if (!empty($args['label'])) { + $label = ''; + } + + $checked = $args['checked'] ? 'checked' : ''; + $value = $checked ? '1' : '0'; + + return << + $label +
+ + + $tip +
+ +EOF; + } + + public static function formSelect($args) + { + $id = 'js' . $args['name']; + if (isset($args['id'])) { + $id = $args['id']; + } + + $class = 'form-select custom-select'; + if (isset($args['class'])) { + $class = $class . ' ' . $args['class']; + } + + $html = '
'; + + if (isset($args['label'])) { + $html .= ''; + } + + $html .= '
'; + $html .= ''; + if (isset($args['tip'])) { + $html .= '' . $args['tip'] . ''; + } + $html .= '
'; + $html .= '
'; + + return $html; + } + + public static function formSelectBlock($args) + { + $id = 'js' . $args['name']; + if (isset($args['id'])) { + $id = $args['id']; + } + + $class = 'custom-select form-select'; + if (!empty($args['class'])) { + $class = $class . ' ' . $args['class']; + } + + $html = '
'; + + if (!empty($args['label'])) { + $html .= ''; + } + + $html .= ''; + if (!empty($args['tip'])) { + $html .= '' . $args['tip'] . ''; + } + $html .= '
'; + + return $html; + } + + public static function formInputHidden($args) + { + return ''; + } + + public static function alert($args) + { + $class = 'alert'; + if (!empty($args['class'])) { + $class = $class . ' ' . $args['class']; + } + + $text = $args['text']; + + return <<$text +EOF; + } +} diff --git a/bl-kernel/admin/themes/koblog/login.php b/bl-kernel/admin/themes/koblog/login.php new file mode 100644 index 00000000..4c5b8931 --- /dev/null +++ b/bl-kernel/admin/themes/koblog/login.php @@ -0,0 +1,57 @@ + + + + + Koblog + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ + + + + + +