From 3ecd5870d57984f1eff183f076be05c9f115c09a Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 5 Oct 2023 13:05:22 +0200 Subject: [PATCH] Move inline docs to online documentation Signed-off-by: Simon L --- apps/settings/css/help.css | 35 +++++++---- .../lib/Controller/HelpController.php | 12 +--- apps/settings/templates/help.php | 60 +++++++------------ core/doc/admin/index.html | 2 - core/doc/user/index.html | 2 - 5 files changed, 49 insertions(+), 62 deletions(-) delete mode 100644 core/doc/admin/index.html delete mode 100644 core/doc/user/index.html diff --git a/apps/settings/css/help.css b/apps/settings/css/help.css index a18538c20e662..e7ce93da83c16 100644 --- a/apps/settings/css/help.css +++ b/apps/settings/css/help.css @@ -1,16 +1,31 @@ -.help-includes { - overflow: hidden !important; -} - .help-list__text { margin-left: 24px; } -.help-iframe { - width: 100%; +.help-wrapper { + display: flex; + justify-content: center; + align-items: center; height: 100%; - margin: 0; - padding: 0; - border: 0; - overflow: auto; + width: 100%; +} + +.help-content__heading { + text-align: center; + padding: 20px; +} + +.help-content { + display: block; + padding: 20px; +} + +.help-content__body { + display: flex; + justify-content: center; + align-items: center; +} + +.help-content__body > a { + margin: 20px; } diff --git a/apps/settings/lib/Controller/HelpController.php b/apps/settings/lib/Controller/HelpController.php index aa850b7d42e74..8e5bd74cc90eb 100644 --- a/apps/settings/lib/Controller/HelpController.php +++ b/apps/settings/lib/Controller/HelpController.php @@ -87,24 +87,16 @@ public function help(string $mode = 'user'): TemplateResponse { $mode = 'user'; } - $documentationUrl = $this->urlGenerator->getAbsoluteURL( - $this->urlGenerator->linkTo('', 'core/doc/' . $mode . '/index.html') - ); - - $urlUserDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'user']); - $urlAdminDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'admin']); + $urlUserDocs = $this->urlGenerator->linkToDocs('user'); + $urlAdminDocs = $this->urlGenerator->linkToDocs('admin'); $response = new TemplateResponse('settings', 'help', [ 'admin' => $this->groupManager->isAdmin($this->userId), - 'url' => $documentationUrl, 'urlUserDocs' => $urlUserDocs, 'urlAdminDocs' => $urlAdminDocs, 'mode' => $mode, 'pageTitle' => $pageTitle, ]); - $policy = new ContentSecurityPolicy(); - $policy->addAllowedFrameDomain('\'self\''); - $response->setContentSecurityPolicy($policy); return $response; } } diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php index 18cba18559a51..d2df54ef4e075 100644 --- a/apps/settings/templates/help.php +++ b/apps/settings/templates/help.php @@ -1,48 +1,32 @@ - - -
- +
+ diff --git a/core/doc/admin/index.html b/core/doc/admin/index.html deleted file mode 100644 index ac24d0503bf9f..0000000000000 --- a/core/doc/admin/index.html +++ /dev/null @@ -1,2 +0,0 @@ -Here goes the admin documentation. -In the meantime go to nextcloud.com/support/ diff --git a/core/doc/user/index.html b/core/doc/user/index.html deleted file mode 100644 index 409495a42c999..0000000000000 --- a/core/doc/user/index.html +++ /dev/null @@ -1,2 +0,0 @@ -Here goes the user documentation -In the meantime go to nextcloud.com/support/