From 9543883f9f5f5228baa3306503d82c80ea0e980e Mon Sep 17 00:00:00 2001 From: nonmakina Date: Tue, 29 Dec 2020 02:44:47 -0600 Subject: [PATCH] Adds boardlist to homepage creation (top bar). Standardizes tabs or spaces in some files. Adds css rules for better mobile experience. --- templates/themes/categories/frames.html | 39 +++++++++++++++---------- templates/themes/categories/theme.php | 26 +++++++++-------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/templates/themes/categories/frames.html b/templates/themes/categories/frames.html index 4eee505a..4659e360 100644 --- a/templates/themes/categories/frames.html +++ b/templates/themes/categories/frames.html @@ -4,8 +4,8 @@ - - - {{ settings.title }} + @media (max-width:768px) { + .sidebar { + width: 80vw; + border: none; + } + .main { + flex-direction: column; + align-items: center; + } + + .boardlist { + display: none; + } + + footer { + display: none; + } + } + + {{ settings.title }} - {% include 'themes/categories/' ~ settings.file_sidebar %} - {% include 'themes/categories/' ~ settings.file_news %} + {% include 'themes/categories/' ~ settings.file_sidebar %} + {% include 'themes/categories/' ~ settings.file_news %} diff --git a/templates/themes/categories/theme.php b/templates/themes/categories/theme.php index 3731badb..14072bcc 100644 --- a/templates/themes/categories/theme.php +++ b/templates/themes/categories/theme.php @@ -29,14 +29,16 @@ public static function homepage($settings) { global $config; - return Element( - 'themes/categories/frames.html', - Array( - 'config' => $config, - 'settings' => $settings, - 'categories' => Categories::getCategories($config) - ) - ); + return Element( + 'themes/categories/frames.html', + Array( + 'config' => $config, + 'settings' => $settings, + 'categories' => Categories::getCategories($config), + 'boardlist' => createBoardlist(false) + + ) + ); } // Build news page @@ -50,7 +52,7 @@ 'settings' => $settings, 'config' => $config, 'news' => $news, - 'boardlist' => createBoardlist(false) + 'boardlist' => createBoardlist(false) )); } @@ -65,7 +67,7 @@ )); } - private static function getCategories($config) { + private static function getCategories($config) { $categories = $config['categories']; foreach ($categories as &$boards) { @@ -77,8 +79,8 @@ } } - return $categories; - } + return $categories; + } }; ?>