From 92b91bfde61d406a20dd84b45a10041958e0eaaa Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 22 Nov 2021 10:57:27 +0100 Subject: [PATCH] Refactor Alternative theme for Bludit v4 and include plugin for settings --- bl-plugins/alternative/languages/de_AT.json | 14 +++++ bl-plugins/alternative/languages/de_CH.json | 14 +++++ bl-plugins/alternative/languages/de_DE.json | 14 +++++ bl-plugins/alternative/languages/en.json | 14 +++++ bl-plugins/alternative/languages/ja_JP.json | 14 +++++ bl-plugins/alternative/metadata.json | 11 ++++ bl-plugins/alternative/plugin.php | 33 ++++++++++ bl-themes/alternative/css/style.css | 19 ++++++ bl-themes/alternative/index.php | 41 ++++++++----- bl-themes/alternative/init.php | 5 ++ bl-themes/alternative/metadata.json | 7 ++- bl-themes/alternative/php/footer.php | 4 +- bl-themes/alternative/php/home.php | 6 +- bl-themes/alternative/php/navbar.php | 68 +++++++++------------ bl-themes/blogx/init.php | 2 +- bl-themes/blogx/php/navbar.php | 50 +++++++-------- bl-themes/popeye/init.php | 2 +- 17 files changed, 228 insertions(+), 90 deletions(-) create mode 100644 bl-plugins/alternative/languages/de_AT.json create mode 100644 bl-plugins/alternative/languages/de_CH.json create mode 100644 bl-plugins/alternative/languages/de_DE.json create mode 100644 bl-plugins/alternative/languages/en.json create mode 100644 bl-plugins/alternative/languages/ja_JP.json create mode 100644 bl-plugins/alternative/metadata.json create mode 100644 bl-plugins/alternative/plugin.php create mode 100644 bl-themes/alternative/init.php diff --git a/bl-plugins/alternative/languages/de_AT.json b/bl-plugins/alternative/languages/de_AT.json new file mode 100644 index 00000000..41c85249 --- /dev/null +++ b/bl-plugins/alternative/languages/de_AT.json @@ -0,0 +1,14 @@ +{ + "plugin-data": + { + "name": "Alternative Alternative", + "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Alternative." + }, + "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 new file mode 100644 index 00000000..d4a1b62d --- /dev/null +++ b/bl-plugins/alternative/languages/de_CH.json @@ -0,0 +1,14 @@ +{ + "plugin-data": + { + "name": "Theme Alternative", + "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Alternative." + }, + "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 new file mode 100644 index 00000000..d4a1b62d --- /dev/null +++ b/bl-plugins/alternative/languages/de_DE.json @@ -0,0 +1,14 @@ +{ + "plugin-data": + { + "name": "Theme Alternative", + "description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Alternative." + }, + "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 new file mode 100644 index 00000000..492a312b --- /dev/null +++ b/bl-plugins/alternative/languages/en.json @@ -0,0 +1,14 @@ +{ + "plugin-data": + { + "name": "Alternative Theme", + "description": "This plugin provides configuration for the theme Alternative." + }, + "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 in the main page for each article." +} diff --git a/bl-plugins/alternative/languages/ja_JP.json b/bl-plugins/alternative/languages/ja_JP.json new file mode 100644 index 00000000..a28fa023 --- /dev/null +++ b/bl-plugins/alternative/languages/ja_JP.json @@ -0,0 +1,14 @@ +{ + "plugin-data": + { + "name": "Alternative Theme", + "description": "Alternativeテーマの設定を行うプラグインです。" + }, + "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/metadata.json b/bl-plugins/alternative/metadata.json new file mode 100644 index 00000000..0ff7a171 --- /dev/null +++ b/bl-plugins/alternative/metadata.json @@ -0,0 +1,11 @@ +{ + "author": "Bludit", + "email": "", + "website": "https://plugins.bludit.com", + "version": "4.0.0", + "releaseDate": "2021-05-23", + "license": "MIT", + "compatible": "4.0.0", + "notes": "", + "type": "theme" +} \ No newline at end of file diff --git a/bl-plugins/alternative/plugin.php b/bl-plugins/alternative/plugin.php new file mode 100644 index 00000000..295cecd3 --- /dev/null +++ b/bl-plugins/alternative/plugin.php @@ -0,0 +1,33 @@ +dbFields = array( + 'googleFonts'=>false + ); + } + + public function form() + { + global $L; + + $html = '
'; + $html .= ''; + $html .= ''; + $html .= '
'.$L->get('Enable or disable Google fonts.').'
'; + $html .= '
'; + + return $html; + } + + public function googleFonts() + { + return $this->getValue('googleFonts'); + } + +} \ No newline at end of file diff --git a/bl-themes/alternative/css/style.css b/bl-themes/alternative/css/style.css index 8bcbbe47..91177422 100755 --- a/bl-themes/alternative/css/style.css +++ b/bl-themes/alternative/css/style.css @@ -18,6 +18,11 @@ img { max-width: 100%; } +a { + color: #004ab7; + text-decoration: none; +} + pre, code { background: #f8f8f8; color: #333; @@ -139,3 +144,17 @@ section.home-page:nth-child(even) { /* Alternate the background color */ width:100%; position:absolute; } + +/* Icons */ +.bi { + margin-right: .5rem!important; + } + +/* Remove Focus glow */ +.btn:focus, +.form-control:focus, +.form-select:focus, +input:focus { + outline: none !important; + box-shadow: none !important; +} \ No newline at end of file diff --git a/bl-themes/alternative/index.php b/bl-themes/alternative/index.php index 36bdad69..c3fdef6b 100755 --- a/bl-themes/alternative/index.php +++ b/bl-themes/alternative/index.php @@ -1,27 +1,38 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + + + + googleFonts()): ?> + + + + + + diff --git a/bl-themes/alternative/init.php b/bl-themes/alternative/init.php new file mode 100644 index 00000000..eaf07408 --- /dev/null +++ b/bl-themes/alternative/init.php @@ -0,0 +1,5 @@ +
-

footer(); ?>Powered byBludit

+

footer(); ?>Powered by Bludit - Open source CMS

- + \ No newline at end of file diff --git a/bl-themes/alternative/php/home.php b/bl-themes/alternative/php/home.php index 79db6012..9a97138b 100644 --- a/bl-themes/alternative/php/home.php +++ b/bl-themes/alternative/php/home.php @@ -11,9 +11,9 @@ -
- - +
+ +