diff options
author | Mario <mario@mariovavti.com> | 2024-09-30 06:22:28 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-09-30 06:22:28 +0000 |
commit | 18f388705069ba919aaa75acb06f0ccedf602bb4 (patch) | |
tree | 33c663d4a4da6c857514fb90d61add707dda7814 | |
parent | 2cc962e53afe205534e7113ca3cef0669bafa639 (diff) | |
parent | 5b93aa1148d647026b309e4f9e0eeca4f09d53ee (diff) | |
download | volse-hubzilla-18f388705069ba919aaa75acb06f0ccedf602bb4.tar.gz volse-hubzilla-18f388705069ba919aaa75acb06f0ccedf602bb4.tar.bz2 volse-hubzilla-18f388705069ba919aaa75acb06f0ccedf602bb4.zip |
Merge branch 'more-help-improvements' into 'dev'
Fix help for other languages than english
See merge request hubzilla/core!2144
-rw-r--r-- | Zotlabs/Module/Help.php | 4 | ||||
-rw-r--r-- | tests/unit/Module/HelpTest.php | 4 | ||||
-rw-r--r-- | view/css/mod_help.css | 21 | ||||
-rw-r--r-- | view/js/mod_help.js | 11 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 14 | ||||
-rw-r--r-- | view/tpl/help.tpl | 17 |
6 files changed, 33 insertions, 38 deletions
diff --git a/Zotlabs/Module/Help.php b/Zotlabs/Module/Help.php index cacc81607..fc0ef2708 100644 --- a/Zotlabs/Module/Help.php +++ b/Zotlabs/Module/Help.php @@ -30,7 +30,7 @@ class Help extends \Zotlabs\Web\Controller { $this->determine_help_language(); if (empty($_REQUEST['search']) && argc() === 1) { - goaway("/help/{$this->lang['language']}/about/about"); + goaway("/help/about/about"); killme(); } } @@ -155,7 +155,7 @@ class Help extends \Zotlabs\Web\Controller { } if (empty($args)) { - goaway("/help/{$this->lang['language']}/about/about"); + goaway("/help/about/about"); } // Keep the first remaining arg as the heading slug diff --git a/tests/unit/Module/HelpTest.php b/tests/unit/Module/HelpTest.php index 2c1d31570..1feef26a8 100644 --- a/tests/unit/Module/HelpTest.php +++ b/tests/unit/Module/HelpTest.php @@ -81,8 +81,8 @@ class HelpTest extends \Zotlabs\Tests\Unit\Module\TestCase { $this->get('help'); } - public function test_getting_locale_with_no_topic_should_redirect_to_about_page_for_locale(): void { - $this->expectRedirectTo('help/de/about/about'); + public function test_getting_locale_with_no_topic_should_redirect_to_about_page(): void { + $this->expectRedirectTo('help/about/about'); $this->get('help/de'); } diff --git a/view/css/mod_help.css b/view/css/mod_help.css index 3c3bc195f..d596048c9 100644 --- a/view/css/mod_help.css +++ b/view/css/mod_help.css @@ -11,10 +11,22 @@ padding-bottom: 0.3em; } +#doco-content img { + width: 100%; +} + #region_1 .widget ul ul { list-style-type: none; } +#doco-top-toc-wrapper { + margin-bottom: 1em; +} + +#doco-top-toc-wrapper > summary { + font-size: large; +} + .toc-content li, #doco-top-toc li { padding: 3px 0px; @@ -24,3 +36,12 @@ padding-left: 20px; } +.selected-doco-nav > a { + font-weight: bold; + color: var(--bs-link-hover-color); +} + +#help-content pre code { + overflow-x: auto; + white-space: pre; +} diff --git a/view/js/mod_help.js b/view/js/mod_help.js index abd0d1194..8308f23ec 100644 --- a/view/js/mod_help.js +++ b/view/js/mod_help.js @@ -1,14 +1,3 @@ -function docoTocToggle() { - if ($('#doco-top-toc').is(':visible')) { - $('#doco-toc-toggle').removeClass('bi-gear').addClass('bi-caret-right'); - } else { - $('#doco-toc-toggle').removeClass('bi-caret-right').addClass('bi-caret-down'); - } - $('#doco-top-toc').toggle(); - - return false; -} - toc = {}; // Generate the table of contents in the side nav menu (see view/tpl/help.tpl) $(document).ready(function () { diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index ec8ce42b3..6e6e19532 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -150,20 +150,6 @@ input[type=text], textarea { color: var(--bs-body-color); } -.selected-doco-nav { - font-weight: bold; - text-shadow: 2px 2px 3px lightgray; -} - -#doco-content img { - width: 100%; -} - -#help-content pre code { - overflow-x: auto; - white-space: pre; -} - .heart { color: #FF0000; } diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl index 68e1c6694..8b7669c75 100644 --- a/view/tpl/help.tpl +++ b/view/tpl/help.tpl @@ -7,14 +7,13 @@ {{$module->missing_translation_message()}} </div> {{/if}} - <div class="section-content-wrapper" id="doco-content"> - <h3 id="doco-top-toc-heading"> - <span class="fakelink" onclick="docoTocToggle(); return false;"> - <i class="bi bi-caret-right fakelink" id="doco-toc-toggle"></i> - {{$module->get_toc_heading()}} - </span> - </h3> - <ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul> - {{$module->render_content()}} + <div class="section-content-wrapper"> + <details id="doco-top-toc-wrapper"> + <summary id="doco-top-toc-heading">{{$module->get_toc_heading()}}</summary> + <ul id="doco-top-toc"></ul> + </details> + <div id="doco-content"> + {{$module->render_content()}} + </div> </div> </div> |