From 47b2f31431156c39ea75ed1e97cbb5d17e0377a1 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sat, 24 Feb 2018 22:39:39 +0100 Subject: [PATCH] Clean themes --- bl-kernel/boot/init.php | 8 +- bl-plugins/navigation/languages/en.json | 2 +- bl-plugins/navigation/plugin.php | 122 +- bl-themes/alternative/css/style.css | 55 + bl-themes/alternative/metadata.json | 6 +- bl-themes/alternative/php/footer.php | 2 +- bl-themes/alternative/php/head.php | 2 +- bl-themes/alternative/php/home.php | 42 +- bl-themes/alternative/php/navbar.php | 2 +- bl-themes/alternative/php/page.php | 2 +- bl-themes/blogx/css/style.css | 37 + bl-themes/blogx/metadata.json | 6 +- bl-themes/blogx/php/home.php | 6 +- bl-themes/blogx/php/page.php | 4 +- bl-themes/docsx/metadata.json | 6 +- bl-themes/kernel-panic/css/bludit.css | 131 - bl-themes/kernel-panic/css/style.css | 8253 ------------------- bl-themes/kernel-panic/img/favicon.png | Bin 1025 -> 0 bytes bl-themes/kernel-panic/index.php | 63 - bl-themes/kernel-panic/js/respond.min.js | 6 - bl-themes/kernel-panic/languages/de_CH.json | 7 - bl-themes/kernel-panic/languages/de_DE.json | 7 - bl-themes/kernel-panic/languages/en.json | 7 - bl-themes/kernel-panic/languages/es.json | 7 - bl-themes/kernel-panic/metadata.json | 10 - bl-themes/kernel-panic/php/head.php | 24 - bl-themes/kernel-panic/php/home.php | 40 - bl-themes/kernel-panic/php/page.php | 20 - bl-themes/kernel-panic/php/sidebar.php | 1 - 29 files changed, 207 insertions(+), 8671 deletions(-) delete mode 100755 bl-themes/kernel-panic/css/bludit.css delete mode 100755 bl-themes/kernel-panic/css/style.css delete mode 100644 bl-themes/kernel-panic/img/favicon.png delete mode 100755 bl-themes/kernel-panic/index.php delete mode 100755 bl-themes/kernel-panic/js/respond.min.js delete mode 100644 bl-themes/kernel-panic/languages/de_CH.json delete mode 100644 bl-themes/kernel-panic/languages/de_DE.json delete mode 100644 bl-themes/kernel-panic/languages/en.json delete mode 100644 bl-themes/kernel-panic/languages/es.json delete mode 100644 bl-themes/kernel-panic/metadata.json delete mode 100644 bl-themes/kernel-panic/php/head.php delete mode 100644 bl-themes/kernel-panic/php/home.php delete mode 100644 bl-themes/kernel-panic/php/page.php delete mode 100644 bl-themes/kernel-panic/php/sidebar.php diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 122e97fe..a0644987 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -1,10 +1,10 @@ The order of the content is taken from the advanced settings of Bludit." }, "home-link": "Home link", diff --git a/bl-plugins/navigation/plugin.php b/bl-plugins/navigation/plugin.php index 899dc7f6..a493c083 100644 --- a/bl-plugins/navigation/plugin.php +++ b/bl-plugins/navigation/plugin.php @@ -8,7 +8,9 @@ class pluginNavigation extends Plugin { $this->dbFields = array( 'label'=>'Navigation', 'homeLink'=>true, - 'amountOfItems'=>5 + 'amountOfItems'=>5, + 'staticPages'=>true, + 'pages'=>true ); } @@ -29,14 +31,31 @@ class pluginNavigation extends Plugin { $html .= ''; $html .= ''; $html .= ''; - $html .= ''.$Language->get('Show the home link on the sidebar').''; $html .= ''; $html .= '
'; - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; $html .= '
'; + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + + if (ORDER_BY=='date') { + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + } + return $html; } @@ -47,19 +66,6 @@ class pluginNavigation extends Plugin { global $Url; global $Site; global $dbPages; - global $pagesByParent; - - // Amount of pages to show - $amountOfItems = $this->getValue('amountOfItems'); - - // Page number the first one - $pageNumber = 1; - - // Only published pages - $onlyPublished = true; - - // Get the list of pages - $pages = $dbPages->getList($pageNumber, $amountOfItems, $onlyPublished, true); // HTML for sidebar $html = '
'; @@ -73,46 +79,58 @@ class pluginNavigation extends Plugin { $html .= '
'; $html .= '
    '; - if(ORDER_BY==='position') { - foreach($pagesByParent[PARENT] as $Parent) { - $html .= '
  • '; - $html .= '

    '; - $html .= $Parent->title(); - $html .= '

    '; + // Show Home page link + if ($this->getValue('homeLink')) { + $html .= '
  • '; + $html .= '' . $Language->get('Home page') . ''; + $html .= '
  • '; + } - if(!empty($pagesByParent[$Parent->key()])) { - $html .= ''; - } + // Show static pages + if ($this->getValue('staticPages')) { + $staticPages = buildStaticPages(); + foreach ($staticPages as $page) { + $html .= '
  • '; + $html .= '' . $page->title() . ''; $html .= '
  • '; } } - else { - // Show Home page link - if( $this->getValue('homeLink') ) { - $html .= '
  • '; - $html .= ''; - $html .= $Language->get('Home page'); - $html .= ''; - $html .= '
  • '; - } - // Get keys of pages - foreach($pages as $pageKey) { - // Create the page object from the page key - $page = buildPage($pageKey); - $html .= '
  • '; - $html .= ''; - $html .= $page->title(); - $html .= ''; - $html .= '
  • '; + // Show pages + if ($this->getValue('pages')) { + if (ORDER_BY=='position') { + // Get parents + $parents = buildParentPages(); + foreach ($parents as $parent) { + $html .= '
  • '; + $html .= '' . $parent->title() . ''; + + if ($parent->hasChildren()) { + // Get children + $children = $parent->children(); + $html .= '
      '; + foreach ($children as $child) { + $html .= '
    • '; + $html .= '' . $child->title() . ''; + $html .= '
    • '; + } + $html .= '
    '; + } + $html .= '
  • '; + } + } else { + // List of published pages + $onlyPublished = true; + $pageNumber = 1; + $amountOfItems = $this->getValue('amountOfItems'); + $publishedPages = $dbPages->getList($pageNumber, $amountOfItems, $onlyPublished); + + foreach ($publishedPages as $pageKey) { + $page = buildPage($pageKey); + $html .= '
  • '; + $html .= '' . $page->title() . ''; + $html .= '
  • '; + } } } diff --git a/bl-themes/alternative/css/style.css b/bl-themes/alternative/css/style.css index 216ba061..743fa379 100755 --- a/bl-themes/alternative/css/style.css +++ b/bl-themes/alternative/css/style.css @@ -18,6 +18,47 @@ img { max-width: 100%; } +pre { + background: #eee; + padding: 10px; +} + +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; +} + +/* Paginator */ +.paginator { + margin-top: 20px; + margin-bottom: 80px; +} + /* Navbar */ .navbar-nav-svg { display: inline-block; @@ -61,3 +102,17 @@ section.home-page:nth-child(even) { /* Alternate the background color */ background-position: center; } +/* 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; +} \ No newline at end of file diff --git a/bl-themes/alternative/metadata.json b/bl-themes/alternative/metadata.json index 2f4c3888..aef93f86 100644 --- a/bl-themes/alternative/metadata.json +++ b/bl-themes/alternative/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://themes.bludit.com", - "version": "2.2", - "releaseDate": "2018-01-23", + "version": "2.3", + "releaseDate": "2018-02-20", "license": "MIT", - "compatible": "2.2", + "compatible": "2.3", "notes": "" } \ No newline at end of file diff --git a/bl-themes/alternative/php/footer.php b/bl-themes/alternative/php/footer.php index e6d9bcc8..95bfe75a 100644 --- a/bl-themes/alternative/php/footer.php +++ b/bl-themes/alternative/php/footer.php @@ -2,4 +2,4 @@

    footer(); ?>Powered byBludit

    - \ No newline at end of file + diff --git a/bl-themes/alternative/php/head.php b/bl-themes/alternative/php/head.php index 2de19368..d002c3c9 100644 --- a/bl-themes/alternative/php/head.php +++ b/bl-themes/alternative/php/head.php @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/bl-themes/alternative/php/home.php b/bl-themes/alternative/php/home.php index 9cfbec96..705532f0 100644 --- a/bl-themes/alternative/php/home.php +++ b/bl-themes/alternative/php/home.php @@ -22,7 +22,7 @@ -

    title() ?>

    +

    title() ?>

    @@ -45,26 +45,28 @@ 1): ?> - +
+ diff --git a/bl-themes/alternative/php/navbar.php b/bl-themes/alternative/php/navbar.php index 50ae8dfb..1aa73206 100644 --- a/bl-themes/alternative/php/navbar.php +++ b/bl-themes/alternative/php/navbar.php @@ -75,4 +75,4 @@
- \ No newline at end of file + diff --git a/bl-themes/alternative/php/page.php b/bl-themes/alternative/php/page.php index 649e22e1..f6de8b1e 100644 --- a/bl-themes/alternative/php/page.php +++ b/bl-themes/alternative/php/page.php @@ -6,7 +6,7 @@ -

title() ?>

+

title() ?>

-

title(); ?>

+

title(); ?>

-
date(); ?> - get('Reading time') . ': ' . $page->readingTime(); ?>
+
date(); ?> - get('Reading time') . ': ' . $page->readingTime(); ?>
contentBreak(); ?> @@ -35,7 +35,7 @@ 1): ?>