From 9ed58a69a0d6da8d4e782ae17f1cea42def612d8 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 30 Dec 2023 04:06:12 +0000 Subject: [PATCH] [setup] drop hideable setup sections this is mostly-broken; and when it works, it is confusing; and the code is bad --- ext/setup/theme.php | 5 ++--- themes/lite/setup.theme.php | 34 +------------------------------ themes/lite/themelet.class.php | 3 --- themes/lite/user_config.theme.php | 34 +------------------------------ 4 files changed, 4 insertions(+), 72 deletions(-) diff --git a/ext/setup/theme.php b/ext/setup/theme.php index bebf977a..0baa14ca 100644 --- a/ext/setup/theme.php +++ b/ext/setup/theme.php @@ -94,11 +94,10 @@ class SetupTheme extends Themelet { $h = $block->header; $b = $block->body; - $i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup"; $html = "
- $h -
$b
+ $h +
$b
"; return $html; diff --git a/themes/lite/setup.theme.php b/themes/lite/setup.theme.php index 5aa3824e..b1e90085 100644 --- a/themes/lite/setup.theme.php +++ b/themes/lite/setup.theme.php @@ -4,43 +4,11 @@ declare(strict_types=1); namespace Shimmie2; -/** - * Class CustomSetupTheme - * - * A customised version of the Setup theme. - * - */ class CustomSetupTheme extends SetupTheme { protected function sb_to_html(SetupBlock $block): string { - $h = $block->header; - $b = $block->body; - $i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup"; - $html = " - -
- $h -
$b
-
- "; - + $html = parent::sb_to_html($block); return "
$html
"; } } diff --git a/themes/lite/themelet.class.php b/themes/lite/themelet.class.php index 923c50d6..fd293a38 100644 --- a/themes/lite/themelet.class.php +++ b/themes/lite/themelet.class.php @@ -8,9 +8,6 @@ use MicroHTML\HTMLElement; use function MicroHTML\{A,DIV,SPAN,joinHTML}; -/** - * Class Themelet - */ class Themelet extends BaseThemelet { public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false) diff --git a/themes/lite/user_config.theme.php b/themes/lite/user_config.theme.php index 2ad74f78..46d74818 100644 --- a/themes/lite/user_config.theme.php +++ b/themes/lite/user_config.theme.php @@ -4,43 +4,11 @@ declare(strict_types=1); namespace Shimmie2; -/** - * Class CustomSetupTheme - * - * A customised version of the Setup theme. - * - */ class CustomUserConfigTheme extends UserConfigTheme { protected function sb_to_html(SetupBlock $block): string { - $h = $block->header; - $b = $block->body; - $i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup"; - $html = " - -
- $h -
$b
-
- "; - + $html = parent::sb_to_html($block); return "
$html
"; } }