diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d0a68c2..2d693a7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,22 @@ First forked version from bludit ### Added - Admin: Added a sidebar panel that show all sidebar widget to be activated/deactivated -- Admin: Show some pages only if the theme support their features -- Site: Add support for archive view (à la Wordpress) +- Admin: Show some admin pages only if the theme support their features +- Admin: Add a global gallery, used for theme and logos +- Admin/settings: Add a homepage presentation setting +- Admin/settings: Add a way to change the favicon globally +- Admin/settings: Add a way to change the default thumbnail (used with opengraph and themes) +- Admin/settings: Add a way to change the default avatar size +- Site: Add support for archive view (à la Wordpress : show the article written during a certain month/year) - Site: Add support for author view -- Site: Add support for IndieWeb post kinds +- Site: Add support for IndieWeb post kinds (with a custom view) +- Site: Add support for Atom feeds - Site: Add a source URL (usefull for some post kinds) - Theme: Add emoji for social network +- Theme: Add a new pagination system that show a page list +- Theme: Add a support for title and description for pagelist views (archive, tag, category, author and post-kind) +- Theme: Add a way to easily get all the social network of an user +- Theme: Add a new default theme, inspired by the old wordpress theme, with customisation support - Sidebar: Add a social network widget ### Changed @@ -26,4 +36,6 @@ First forked version from bludit - Icons: replaced linearicons by fontawesome - Admin: reworked the theme - Admin/content: The sidebar is now always visible -- Replace social network by a better list and make them more configurable \ No newline at end of file +- Admin/settings: The site logo now use the global gallery +- Admin/settings: Replace social network by a better list and make them more configurable +- Theme: The theme plugin can now be part of the theme directly, to make it easier to install \ No newline at end of file diff --git a/bl-kernel/abstract/plugin.class.php b/bl-kernel/abstract/plugin.class.php index 9d2a1c46..b428e785 100644 --- a/bl-kernel/abstract/plugin.class.php +++ b/bl-kernel/abstract/plugin.class.php @@ -35,10 +35,18 @@ class Plugin // (array) List of custom hooks public $customHooks; - function __construct() + // domain of the module + private $domain; + + // path of the module + private $path; + + function __construct($path, $domain) { $this->dbFields = array(); $this->customHooks = array(); + $this->path = $path; + $this->domain = $domain; $reflector = new ReflectionClass(get_class($this)); @@ -59,7 +67,7 @@ class Plugin $this->filenameDb = PATH_PLUGINS_DATABASES . $this->directoryName . DS . 'db.php'; // --- Metadata --- - $this->filenameMetadata = PATH_PLUGINS . $this->directoryName() . DS . 'metadata.json'; + $this->filenameMetadata = $this->path . $this->directoryName() . DS . 'metadata.json'; $metadataString = file_get_contents($this->filenameMetadata); $this->metadata = json_decode($metadataString, true); @@ -92,7 +100,7 @@ class Plugin // This function helps to include CSS or Javascript files with absolute URL public function domainPath() { - return DOMAIN_PLUGINS . $this->directoryName . '/'; + return $this->domain . $this->directoryName . '/'; } // Returns relative path of the plugin directory @@ -106,7 +114,7 @@ class Plugin // This function helps to include PHP libraries or some file at server level public function phpPath() { - return PATH_PLUGINS . $this->directoryName . DS; + return $this->path . $this->directoryName . DS; } public function phpPathDB() diff --git a/bl-kernel/admin/controllers/edit-media.php b/bl-kernel/admin/controllers/edit-media.php new file mode 100644 index 00000000..642d5576 --- /dev/null +++ b/bl-kernel/admin/controllers/edit-media.php @@ -0,0 +1,49 @@ +g('The changes have been saved') ); + } + } else { + $key = editMedia($_POST, $_FILES); + if ($key!==false) { + Alert::set( $L->g('The changes have been saved') ); + Redirect::page('edit-media/'.$key); + } + } + + Redirect::page('medias'); +} + +// ============================================================================ +// Main after POST +// ============================================================================ +try { + $mediaKey = $layout['parameters']; + $media = new Media($mediaKey); +} catch (Exception $e) { + Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$mediaKey, LOG_TYPE_ERROR); + Redirect::page('medias'); +} + +// Title of the page +$layout['title'] .= ' - '.$L->g('Edit media').' - '.$media->name(); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/medias.php b/bl-kernel/admin/controllers/medias.php new file mode 100644 index 00000000..c17b75f4 --- /dev/null +++ b/bl-kernel/admin/controllers/medias.php @@ -0,0 +1,30 @@ +g('Medias'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/new-media.php b/bl-kernel/admin/controllers/new-media.php new file mode 100644 index 00000000..6bc8ef7b --- /dev/null +++ b/bl-kernel/admin/controllers/new-media.php @@ -0,0 +1,49 @@ +g('New media').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/themes/koblog/html/navbar.php b/bl-kernel/admin/themes/koblog/html/navbar.php index e3be3f30..c78b738e 100644 --- a/bl-kernel/admin/themes/koblog/html/navbar.php +++ b/bl-kernel/admin/themes/koblog/html/navbar.php @@ -17,6 +17,8 @@ + + @@ -26,6 +30,10 @@ p('Categories') ?> + + diff --git a/bl-kernel/admin/themes/koblog/init.php b/bl-kernel/admin/themes/koblog/init.php index 720f0249..4b50dba6 100644 --- a/bl-kernel/admin/themes/koblog/init.php +++ b/bl-kernel/admin/themes/koblog/init.php @@ -367,6 +367,43 @@ EOF; return $html; } + public static function formSelectGallery($args) + { + global $medias; + global $L; + + $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']; diff --git a/bl-kernel/admin/views/edit-media.php b/bl-kernel/admin/views/edit-media.php new file mode 100644 index 00000000..0207fa8b --- /dev/null +++ b/bl-kernel/admin/views/edit-media.php @@ -0,0 +1,60 @@ + + +'jsform', 'class'=>'tab-content','enctype'=>'multipart/form-data')); ?> + +
+$L->g(string: 'Edit media'), 'icon'=>'image')); ?> +
+ + p('Cancel') ?> +
+
+ +
+ <?php echo $media->alt() ?> +
+ +
+
+ 'key', + 'value' => $media->key() + )); + + echo Bootstrap::formInputHidden(array( + 'name'=>'tokenCSRF', + 'value'=>$security->getTokenCSRF() + )); + + echo Bootstrap::formInputText(array( + 'name'=>'name', + 'label'=>$L->g('Name'), + 'value'=>$media->name(), + 'class'=>'', + 'placeholder'=>'', + 'tip'=>'' + )); + + echo Bootstrap::formTextarea(array( + 'name'=>'alt', + 'label'=>$L->g('Alt Text'), + 'value'=>$media->alt(), + 'class'=>'', + 'placeholder'=>'', + 'tip'=>'Add a description of the text', + 'rows'=>3 + )); + ?> +
+ +
+ +
+
+
+
+ + \ No newline at end of file diff --git a/bl-kernel/admin/views/medias.php b/bl-kernel/admin/views/medias.php new file mode 100644 index 00000000..c07b14d0 --- /dev/null +++ b/bl-kernel/admin/views/medias.php @@ -0,0 +1,41 @@ +"; + +echo Bootstrap::pageTitle(array('title'=>$L->g('Medias'), 'icon'=>'images')); + +echo "
"; +echo Bootstrap::link(array( + 'title'=>$L->g('New media'), + 'href'=>HTML_PATH_ADMIN_ROOT.'new-media', + 'icon'=>'plus', + 'class'=>'btn btn-outline-success' +)); +echo "
"; + +echo ' +
+ + + + + + + + +'; + +foreach ($medias->content() as $key=>$media) { + echo ''; + echo ''; + echo ''; + echo ''; +} + +echo ' + +
'.$L->g('Name').''.$L->g('URL').'
'.''.$media->alt().''.$media->name().''.$media->permalink().'
+
+'; + +?> \ No newline at end of file diff --git a/bl-kernel/admin/views/new-media.php b/bl-kernel/admin/views/new-media.php new file mode 100644 index 00000000..59210043 --- /dev/null +++ b/bl-kernel/admin/views/new-media.php @@ -0,0 +1,49 @@ + + +'jsform', 'class'=>'tab-content','enctype'=>'multipart/form-data')); ?> + +
+$L->g(string: 'New media'), 'icon'=>'image')); ?> +
+ + p('Cancel') ?> +
+
+ +
+'tokenCSRF', + 'value'=>$security->getTokenCSRF() + )); + + echo Bootstrap::formInputText(array( + 'name'=>'name', + 'label'=>$L->g('Name'), + 'value'=>isset($_POST['name'])?$_POST['name']:'', + 'class'=>'', + 'placeholder'=>'', + 'tip'=>'' + )); + + echo Bootstrap::formTextarea(array( + 'name'=>'alt', + 'label'=>$L->g('Alt Text'), + 'value'=>isset($_POST['alt'])?$_POST['alt']:'', + 'class'=>'', + 'placeholder'=>'', + 'tip'=>'Add a description of the text', + 'rows'=>3 + )); +?> +
+ +
+ + Prout +
+
+ +
+ + \ No newline at end of file diff --git a/bl-kernel/admin/views/settings.php b/bl-kernel/admin/views/settings.php index a7500e70..e348ac28 100644 --- a/bl-kernel/admin/views/settings.php +++ b/bl-kernel/admin/views/settings.php @@ -22,7 +22,7 @@ p('Social Networks') ?> p('Images') ?> p('Language') ?> - p('Logo') ?> + p('Custom fields') ?> @@ -74,6 +74,16 @@ echo Bootstrap::formInputHidden(array( 'tip' => $L->g('you-can-add-a-site-description-to-provide') )); + echo Bootstrap::formTextarea(array( + 'name' => 'homepagePresentation', + 'label' => $L->g('Homepage'), + 'value' => $site->homepagePresentation(), + 'class' => '', + 'placeholder' => '', + 'tip' => '', + 'rows' => 8 + )); + echo Bootstrap::formInputText(array( 'name' => 'footer', 'label' => $L->g('Footer text'), @@ -413,7 +423,7 @@ echo Bootstrap::formInputHidden(array( ?> -
+
g('Social Networks')); @@ -435,6 +445,37 @@ echo Bootstrap::formInputHidden(array(
g('Images')); + + echo Bootstrap::formSelectGallery(array( + 'name' => 'logo', + 'label' => $L->g('Site logo'), + 'selected' => $site->logo(), + 'class' => '', + 'placeholder' => '', + 'tip' => '' + )); + + echo Bootstrap::formSelectGallery(array( + 'name' => 'favicon', + 'label' => $L->g('Favicon'), + 'selected' => $site->favicon(), + 'class' => '', + 'placeholder' => '', + 'tip' => '' + )); + + echo Bootstrap::formSelectGallery(array( + 'name' => 'defaultThumbnail', + 'label' => $L->g('Default Thumbnail'), + 'selected' => $site->defaultThumbnail(), + 'class' => '', + 'placeholder' => '', + 'tip' => '' + )); + + echo Bootstrap::cardEnd(); + echo Bootstrap::cardBegin($L->g('Thumbnails')); echo Bootstrap::formInputText(array( @@ -546,54 +587,24 @@ echo Bootstrap::formInputHidden(array( ?>
- -'; + + return $html; + } + + public static function values($plugin, $settingName, $title, $values, $description = "") + { + + global $L; + + $html = '
'; + $html .= ''; + $html .= ''; + if ($description != "") { + $html .= '
' . $L->get($description) . '
'; + } + $html .= '
'; + + return $html; + } + + public static function medias($plugin, $settingName, $title, $description = "") + { + + global $L; + global $medias; + + $html = '
'; + $html .= ''; + $html .= ''; + if ($description != "") { + $html .= '
' . $L->get($description) . '
'; + } + $html .= '
'; + + return $html; + } +} \ No newline at end of file diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index 2835b4e1..11a83af3 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -108,6 +108,7 @@ class Theme global $categories; global $WHERE_AM_I; global $page; + global $L; if ($WHERE_AM_I == 'page') { return $page->title(); @@ -142,6 +143,60 @@ class Theme } catch (Exception $e) { // Author doesn't exist } + } elseif ($WHERE_AM_I == 'home') { + return $L->get("Latest articles"); + } + + return null; + } + + public static function locationDescription() + { + global $url; + global $site; + global $tags; + global $archives; + global $authors; + global $categories; + global $WHERE_AM_I; + global $page; + global $L; + + if ($WHERE_AM_I == 'page') { + return $page->description(); + } elseif ($WHERE_AM_I == 'tag') { + try { + $tagKey = $url->slug(); + $tag = new Tag($tagKey); + return $L->get('all-post-tags') . " \"" . $tag->name() . "\""; + } catch (Exception $e) { + // Tag doesn't exist + } + } elseif ($WHERE_AM_I == 'category') { + try { + $categoryKey = $url->slug(); + $category = new Category($categoryKey); + return $category->description(); + } catch (Exception $e) { + // Category doesn't exist + } + } elseif ($WHERE_AM_I == 'archive') { + try { + $archiveKey = $url->slug(); + return $L->get('all-post-archive') . " " . Date::prettyArchiveDate($archiveKey); + } catch (Exception $e) { + // Archive doesn't exist + } + } elseif ($WHERE_AM_I == 'author') { + try { + $authorKey = $url->slug(); + $user = new User($authorKey); + return $L->get('all-post-author') . " " . $user->displayName(); + } catch (Exception $e) { + // Author doesn't exist + } + } elseif ($WHERE_AM_I == 'home') { + return $L->get("all-post"); } return null; @@ -313,7 +368,11 @@ class Theme public static function favicon($file = 'favicon.png', $typeIcon = 'image/png') { - return '' . PHP_EOL; + $favicon = MediaHelper::getFavicon(); + if ($favicon == null) { + return ""; + } + return '' . PHP_EOL; } public static function keywords($keywords) @@ -352,6 +411,20 @@ class Theme return $FONTAWESOME; } + public static function getHomepagePresentation() + { + global $site; + $content = $site->homepagePresentation(); + + // Parse Markdown + if (MARKDOWN_PARSER) { + $parsedown = new Parsedown(); + $content = $parsedown->text($content); + } + + return $content; + } + public static function jsSortable($attributes = '') { // https://github.com/psfpro/bootstrap-html5sortable diff --git a/bl-kernel/js/koblog-ajax.php b/bl-kernel/js/koblog-ajax.php index ce6df647..6ad96efc 100644 --- a/bl-kernel/js/koblog-ajax.php +++ b/bl-kernel/js/koblog-ajax.php @@ -26,28 +26,6 @@ class koblogAjax { } } - static async removeLogo() { - let url = HTML_PATH_ADMIN_ROOT+"ajax/logo-remove" - try { - const response = await fetch(url, { - credentials: 'same-origin', - method: "POST", - headers: new Headers({ - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' - }), - body: new URLSearchParams({ - 'tokenCSRF': tokenCSRF - }), - }); - const json = await response.json(); - return json; - } - catch (err) { - console.log(err); - return true; - } - } - // Alert the user when the user is not logged userLogged(callBack) { var ajaxRequest; diff --git a/bl-kernel/media.class.php b/bl-kernel/media.class.php new file mode 100644 index 00000000..afe9665b --- /dev/null +++ b/bl-kernel/media.class.php @@ -0,0 +1,48 @@ +db[$key])) { + $this->vars['name'] = $medias->db[$key]['name']; + $this->vars['alt'] = $medias->db[$key]['alt']; + $this->vars['filename'] = $medias->db[$key]['filename']; + $this->vars['key'] = $key; + + //$this->vars['permalink'] = DOMAIN_TAGS . $key; + //$this->vars['list'] = $medias->db[$key]['list']; + } else { + $errorMessage = 'Media not found in database by key ['.$key.']'; + Log::set(__METHOD__.LOG_SEP.$errorMessage); + throw new Exception($errorMessage); + } + } + + function key() { + return $this->vars['key']; + } + + function name() { + return $this->vars['name']; + } + + function alt() { + return $this->vars['alt']; + } + + function filename() { + return $this->vars['filename']; + } + + function permalink() { + return HTML_PATH_UPLOADS_MEDIAS.$this->filename(); + } + + function toHTML($classes) { + return "" . $this->alt() . ""; + } +} \ No newline at end of file diff --git a/bl-kernel/medias.class.php b/bl-kernel/medias.class.php new file mode 100644 index 00000000..8293c9b6 --- /dev/null +++ b/bl-kernel/medias.class.php @@ -0,0 +1,80 @@ + '', + 'alt' => '' + ); + + function __construct() + { + parent::__construct(DB_MEDIAS); + } + + public function getDefaultFields() + { + return $this->dbFields; + } + + // Return an array with the database for a page, FALSE otherwise + public function getMediaDB($key) + { + if ($this->exists($key)) { + return $this->db[$key]; + } + + return false; + } + + // Return TRUE if the page exists, FALSE otherwise + public function exists($key) + { + return isset($this->db[$key]); + } + + // Get all the medias + public function content() + { + $content = array(); + foreach ($this->db as $field => $value) { + $content[$field] = new Media($field); + } + return $content; + } + + public function add($args, $filename) + { + $row = array(); + foreach ($this->dbFields as $field => $value) { + $row[$field] = $args[$field]; + } + $row['filename'] = $filename; + $key = Text::cleanUrl($row['name']); + + // Insert in database + $this->db[$key] = $row; + + // Save database + $this->save(); + } + + public function edit($key, $args, $filename) { + $row = array(); + foreach ($this->dbFields as $field => $value) { + $row[$field] = $args[$field]; + } + if ($filename && $filename != "") { + $row['filename'] = $filename; + } + + // Insert in database + $this->db[$key] = $row; + + // Save database + $this->save(); + } + +} \ No newline at end of file diff --git a/bl-kernel/site.class.php b/bl-kernel/site.class.php index 177e5c67..022f126c 100644 --- a/bl-kernel/site.class.php +++ b/bl-kernel/site.class.php @@ -6,6 +6,7 @@ class Site extends dbJSON 'title' => 'I am Guybrush Threepwood, mighty developer', 'slogan' => '', 'description' => '', + 'homepagePresentation' => '', 'footer' => 'I wanna be a pirate!', 'itemsPerPage' => 6, 'language' => 'en', @@ -58,6 +59,8 @@ class Site extends dbJSON 'avatarHeight' => 400, // px 'avatarQuality' => 100, 'logo' => '', + 'favicon' => '', + 'defaultThumbnail' => '', 'markdownParser' => true, 'customFields' => '{}', 'socials' => array() @@ -280,6 +283,11 @@ class Site extends dbJSON return $this->getField('description'); } + public function homepagePresentation() + { + return $this->getField('homepagePresentation'); + } + public function emailFrom() { return $this->getField('emailFrom'); @@ -343,15 +351,19 @@ class Site extends dbJSON return $this->getField('titleFormatAuthor'); } - // Returns the absolute URL of the site logo - // If you set $absolute=false returns only the filename - public function logo($absolute = true) + public function logo() { - $logo = $this->getField('logo'); - if ($absolute && $logo) { - return DOMAIN_UPLOADS . $logo; - } - return $logo; + return $this->getField('logo'); + } + + public function favicon() + { + return $this->getField('favicon'); + } + + public function defaultThumbnail() + { + return $this->getField('defaultThumbnail'); } // Returns the full domain and base url diff --git a/bl-kernel/user.class.php b/bl-kernel/user.class.php index 3075d7ff..f88a46a0 100644 --- a/bl-kernel/user.class.php +++ b/bl-kernel/user.class.php @@ -76,7 +76,8 @@ class User } public function authorUri() { - return DOMAIN_AUTHORS . $this->username(); + global $site; + return $site->uriFilters('author') . $this->username(); } public function displayNameMode() @@ -206,7 +207,19 @@ class User } public function getSocialNetwork($social) { - return $this->getValue('socials')[Text::cleanUrl($social)]; + return $this->getValue('socials')[Text::cleanUrl($social)] ?? ""; + } + + public function socials() { + global $site; + $socialNetworks = array(); + + foreach ($GLOBALS['SOCIAL_NETWORKS'] as $key => $label) { + if ($this->getSocialNetwork($label) != "") { + $socialNetworks[Text::cleanUrl($label)] = new Social($label, $this->getSocialNetwork($label)); + } + } + return $socialNetworks; } public function profilePicture() diff --git a/bl-languages/en.json b/bl-languages/en.json index 77065591..aad959d8 100644 --- a/bl-languages/en.json +++ b/bl-languages/en.json @@ -415,5 +415,11 @@ "insert-thumbnail": "Insert thumbnail", "insert-linked-thumbnail": "Insert linked thumbnail", "more-infos": "More infos", - "base-infos": "Base infos" + "base-infos": "Base infos", + "latest-articles": "Latest articles", + "all-post-tags": "All posts with the tag", + "all-post-archive": "All posts written in", + "all-post-author": "All posts written by", + "all-post": "All the latest posts written on the blog" + } diff --git a/bl-languages/fr_FR.json b/bl-languages/fr_FR.json index bfa26afc..3bcdce49 100644 --- a/bl-languages/fr_FR.json +++ b/bl-languages/fr_FR.json @@ -243,6 +243,7 @@ "static": "Statique", "about-your-site-or-yourself": "À propos de votre site ou de vous-même", "homepage": "Page d’accueil", + "home": "Accueil", "disabled": "Désactivé", "to-enable-the-user-you-must-set-a-new-password": "Pour activer l’utilisateur, vous devez définir un nouveau mot de passe.", "delete-the-user-and-associate-his-content-to-admin-user": "Supprimer l’utilisateur et associer son contenu à l’administrateur.", @@ -424,5 +425,11 @@ "more-infos": "Infos supplémentaires", "base-infos": "Infos de bases", "source-link": "Lien source", - "the-external-link-you-refer-to-in-the-post":"Le lien externe auquel vous vous referrez dans le contenu" + "the-external-link-you-refer-to-in-the-post":"Le lien externe auquel vous vous referrez dans le contenu", + "powered-by":"Propulsé par", + "latest-articles": "Derniers articles", + "all-post-tags": "Tous les articles avec le tag", + "all-post-archive": "Tous les articles écrits en", + "all-post-author": "Tous les articles écrits par", + "all-post": "Tout les articles écrits récemment sur le blog" } \ No newline at end of file diff --git a/bl-plugins/about/plugin.php b/bl-plugins/about/plugin.php index 82959103..35f7f051 100644 --- a/bl-plugins/about/plugin.php +++ b/bl-plugins/about/plugin.php @@ -6,8 +6,7 @@ class pluginAbout extends Plugin public function init() { $this->dbFields = array( - 'label' => 'About', - 'text' => '' + 'label' => 'About' ); } @@ -21,11 +20,6 @@ class pluginAbout extends Plugin $html .= '' . $L->get('This title is almost always used in the sidebar of the site') . ''; $html .= '
'; - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '
'; - return $html; } @@ -34,7 +28,7 @@ class pluginAbout extends Plugin $html = '
'; $html .= '

' . $this->getValue('label') . '

'; $html .= '
'; - $html .= html_entity_decode(nl2br($this->getValue('text'))); + $html .= Theme::getHomepagePresentation(); $html .= '
'; $html .= '
'; diff --git a/bl-plugins/alternative/languages/de_AT.json b/bl-plugins/alternative/languages/de_AT.json deleted file mode 100644 index f587cc41..00000000 --- a/bl-plugins/alternative/languages/de_AT.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Theme Popeye", - "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye." - }, - "enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.", - "enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.", - "relative": "Relativ", - "absolute": "Absolut", - "change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.", - "show-tags": "Schlagwörter zeigen", - "show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge." -} diff --git a/bl-plugins/alternative/languages/de_CH.json b/bl-plugins/alternative/languages/de_CH.json deleted file mode 100644 index f587cc41..00000000 --- a/bl-plugins/alternative/languages/de_CH.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Theme Popeye", - "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye." - }, - "enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.", - "enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.", - "relative": "Relativ", - "absolute": "Absolut", - "change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.", - "show-tags": "Schlagwörter zeigen", - "show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge." -} diff --git a/bl-plugins/alternative/languages/de_DE.json b/bl-plugins/alternative/languages/de_DE.json deleted file mode 100644 index f587cc41..00000000 --- a/bl-plugins/alternative/languages/de_DE.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Theme Popeye", - "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye." - }, - "enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.", - "enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.", - "relative": "Relativ", - "absolute": "Absolut", - "change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.", - "show-tags": "Schlagwörter zeigen", - "show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge." -} diff --git a/bl-plugins/alternative/languages/en.json b/bl-plugins/alternative/languages/en.json deleted file mode 100644 index 6b24dd40..00000000 --- a/bl-plugins/alternative/languages/en.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "plugin-data": { - "name": "Alternative Theme", - "description": "This plugin provides configuration for the Alternative theme." - }, - "enable-or-disable-dark-mode": "Enable or disable dark mode.", - "enable-or-disable-google-fonts": "Enable or disable Google fonts.", - "relative": "Relative", - "absolute": "Absolute", - "change-the-date-format-for-the-main-page": "Change the date format for the main page.", - "show-tags": "Show tags", - "show-tags-in-the-main-page-for-each-article": "Show tags on the main page for each article." -} diff --git a/bl-plugins/alternative/languages/ja_JP.json b/bl-plugins/alternative/languages/ja_JP.json deleted file mode 100644 index f6a10d74..00000000 --- a/bl-plugins/alternative/languages/ja_JP.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Popeye Theme", - "description": "Popeyeテーマの設定を行うプラグインです。" - }, - "enable-or-disable-dark-mode": "ダークモードを有効または無効にします。", - "enable-or-disable-google-fonts": "Google Fontsの利用を有効または無効にします。", - "relative": "相対的", - "absolute": "絶対的", - "change-the-date-format-for-the-main-page": "メインページの日付表示形式を変更します。", - "show-tags": "タグの表示", - "show-tags-in-the-main-page-for-each-article": "メインページの各記事にタグを表示します。" -} diff --git a/bl-plugins/alternative/languages/nl_NL.json b/bl-plugins/alternative/languages/nl_NL.json deleted file mode 100644 index 6c37d571..00000000 --- a/bl-plugins/alternative/languages/nl_NL.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Popeye Thema", - "description": "Met deze plugin kan het thema Popeye geconfigureerd worden." - }, - "enable-or-disable-dark-mode": "Donkere modus in-/uitschakelen.", - "enable-or-disable-google-fonts": "Lettertypes van Google in-/uitschakelen.", - "relative": "Relatief", - "absolute": "Absoluut", - "change-the-date-format-for-the-main-page": "Het datumformaat voor de hoofdpagina aanpassen.", - "show-tags": "Tags tonen", - "show-tags-in-the-main-page-for-each-article": "Op de hoofdpagina voor ieder artikel de tags tonen." -} diff --git a/bl-plugins/alternative/languages/ru.json b/bl-plugins/alternative/languages/ru.json deleted file mode 100644 index ac3e1bd9..00000000 --- a/bl-plugins/alternative/languages/ru.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "plugin-data": { - "name": "Настройки темы Alternative", - "description": "Этот плагин содержит настройки для темы Alternative." - }, - "enable-or-disable-dark-mode": "Включить или выключить тёмный режим.", - "enable-or-disable-google-fonts": "Включить или выключить шрифты от Google (Google fonts).", - "relative": "Относительный", - "absolute": "Абсолютный", - "change-the-date-format-for-the-main-page": "Изменить формат даты для главной страницы.", - "show-tags": "Отображать теги", - "show-tags-in-the-main-page-for-each-article": "Показывать теги на главной странице для каждой записи." -} diff --git a/bl-plugins/alternative/metadata.json b/bl-plugins/alternative/metadata.json deleted file mode 100644 index dc7efe91..00000000 --- a/bl-plugins/alternative/metadata.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "author": "Koblog", - "email": "", - "website": "https://plugins.koblog.com", - "version": "kb_0.0.1", - "releaseDate": "2023-07-10", - "license": "MIT", - "compatible": "kb_0.0.1", - "notes": "", - "type": "theme" -} diff --git a/bl-plugins/alternative/plugin.php b/bl-plugins/alternative/plugin.php deleted file mode 100644 index 3a6abf80..00000000 --- a/bl-plugins/alternative/plugin.php +++ /dev/null @@ -1,65 +0,0 @@ -dbFields = array( - 'googleFonts' => false, - 'showPostInformation' => false, - 'dateFormat' => 'relative' - ); - } - - public function form() - { - global $L; - - $html = ''; - - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '
' . $L->get('Enable or disable Google fonts.') . '
'; - $html .= '
'; - - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '
'; - - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '
' . $L->get('Change the date format for the main page.') . '
'; - $html .= '
'; - - return $html; - } - - public function showPostInformation() - { - return $this->getValue('showPostInformation'); - } - - public function googleFonts() - { - return $this->getValue('googleFonts'); - } - - public function dateFormat() - { - return $this->getValue('dateFormat'); - } -} diff --git a/bl-plugins/archive/plugin.php b/bl-plugins/archive/plugin.php index c8c43055..3cd00920 100644 --- a/bl-plugins/archive/plugin.php +++ b/bl-plugins/archive/plugin.php @@ -44,7 +44,7 @@ class pluginArchives extends Plugin $html = '
'; $html .= '

' . $this->getValue('label') . '

'; $html .= '
'; - $html .= '
    '; + $html .= '
      '; // By default the database of tags are alphanumeric sorted foreach ($archives->db as $key => $fields) { @@ -52,7 +52,7 @@ class pluginArchives extends Plugin ($this->getValue('monthly') && strlen($key) != 4) || (!$this->getValue('monthly') && strlen($key) == 4) ) { - $html .= '
    • '; + $html .= '
    • '; $html .= ''; $html .= $fields['name']; $html .= ''; diff --git a/bl-plugins/navigation/plugin.php b/bl-plugins/navigation/plugin.php index 2f5a0a1a..a859f015 100644 --- a/bl-plugins/navigation/plugin.php +++ b/bl-plugins/navigation/plugin.php @@ -66,7 +66,7 @@ class pluginNavigation extends Plugin // Show Home page link if ($this->getValue('homeLink')) { $html .= '
    • '; - $html .= '' . $L->get('Home page') . ''; + $html .= '' . $L->get('Home') . ''; $html .= '
    • '; } diff --git a/bl-plugins/opengraph/plugin.php b/bl-plugins/opengraph/plugin.php index e8cfa57a..c781585c 100644 --- a/bl-plugins/opengraph/plugin.php +++ b/bl-plugins/opengraph/plugin.php @@ -5,23 +5,6 @@ class pluginOpenGraph extends Plugin public function init() { - // Fields and default values for the database of this plugin - $this->dbFields = array( - 'defaultImage' => '' - ); - } - - public function form() - { - global $L; - - $html = '
      '; - $html .= ''; - $html .= ''; - $html .= '' . $L->g('set-a-default-image-for-content') . ''; - $html .= '
      '; - - return $html; } public function siteHead() @@ -88,8 +71,9 @@ class pluginOpenGraph extends Plugin if ($src !== false) { $og['image'] = $src; } else { - if (Text::isNotEmpty($this->getValue('defaultImage'))) { - $og['image'] = $this->getValue('defaultImage'); + $thumb = MediaHelper::getDefaultThumbnail(); + if ($thumb != null) { + $og['image'] = $site->url() . "/" . $thumb->permalink(); } } } diff --git a/bl-plugins/popeye/languages/de_AT.json b/bl-plugins/popeye/languages/de_AT.json deleted file mode 100644 index f587cc41..00000000 --- a/bl-plugins/popeye/languages/de_AT.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Theme Popeye", - "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye." - }, - "enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.", - "enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.", - "relative": "Relativ", - "absolute": "Absolut", - "change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.", - "show-tags": "Schlagwörter zeigen", - "show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge." -} diff --git a/bl-plugins/popeye/languages/de_CH.json b/bl-plugins/popeye/languages/de_CH.json deleted file mode 100644 index f587cc41..00000000 --- a/bl-plugins/popeye/languages/de_CH.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Theme Popeye", - "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye." - }, - "enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.", - "enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.", - "relative": "Relativ", - "absolute": "Absolut", - "change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.", - "show-tags": "Schlagwörter zeigen", - "show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge." -} diff --git a/bl-plugins/popeye/languages/de_DE.json b/bl-plugins/popeye/languages/de_DE.json deleted file mode 100644 index f587cc41..00000000 --- a/bl-plugins/popeye/languages/de_DE.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Theme Popeye", - "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye." - }, - "enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.", - "enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.", - "relative": "Relativ", - "absolute": "Absolut", - "change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.", - "show-tags": "Schlagwörter zeigen", - "show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge." -} diff --git a/bl-plugins/popeye/languages/ja_JP.json b/bl-plugins/popeye/languages/ja_JP.json deleted file mode 100644 index f6a10d74..00000000 --- a/bl-plugins/popeye/languages/ja_JP.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Popeye Theme", - "description": "Popeyeテーマの設定を行うプラグインです。" - }, - "enable-or-disable-dark-mode": "ダークモードを有効または無効にします。", - "enable-or-disable-google-fonts": "Google Fontsの利用を有効または無効にします。", - "relative": "相対的", - "absolute": "絶対的", - "change-the-date-format-for-the-main-page": "メインページの日付表示形式を変更します。", - "show-tags": "タグの表示", - "show-tags-in-the-main-page-for-each-article": "メインページの各記事にタグを表示します。" -} diff --git a/bl-plugins/popeye/languages/nl_NL.json b/bl-plugins/popeye/languages/nl_NL.json deleted file mode 100644 index 6c37d571..00000000 --- a/bl-plugins/popeye/languages/nl_NL.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugin-data": - { - "name": "Popeye Thema", - "description": "Met deze plugin kan het thema Popeye geconfigureerd worden." - }, - "enable-or-disable-dark-mode": "Donkere modus in-/uitschakelen.", - "enable-or-disable-google-fonts": "Lettertypes van Google in-/uitschakelen.", - "relative": "Relatief", - "absolute": "Absoluut", - "change-the-date-format-for-the-main-page": "Het datumformaat voor de hoofdpagina aanpassen.", - "show-tags": "Tags tonen", - "show-tags-in-the-main-page-for-each-article": "Op de hoofdpagina voor ieder artikel de tags tonen." -} diff --git a/bl-plugins/popeye/metadata.json b/bl-plugins/popeye/metadata.json deleted file mode 100644 index 5feee3ec..00000000 --- a/bl-plugins/popeye/metadata.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "author": "Koblog", - "email": "", - "website": "https://plugins.koblog.com", - "version": "kb_0.0.1", - "releaseDate": "2023-07-10", - "license": "MIT", - "compatible": "kb_0.0.1", - "notes": "", - "type": "theme" -} diff --git a/bl-plugins/static-pages/plugin.php b/bl-plugins/static-pages/plugin.php index 7f2e424a..02fe0f04 100644 --- a/bl-plugins/static-pages/plugin.php +++ b/bl-plugins/static-pages/plugin.php @@ -58,7 +58,7 @@ class pluginStaticPages extends Plugin // Show Home page link if ($this->getValue('homeLink')) { $html .= '
    • '; - $html .= '' . $L->get('Home page') . ''; + $html .= '' . $L->get('Home') . ''; $html .= '
    • '; } diff --git a/bl-plugins/tags/plugin.php b/bl-plugins/tags/plugin.php index 7f599e99..850710b9 100644 --- a/bl-plugins/tags/plugin.php +++ b/bl-plugins/tags/plugin.php @@ -34,7 +34,7 @@ class pluginTags extends Plugin $html = '
      '; $html .= '

      ' . $this->getValue('label') . '

      '; $html .= '
      '; - $html .= '
        '; + $html .= '
          '; // By default the database of tags are alphanumeric sorted foreach ($tags->db as $key => $fields) { diff --git a/bl-themes/alternative/css/style.css b/bl-themes/alternative/css/style.css deleted file mode 100755 index 60b2aa3e..00000000 --- a/bl-themes/alternative/css/style.css +++ /dev/null @@ -1,150 +0,0 @@ -html { - position: relative; - min-height: 100%; -} - -body { - /* Padding top for navbar */ - padding-top: 56px; - /* Margin bottom for footer height */ - margin-bottom: 60px; -} - -section { - padding: 150px 0; -} - -img { - max-width: 100%; -} - -pre, -code { - background: #f8f8f8; - color: #333; -} - -pre { - border-left: 2px solid #ccc; - padding: 10px; -} - -code { - display: inline-block; - padding: 0 0.5em; - line-height: 1.4em; - border-radius: 3px; -} - -table { - empty-cells: show; - border: 1px solid #cbcbcb; - width: 100%; - font-size: 0.9em; - margin-bottom: 1rem; -} - -thead { - background-color: #e0e0e0; - color: #000; - text-align: left; - vertical-align: bottom; -} - -tr { - display: table-row; - vertical-align: inherit; - border-color: inherit; -} - -th, -td { - padding: 0.5em 1em; -} - -h1.title, -h2.title { - font-size: 2.3rem; -} - -blockquote { - padding: 10px 20px; - margin: 0 0 20px 20px; - border-left: 5px solid #eee; - font-style: italic; -} - -.bi { - margin-right: .5rem !important; -} - - -/* Paginator */ -.paginator { - margin-top: 20px; - margin-bottom: 80px; -} - -/* Navbar */ -img.nav-svg-icon { - width: 1rem; - height: 1rem; - padding-bottom: 2px; -} - -.nav-link { - font-size: 0.8em; -} - -/* Footer */ -footer { - position: absolute; - bottom: 0; - width: 100%; - height: 60px; - line-height: 60px; - font-size: 0.8em; -} - -.mini-logo { - height: 22px; - padding-bottom: 5px; -} - -/* Home - Header */ -header.welcome { - padding: 100px 0; -} - -/* Home - Page */ -section.home-page:nth-child(even) { - /* Alternate the background color */ - background: #FAFAFA; -} - -.page-cover-image { - background-size: cover; - background-position: center; -} - -.page-description { - color: #b5b5b5; - font-style: italic; -} - -/* VIDEO EMBED RESPONSIVE */ -.video-embed { - overflow: hidden; - padding-bottom: 56.25%; - /* 16:9 */ - position: relative; - height: 0; -} - -.video-embed iframe { - left: 0; - top: 0; - height: 100%; - width: 100%; - position: absolute; -} diff --git a/bl-themes/alternative/img/codepen.svg b/bl-themes/alternative/img/codepen.svg deleted file mode 100644 index a2e9dd0f..00000000 --- a/bl-themes/alternative/img/codepen.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - CodePen icon - - \ No newline at end of file diff --git a/bl-themes/alternative/img/facebook.svg b/bl-themes/alternative/img/facebook.svg deleted file mode 100644 index aec3d78f..00000000 --- a/bl-themes/alternative/img/facebook.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - Facebook icon - - \ No newline at end of file diff --git a/bl-themes/alternative/img/favicon.png b/bl-themes/alternative/img/favicon.png deleted file mode 100644 index 60349a2b..00000000 Binary files a/bl-themes/alternative/img/favicon.png and /dev/null differ diff --git a/bl-themes/alternative/img/github.svg b/bl-themes/alternative/img/github.svg deleted file mode 100644 index e5c51731..00000000 --- a/bl-themes/alternative/img/github.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - GitHub icon - - \ No newline at end of file diff --git a/bl-themes/alternative/img/gitlab.svg b/bl-themes/alternative/img/gitlab.svg deleted file mode 100644 index befb8db2..00000000 --- a/bl-themes/alternative/img/gitlab.svg +++ /dev/null @@ -1 +0,0 @@ -GitLab icon \ No newline at end of file diff --git a/bl-themes/alternative/img/instagram.svg b/bl-themes/alternative/img/instagram.svg deleted file mode 100644 index 10b83fe9..00000000 --- a/bl-themes/alternative/img/instagram.svg +++ /dev/null @@ -1 +0,0 @@ -Instagram icon diff --git a/bl-themes/alternative/img/linkedin.svg b/bl-themes/alternative/img/linkedin.svg deleted file mode 100644 index 144f8a8a..00000000 --- a/bl-themes/alternative/img/linkedin.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - LinkedIn icon - - \ No newline at end of file diff --git a/bl-themes/alternative/img/mastodon.svg b/bl-themes/alternative/img/mastodon.svg deleted file mode 100644 index c3d117ae..00000000 --- a/bl-themes/alternative/img/mastodon.svg +++ /dev/null @@ -1 +0,0 @@ -Mastodon icon \ No newline at end of file diff --git a/bl-themes/alternative/img/rss.svg b/bl-themes/alternative/img/rss.svg deleted file mode 100644 index 74d9c553..00000000 --- a/bl-themes/alternative/img/rss.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - RSS icon - - \ No newline at end of file diff --git a/bl-themes/alternative/img/telegram.svg b/bl-themes/alternative/img/telegram.svg deleted file mode 100644 index cc122b35..00000000 --- a/bl-themes/alternative/img/telegram.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/bl-themes/alternative/img/twitter.svg b/bl-themes/alternative/img/twitter.svg deleted file mode 100644 index e0476a28..00000000 --- a/bl-themes/alternative/img/twitter.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - Twitter icon - - \ No newline at end of file diff --git a/bl-themes/alternative/img/xing.svg b/bl-themes/alternative/img/xing.svg deleted file mode 100644 index b7e32647..00000000 --- a/bl-themes/alternative/img/xing.svg +++ /dev/null @@ -1 +0,0 @@ -Xing icon diff --git a/bl-themes/alternative/index.php b/bl-themes/alternative/index.php deleted file mode 100755 index 460a96de..00000000 --- a/bl-themes/alternative/index.php +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - googleFonts()) : ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bl-themes/alternative/init.php b/bl-themes/alternative/init.php deleted file mode 100644 index 41d11f94..00000000 --- a/bl-themes/alternative/init.php +++ /dev/null @@ -1,5 +0,0 @@ - -
          -

          footer(); ?> Powered by KOBLOG

          -
          - diff --git a/bl-themes/alternative/php/home.php b/bl-themes/alternative/php/home.php deleted file mode 100644 index 33f6e990..00000000 --- a/bl-themes/alternative/php/home.php +++ /dev/null @@ -1,112 +0,0 @@ - -
          -
          - -

          slogan(); ?>

          - - - description()) : ?> -

          description(); ?>

          - - - - -
          - - - -
          - -
          -
          - - -
          - p('No pages found') ?> -
          - - - - -
          -
          -
          -
          - - - - - -

          title(); ?>

          -
          - - - description()) : ?> -

          description(); ?>

          - - - -
          - contentBreak(); ?> -
          - - - readMore()) : ?> - - - - dateFormat() == 'relative') : ?> - relativeTime() ?> - dateFormat() == 'absolute') : ?> - date() ?> - - - - -
          -
          -
          -
          - - - - 1) : ?> - - diff --git a/bl-themes/alternative/php/navbar.php b/bl-themes/alternative/php/navbar.php deleted file mode 100644 index 6a17659f..00000000 --- a/bl-themes/alternative/php/navbar.php +++ /dev/null @@ -1,44 +0,0 @@ - diff --git a/bl-themes/alternative/php/page.php b/bl-themes/alternative/php/page.php deleted file mode 100644 index a34a3e10..00000000 --- a/bl-themes/alternative/php/page.php +++ /dev/null @@ -1,46 +0,0 @@ -
          -
          -
          -
          - - - - -

          title(); ?>

          - - isStatic() && !$url->notFound() && $themePlugin->showPostInformation()) : ?> -
          - - date() ?> - - - readingTime() . ' ' . $L->get('minutes') . ' ' . $L->g('read') ?> - - - user('nickname') ?> -
          - - - - description()) : ?> -

          description(); ?>

          - - - - coverImage()) : ?> -
          -
          -
          - - - -
          - content(); ?> -
          - - - -
          -
          -
          -
          diff --git a/bl-themes/blogx/css/style.css b/bl-themes/blogx/css/style.css deleted file mode 100755 index 45f386ab..00000000 --- a/bl-themes/blogx/css/style.css +++ /dev/null @@ -1,121 +0,0 @@ -html { - position: relative; - min-height: 100%; -} - -body { - /* Padding top for navbar */ - padding-top: 56px; - /* Margin bottom for footer height */ - margin-bottom: 60px; -} - -section { - padding: 150px 0; -} - -img { - max-width: 100%; -} - - -pre, -code { - background: #f8f8f8; - color: #333; -} - -pre { - border-left: 2px solid #ccc; - padding: 10px; -} - -code { - display: inline-block; - padding: 0 0.5em; - line-height: 1.4em; - border-radius: 3px; -} - -table { - empty-cells: show; - border: 1px solid #cbcbcb; - width: 100%; - font-size: 0.9em; - margin-bottom: 1rem; -} - -thead { - background-color: #e0e0e0; - color: #000; - text-align: left; - vertical-align: bottom; -} - -tr { - display: table-row; - vertical-align: inherit; - border-color: inherit; -} - -th, -td { - padding: 0.5em 1em; -} - -h1.title, -h2.title { - font-size: 2.3rem; -} - -blockquote { - padding: 10px 20px; - margin: 0 0 20px 20px; - border-left: 5px solid #eee; - font-style: italic; -} - -/* Navbar */ -img.nav-svg-icon { - width: 1rem; - height: 1rem; - padding-bottom: 2px; -} - -.nav-link { - font-size: 0.8em; -} - -/* Footer */ -footer { - position: absolute; - bottom: 0; - width: 100%; - height: 60px; - line-height: 60px; - font-size: 0.8em; -} - -.mini-logo { - height: 22px; - padding-bottom: 5px; -} - -/* Plugins */ -.plugin { - margin-top: 3rem; -} - -.plugin-label { - font-size: 1em; - text-transform: uppercase; -} - -.plugin ul { - list-style: none; - padding: 0 0 0 10px; -} - -.bi { - margin-right: .5rem !important; -} diff --git a/bl-themes/blogx/img/codepen.svg b/bl-themes/blogx/img/codepen.svg deleted file mode 100644 index a2e9dd0f..00000000 --- a/bl-themes/blogx/img/codepen.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - CodePen icon - - \ No newline at end of file diff --git a/bl-themes/blogx/img/facebook.svg b/bl-themes/blogx/img/facebook.svg deleted file mode 100644 index aec3d78f..00000000 --- a/bl-themes/blogx/img/facebook.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - Facebook icon - - \ No newline at end of file diff --git a/bl-themes/blogx/img/favicon.png b/bl-themes/blogx/img/favicon.png deleted file mode 100644 index 60349a2b..00000000 Binary files a/bl-themes/blogx/img/favicon.png and /dev/null differ diff --git a/bl-themes/blogx/img/github.svg b/bl-themes/blogx/img/github.svg deleted file mode 100644 index e5c51731..00000000 --- a/bl-themes/blogx/img/github.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - GitHub icon - - \ No newline at end of file diff --git a/bl-themes/blogx/img/gitlab.svg b/bl-themes/blogx/img/gitlab.svg deleted file mode 100644 index befb8db2..00000000 --- a/bl-themes/blogx/img/gitlab.svg +++ /dev/null @@ -1 +0,0 @@ -GitLab icon \ No newline at end of file diff --git a/bl-themes/blogx/img/googleplus.svg b/bl-themes/blogx/img/googleplus.svg deleted file mode 100644 index 3b221b4c..00000000 --- a/bl-themes/blogx/img/googleplus.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - Google+ icon - - \ No newline at end of file diff --git a/bl-themes/blogx/img/instagram.svg b/bl-themes/blogx/img/instagram.svg deleted file mode 100644 index 10b83fe9..00000000 --- a/bl-themes/blogx/img/instagram.svg +++ /dev/null @@ -1 +0,0 @@ -Instagram icon diff --git a/bl-themes/blogx/img/linkedin.svg b/bl-themes/blogx/img/linkedin.svg deleted file mode 100644 index 144f8a8a..00000000 --- a/bl-themes/blogx/img/linkedin.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - LinkedIn icon - - \ No newline at end of file diff --git a/bl-themes/blogx/img/mastodon.svg b/bl-themes/blogx/img/mastodon.svg deleted file mode 100644 index c3d117ae..00000000 --- a/bl-themes/blogx/img/mastodon.svg +++ /dev/null @@ -1 +0,0 @@ -Mastodon icon \ No newline at end of file diff --git a/bl-themes/blogx/img/rss.svg b/bl-themes/blogx/img/rss.svg deleted file mode 100644 index c47a1157..00000000 --- a/bl-themes/blogx/img/rss.svg +++ /dev/null @@ -1 +0,0 @@ -RSS icon \ No newline at end of file diff --git a/bl-themes/blogx/img/telegram.svg b/bl-themes/blogx/img/telegram.svg deleted file mode 100644 index cc122b35..00000000 --- a/bl-themes/blogx/img/telegram.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/bl-themes/blogx/img/twitter.svg b/bl-themes/blogx/img/twitter.svg deleted file mode 100644 index e0476a28..00000000 --- a/bl-themes/blogx/img/twitter.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - Twitter icon - - \ No newline at end of file diff --git a/bl-themes/blogx/img/xing.svg b/bl-themes/blogx/img/xing.svg deleted file mode 100644 index b7e32647..00000000 --- a/bl-themes/blogx/img/xing.svg +++ /dev/null @@ -1 +0,0 @@ -Xing icon diff --git a/bl-themes/blogx/index.php b/bl-themes/blogx/index.php deleted file mode 100755 index 20bda5e9..00000000 --- a/bl-themes/blogx/index.php +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - -
          -
          - - -
          - -
          - - -
          - -
          - -
          -
          - - - - - - - - - - - - \ No newline at end of file diff --git a/bl-themes/blogx/languages/de_CH.json b/bl-themes/blogx/languages/de_CH.json deleted file mode 100644 index 44c515a2..00000000 --- a/bl-themes/blogx/languages/de_CH.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Theme für Blogs mit Navigatiationsleiste mit statischen Seiten und Social Media Icons, rechter Seitenleiste und Angabe der Lesezeit." - } -} diff --git a/bl-themes/blogx/languages/de_DE.json b/bl-themes/blogx/languages/de_DE.json deleted file mode 100644 index 44c515a2..00000000 --- a/bl-themes/blogx/languages/de_DE.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Theme für Blogs mit Navigatiationsleiste mit statischen Seiten und Social Media Icons, rechter Seitenleiste und Angabe der Lesezeit." - } -} diff --git a/bl-themes/blogx/languages/en.json b/bl-themes/blogx/languages/en.json deleted file mode 100644 index ad936cd5..00000000 --- a/bl-themes/blogx/languages/en.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Theme for bloggers, with right sidebar, reading time and navbar with social icons and static pages." - } -} \ No newline at end of file diff --git a/bl-themes/blogx/languages/es.json b/bl-themes/blogx/languages/es.json deleted file mode 100644 index e71bd43a..00000000 --- a/bl-themes/blogx/languages/es.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Tema para bloggers, soporte para tiempo de lectura y barra de navegación con iconos sociales y páginas estáticas." - } -} \ No newline at end of file diff --git a/bl-themes/blogx/languages/fa_IR.json b/bl-themes/blogx/languages/fa_IR.json deleted file mode 100644 index 1ae3df3f..00000000 --- a/bl-themes/blogx/languages/fa_IR.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "قالبی برای وبلاگ نویس ها، به همراه نوار کناری، زمان مطالعه و نوار ناوبری به همراه آیکن های شبکه مجازی و صفحات استاتیک." - } -} diff --git a/bl-themes/blogx/languages/it.json b/bl-themes/blogx/languages/it.json deleted file mode 100644 index 4215130c..00000000 --- a/bl-themes/blogx/languages/it.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Tema per blogger, con barra laterale a destra, tempo di lettura e barra di navigazione con icone social e pagine statiche." - } -} diff --git a/bl-themes/blogx/languages/ja_JP.json b/bl-themes/blogx/languages/ja_JP.json deleted file mode 100644 index 276a27b9..00000000 --- a/bl-themes/blogx/languages/ja_JP.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "ブロガー向けテーマ。右サイドバー、読了時間、ソーシャルアイコンと固定ページへリンクするnavbarを備えています。" - } -} \ No newline at end of file diff --git a/bl-themes/blogx/languages/nl_NL.json b/bl-themes/blogx/languages/nl_NL.json deleted file mode 100644 index 1b5fb278..00000000 --- a/bl-themes/blogx/languages/nl_NL.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Thema voor bloggers, met zijbalk rechts, leestijdindicatie en navigatiebalk met social media en statische pagina's." - } -} \ No newline at end of file diff --git a/bl-themes/blogx/languages/ru_RU.json b/bl-themes/blogx/languages/ru_RU.json deleted file mode 100644 index 81bbdfbd..00000000 --- a/bl-themes/blogx/languages/ru_RU.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Тема подходит для блогеров, с боковой панелью справа. Присутствует информация о пнримерном временем чтения материала, есть блок навигации со значками социальных сетей и списом статических страниц." - } -} diff --git a/bl-themes/blogx/languages/tr_TR.json b/bl-themes/blogx/languages/tr_TR.json deleted file mode 100644 index 860e3a8d..00000000 --- a/bl-themes/blogx/languages/tr_TR.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme-data": - { - "name": "Blog X", - "description": "Blog yazarları için tema, sağ kenar çubuğu ile birlikte. Okuma süresi, kenar çubuğunda sosyal simgeler ve sabit sayfalar." - } -} diff --git a/bl-themes/blogx/php/footer.php b/bl-themes/blogx/php/footer.php deleted file mode 100644 index 771ef60b..00000000 --- a/bl-themes/blogx/php/footer.php +++ /dev/null @@ -1,5 +0,0 @@ -
          -
          -

          footer(); ?> Powered by KOBLOG

          -
          -
          diff --git a/bl-themes/blogx/php/head.php b/bl-themes/blogx/php/head.php deleted file mode 100644 index 39e7f068..00000000 --- a/bl-themes/blogx/php/head.php +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bl-themes/blogx/php/home.php b/bl-themes/blogx/php/home.php deleted file mode 100644 index c78c8f90..00000000 --- a/bl-themes/blogx/php/home.php +++ /dev/null @@ -1,74 +0,0 @@ - -
          - p('No pages found') ?> -
          - - - - -
          - - - - - - coverImage()) : ?> - Cover Image - - -
          - - -

          title(); ?>

          -
          - - -
          - date(); ?> - get('Reading time') . ': ' . $page->readingTime(); ?> -
          - - - contentBreak(); ?> - - - readMore()) : ?> - get('Read more'); ?> - - -
          - - - - -
          -
          - - - - 1) : ?> - - diff --git a/bl-themes/blogx/php/navbar.php b/bl-themes/blogx/php/navbar.php deleted file mode 100644 index c10dd66d..00000000 --- a/bl-themes/blogx/php/navbar.php +++ /dev/null @@ -1,32 +0,0 @@ - diff --git a/bl-themes/blogx/php/page.php b/bl-themes/blogx/php/page.php deleted file mode 100644 index 7c333339..00000000 --- a/bl-themes/blogx/php/page.php +++ /dev/null @@ -1,31 +0,0 @@ - -
          - - - - - - coverImage()): ?> - Cover Image - - -
          - - -

          title(); ?>

          -
          - - isStatic() && !$url->notFound()): ?> - -
          date(); ?> - get('Reading time') . ': ' . $page->readingTime() ?>
          - - - - content(); ?> - -
          - - - - -
          diff --git a/bl-themes/bootstrapTheme/css/01-style.css b/bl-themes/bootstrapTheme/css/01-style.css new file mode 100755 index 00000000..9129899e --- /dev/null +++ b/bl-themes/bootstrapTheme/css/01-style.css @@ -0,0 +1,4 @@ +.site-logo { + max-width: 100%; + height: auto; +} \ No newline at end of file diff --git a/bl-themes/bootstrapTheme/css/02-helpers.css b/bl-themes/bootstrapTheme/css/02-helpers.css new file mode 100644 index 00000000..e69de29b diff --git a/bl-themes/popeye/img/favicon.png b/bl-themes/bootstrapTheme/img/favicon.png similarity index 100% rename from bl-themes/popeye/img/favicon.png rename to bl-themes/bootstrapTheme/img/favicon.png diff --git a/bl-themes/popeye/img/popeye.png b/bl-themes/bootstrapTheme/img/popeye.png similarity index 100% rename from bl-themes/popeye/img/popeye.png rename to bl-themes/bootstrapTheme/img/popeye.png diff --git a/bl-themes/popeye/index.php b/bl-themes/bootstrapTheme/index.php similarity index 83% rename from bl-themes/popeye/index.php rename to bl-themes/bootstrapTheme/index.php index 51e4caed..c83b00ea 100755 --- a/bl-themes/popeye/index.php +++ b/bl-themes/bootstrapTheme/index.php @@ -27,29 +27,13 @@ 'css/01-style.css', 'css/02-helpers.css' )); - - # Apply the following CSS only for Dark Mode - if ($themePlugin->darkMode()) { - echo Theme::css( - 'css/99-darkmode.css' - ); - } ?> - googleFonts()) : ?> - - - - - + @@ -82,6 +66,16 @@ + diff --git a/bl-themes/popeye/init.php b/bl-themes/bootstrapTheme/init.php similarity index 100% rename from bl-themes/popeye/init.php rename to bl-themes/bootstrapTheme/init.php diff --git a/bl-themes/popeye/languages/de_AT.json b/bl-themes/bootstrapTheme/languages/de_AT.json similarity index 59% rename from bl-themes/popeye/languages/de_AT.json rename to bl-themes/bootstrapTheme/languages/de_AT.json index ae0c2dce..8d725a79 100644 --- a/bl-themes/popeye/languages/de_AT.json +++ b/bl-themes/bootstrapTheme/languages/de_AT.json @@ -1,8 +1,8 @@ { "theme-data": { - "name": "Popeye", - "description": "" + "name": "Bootstrap", + "description": "A simple bootstrap-based theme" }, "related-pages": "Verwandte Seiten", "minutes": "Minuten", diff --git a/bl-themes/popeye/languages/de_CH.json b/bl-themes/bootstrapTheme/languages/de_CH.json similarity index 59% rename from bl-themes/popeye/languages/de_CH.json rename to bl-themes/bootstrapTheme/languages/de_CH.json index 81fdac91..7a9b2369 100644 --- a/bl-themes/popeye/languages/de_CH.json +++ b/bl-themes/bootstrapTheme/languages/de_CH.json @@ -1,8 +1,8 @@ { "theme-data": { - "name": "Popeye", - "description": "" + "name": "Bootstrap", + "description": "A simple bootstrap-based theme" }, "related-pages": "Verwandte Seiten", "minutes": "Minuten", diff --git a/bl-themes/popeye/languages/de_DE.json b/bl-themes/bootstrapTheme/languages/de_DE.json similarity index 59% rename from bl-themes/popeye/languages/de_DE.json rename to bl-themes/bootstrapTheme/languages/de_DE.json index ae0c2dce..8d725a79 100644 --- a/bl-themes/popeye/languages/de_DE.json +++ b/bl-themes/bootstrapTheme/languages/de_DE.json @@ -1,8 +1,8 @@ { "theme-data": { - "name": "Popeye", - "description": "" + "name": "Bootstrap", + "description": "A simple bootstrap-based theme" }, "related-pages": "Verwandte Seiten", "minutes": "Minuten", diff --git a/bl-plugins/popeye/languages/en.json b/bl-themes/bootstrapTheme/languages/en.json similarity index 70% rename from bl-plugins/popeye/languages/en.json rename to bl-themes/bootstrapTheme/languages/en.json index 38cbbb36..023119f1 100644 --- a/bl-plugins/popeye/languages/en.json +++ b/bl-themes/bootstrapTheme/languages/en.json @@ -1,8 +1,12 @@ { - "plugin-data": { - "name": "Popeye Theme", - "description": "This plugin provides configuration for the Popeye theme." + "theme-data": + { + "name": "Bootstrap", + "description": "A simple bootstrap-based theme" }, + "related-pages": "Related pages", + "minutes": "minutes", + "read": "read", "enable-or-disable-dark-mode": "Enable or disable dark mode.", "enable-or-disable-google-fonts": "Enable or disable Google fonts.", "relative": "Relative", diff --git a/bl-themes/popeye/languages/ja_JP.json b/bl-themes/bootstrapTheme/languages/ja_JP.json similarity index 59% rename from bl-themes/popeye/languages/ja_JP.json rename to bl-themes/bootstrapTheme/languages/ja_JP.json index a5cb0dcf..d19e0b25 100644 --- a/bl-themes/popeye/languages/ja_JP.json +++ b/bl-themes/bootstrapTheme/languages/ja_JP.json @@ -1,8 +1,8 @@ { "theme-data": { - "name": "Popeye", - "description": "" + "name": "Bootstrap", + "description": "A simple bootstrap-based theme" }, "related-pages": "関連ページ", "minutes": "分", diff --git a/bl-themes/popeye/metadata.json b/bl-themes/bootstrapTheme/metadata.json similarity index 83% rename from bl-themes/popeye/metadata.json rename to bl-themes/bootstrapTheme/metadata.json index 56c87384..2be02817 100644 --- a/bl-themes/popeye/metadata.json +++ b/bl-themes/bootstrapTheme/metadata.json @@ -7,5 +7,6 @@ "license": "MIT", "compatible": "3.0", "notes": "", - "plugin": "popeye" + "plugin": "popeye", + "type": "theme" } diff --git a/bl-themes/bootstrapTheme/php/footer.php b/bl-themes/bootstrapTheme/php/footer.php new file mode 100644 index 00000000..d39e7392 --- /dev/null +++ b/bl-themes/bootstrapTheme/php/footer.php @@ -0,0 +1,8 @@ +
          +
          +

          + footer(); ?> - + get('Powered by'); ?> KOBLOG +

          +
          +
          diff --git a/bl-themes/popeye/php/home.php b/bl-themes/bootstrapTheme/php/home.php similarity index 55% rename from bl-themes/popeye/php/home.php rename to bl-themes/bootstrapTheme/php/home.php index ac51274c..d7f8b23b 100644 --- a/bl-themes/popeye/php/home.php +++ b/bl-themes/bootstrapTheme/php/home.php @@ -1,20 +1,30 @@
          -
          +
          + logo()) : ?> + description()) : ?> -
          -

          description(); ?>

          +
          +

          description(); ?>

          + + homepagePresentation() && ($WHERE_AM_I == 'home')) : ?> +
          +

          +
          + + +
          @@ -23,30 +33,6 @@
          - - - -
          - - -
          - - - -

          @@ -60,7 +46,7 @@ -
          +
          @@ -106,11 +92,9 @@ if ($themePlugin->showTags()) { $tagsList = $pageTmp->tags(true); if (!empty($tagsList)) { - echo ''; foreach ($tagsList as $tagKey => $tagName) { - echo '' . $tagName . ''; + echo '' . $tagName . ''; } - echo ''; } } ?> @@ -122,29 +106,9 @@ - 1) : ?> - - +
          + +
          diff --git a/bl-themes/bootstrapTheme/php/navbar.php b/bl-themes/bootstrapTheme/php/navbar.php new file mode 100644 index 00000000..9bcd413f --- /dev/null +++ b/bl-themes/bootstrapTheme/php/navbar.php @@ -0,0 +1,34 @@ + diff --git a/bl-themes/bootstrapTheme/php/page.php b/bl-themes/bootstrapTheme/php/page.php new file mode 100644 index 00000000..de5eda9f --- /dev/null +++ b/bl-themes/bootstrapTheme/php/page.php @@ -0,0 +1,40 @@ +
          +
          +
          +
          + + + + isStatic() && !$url->notFound()) : ?> +
          + + date() ?> + + + readingTime() . ' ' . $L->get('minutes') . ' ' . $L->g('read') ?> + + + user('displayName') ?> +
          + + + +

          title(); ?>

          + + + description()) : ?> +

          description(); ?>

          +
          + + + +
          + content(); ?> +
          + + + +
          +
          +
          +
          \ No newline at end of file diff --git a/bl-plugins/popeye/plugin.php b/bl-themes/bootstrapTheme/plugin.php similarity index 53% rename from bl-plugins/popeye/plugin.php rename to bl-themes/bootstrapTheme/plugin.php index 6f9e8ce0..465a5e7f 100644 --- a/bl-plugins/popeye/plugin.php +++ b/bl-themes/bootstrapTheme/plugin.php @@ -6,8 +6,6 @@ class popeye extends Plugin public function init() { $this->dbFields = array( - 'googleFonts' => true, - 'darkMode' => true, 'dateFormat' => 'relative', 'showTags' => true ); @@ -17,24 +15,6 @@ class popeye extends Plugin { global $L; - $html = '
          '; - $html .= ''; - $html .= ''; - $html .= '
          ' . $L->get('Enable or disable dark mode.') . '
          '; - $html .= '
          '; - - $html .= '
          '; - $html .= ''; - $html .= ''; - $html .= '
          ' . $L->get('Enable or disable Google fonts.') . '
          '; - $html .= '
          '; - $html .= '
          '; $html .= ''; $html .= '