From 2437acfb54d0be3cb9ee00ed7054929a4c89626c Mon Sep 17 00:00:00 2001 From: Davide Principi Date: Tue, 18 Nov 2025 11:56:05 +0100 Subject: [PATCH 1/3] feat: change splash page style --- administrator-manual/en/_static/custom.css | 184 +++++++++++++++++++++ administrator-manual/en/conf.py | 21 +++ administrator-manual/en/index.rst | 54 +++--- 3 files changed, 239 insertions(+), 20 deletions(-) create mode 100644 administrator-manual/en/_static/custom.css diff --git a/administrator-manual/en/_static/custom.css b/administrator-manual/en/_static/custom.css new file mode 100644 index 00000000..4bf52a6a --- /dev/null +++ b/administrator-manual/en/_static/custom.css @@ -0,0 +1,184 @@ +/* Splash Page Styling */ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + margin: 0; + padding: 0; +} + +div.document { + background: transparent; + margin: 0; + padding: 0; +} + +div.documentwrapper { + float: none; + width: 100%; + margin: 0; + padding: 0; +} + +div.body { + background: transparent; + padding: 40px 20px; + max-width: 1200px; + margin: 0 auto; +} + +.splash-container { + text-align: center; + padding: 60px 20px; +} + +.splash-header { + margin-bottom: 60px; +} + +.splash-header h1 { + color: white; + font-size: 3.5em; + margin: 0 0 20px 0; + font-weight: 700; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); +} + +.splash-subtitle { + color: rgba(255, 255, 255, 0.95); + font-size: 1.3em; + margin: 0; + font-weight: 300; +} + +.version-cards { + display: flex; + justify-content: center; + gap: 30px; + flex-wrap: wrap; + margin-top: 40px; +} + +.version-card { + background: white; + border-radius: 12px; + padding: 40px 30px; + width: 300px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); + transition: transform 0.3s ease, box-shadow 0.3s ease; + position: relative; +} + +.version-card:hover { + transform: translateY(-5px); + box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); +} + +.version-card.current { + border-top: 4px solid #4CAF50; +} + +.version-card.archive { + border-top: 4px solid #9E9E9E; +} + +.version-badge { + display: inline-block; + background: #4CAF50; + color: white; + padding: 5px 15px; + border-radius: 20px; + font-size: 0.85em; + font-weight: 600; + text-transform: uppercase; + margin-bottom: 20px; +} + +.version-badge.archive-badge { + background: #9E9E9E; +} + +.version-card h2 { + color: #333; + font-size: 2em; + margin: 20px 0 15px 0; + font-weight: 600; +} + +.version-card p { + color: #666; + font-size: 1.05em; + line-height: 1.6; + margin-bottom: 30px; + min-height: 50px; +} + +.btn-primary, .btn-secondary { + display: inline-block; + padding: 12px 30px; + border-radius: 6px; + text-decoration: none; + font-weight: 600; + transition: all 0.3s ease; + font-size: 1em; +} + +.btn-primary { + background: #667eea; + color: white; +} + +.btn-primary:hover { + background: #5568d3; + transform: scale(1.05); + text-decoration: none; +} + +.btn-secondary { + background: #f0f0f0; + color: #333; +} + +.btn-secondary:hover { + background: #e0e0e0; + transform: scale(1.05); + text-decoration: none; +} + +/* Hide default sphinx elements */ +.related { + display: none; +} + +div.footer { + background: transparent; + color: rgba(255, 255, 255, 0.8); + text-align: center; + padding: 20px; + border-top: 1px solid rgba(255, 255, 255, 0.2); +} + +div.footer a { + color: white; +} + +/* Responsive design */ +@media (max-width: 768px) { + .splash-header h1 { + font-size: 2.5em; + } + + .splash-subtitle { + font-size: 1.1em; + } + + .version-cards { + flex-direction: column; + align-items: center; + } + + .version-card { + width: 90%; + max-width: 350px; + } +} diff --git a/administrator-manual/en/conf.py b/administrator-manual/en/conf.py index cc742b8a..1be2f2ce 100644 --- a/administrator-manual/en/conf.py +++ b/administrator-manual/en/conf.py @@ -25,3 +25,24 @@ html_theme = 'alabaster' html_static_path = ['_static'] + +# Theme options for a splash page +html_theme_options = { + 'description': 'Administrator\'s manual for all NethServer versions', + 'page_width': '980px', + 'sidebar_width': '0px', + 'body_max_width': '100%', + 'show_powered_by': False, + 'show_related': False, + 'fixed_sidebar': False, +} + +# Custom CSS for splash page styling +html_css_files = [ + 'custom.css', +] + +# Remove sidebar for a cleaner splash page +html_sidebars = { + '**': [] +} diff --git a/administrator-manual/en/index.rst b/administrator-manual/en/index.rst index c6429c80..72eacdf4 100644 --- a/administrator-manual/en/index.rst +++ b/administrator-manual/en/index.rst @@ -1,21 +1,35 @@ -.. NethServer Documentation documentation master file, created by - sphinx-quickstart on Fri Dec 20 16:56:48 2024. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - +============================ NethServer Documentation -======================== - -Administrator's manual - -- `NethServer 8`__ - - __ https://docs.nethserver.org/projects/ns8/en/latest/ - -- `NethServer 7`__ (archive) - - __ https://docs.nethserver.org/en/v7/ - -- `NethServer 6`__ (archive) - - __ https://docs.nethserver.org/en/v6/ +============================ + +.. raw:: html + +
+
+

NethServer Administrator's Manual

+

Choose your NethServer version to access the documentation

+
+ +
+
+
Current
+

NethServer 8

+

Latest version with modern container-based architecture

+ View Documentation → +
+ +
+
Archive
+

NethServer 7

+

Stable version based on CentOS 7

+ View Documentation → +
+ +
+
Archive
+

NethServer 6

+

Legacy version based on CentOS 6

+ View Documentation → +
+
+
From 45bf855470a8f97ea40f22c8653677c22623bf61 Mon Sep 17 00:00:00 2001 From: Davide Principi Date: Tue, 18 Nov 2025 12:07:47 +0100 Subject: [PATCH 2/3] docs: Add NethSecurity documentation link to landing page Add link to NethSecurity admin manual since the NS7 project was split into NS8 and NethSecurity products. --- administrator-manual/en/index.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/administrator-manual/en/index.rst b/administrator-manual/en/index.rst index 72eacdf4..aa2a3baa 100644 --- a/administrator-manual/en/index.rst +++ b/administrator-manual/en/index.rst @@ -18,6 +18,13 @@ NethServer Documentation View Documentation → +
+
Current
+

NethSecurity

+

Firewall and security gateway solution

+ View Documentation → +
+
Archive

NethServer 7

From 814dd7188db0fd805641807013fe5bb557ab0e70 Mon Sep 17 00:00:00 2001 From: Davide Principi Date: Tue, 18 Nov 2025 12:34:02 +0100 Subject: [PATCH 3/3] docs: Switch to sphinx-book-theme with light/dark mode support Change the base Sphinx theme from alabaster to sphinx-book-theme to match ns8-docs and enable automatic light/dark theme switching. - Update conf.py to use sphinx_book_theme with repository button - Add sphinx_copybutton extension for consistency with ns8-docs - Adapt custom.css to use theme CSS variables (--pst-color-*) - Support both light and dark modes with theme-specific gradients - Update selectors to work with sphinx-book-theme structure The splash page now inherits the theme toggle and automatically adapts colors when users switch between light and dark modes. --- administrator-manual/en/_static/custom.css | 58 ++++++++++------------ administrator-manual/en/conf.py | 18 +++---- 2 files changed, 33 insertions(+), 43 deletions(-) diff --git a/administrator-manual/en/_static/custom.css b/administrator-manual/en/_static/custom.css index 4bf52a6a..acb22cc3 100644 --- a/administrator-manual/en/_static/custom.css +++ b/administrator-manual/en/_static/custom.css @@ -1,28 +1,24 @@ -/* Splash Page Styling */ +/* Splash Page Styling with Light/Dark Theme Support */ -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; +/* Override theme background for splash page */ +html[data-theme="light"] body, +html[data-theme="light"] .bd-container { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - margin: 0; - padding: 0; } -div.document { - background: transparent; - margin: 0; - padding: 0; +html[data-theme="dark"] body, +html[data-theme="dark"] .bd-container { + background: linear-gradient(135deg, #4a5f99 0%, #563a72 100%); } -div.documentwrapper { - float: none; - width: 100%; - margin: 0; - padding: 0; +.bd-main .bd-content { + background: transparent; + padding: 40px 20px; } -div.body { +article.bd-article { background: transparent; - padding: 40px 20px; + padding: 0; max-width: 1200px; margin: 0 auto; } @@ -37,7 +33,7 @@ div.body { } .splash-header h1 { - color: white; + color: var(--pst-color-on-background, white); font-size: 3.5em; margin: 0 0 20px 0; font-weight: 700; @@ -45,7 +41,7 @@ div.body { } .splash-subtitle { - color: rgba(255, 255, 255, 0.95); + color: var(--pst-color-on-background, rgba(255, 255, 255, 0.95)); font-size: 1.3em; margin: 0; font-weight: 300; @@ -60,7 +56,7 @@ div.body { } .version-card { - background: white; + background: var(--pst-color-surface, white); border-radius: 12px; padding: 40px 30px; width: 300px; @@ -99,14 +95,14 @@ div.body { } .version-card h2 { - color: #333; + color: var(--pst-color-text-base, #333); font-size: 2em; margin: 20px 0 15px 0; font-weight: 600; } .version-card p { - color: #666; + color: var(--pst-color-text-muted, #666); font-size: 1.05em; line-height: 1.6; margin-bottom: 30px; @@ -135,31 +131,27 @@ div.body { } .btn-secondary { - background: #f0f0f0; - color: #333; + background: var(--pst-color-secondary, #f0f0f0); + color: var(--pst-color-text-base, #333); } .btn-secondary:hover { - background: #e0e0e0; + background: var(--pst-color-secondary-highlight, #e0e0e0); transform: scale(1.05); text-decoration: none; } -/* Hide default sphinx elements */ -.related { - display: none; -} - -div.footer { +/* Footer styling */ +.bd-footer { background: transparent; - color: rgba(255, 255, 255, 0.8); + color: var(--pst-color-on-background, rgba(255, 255, 255, 0.8)); text-align: center; padding: 20px; border-top: 1px solid rgba(255, 255, 255, 0.2); } -div.footer a { - color: white; +.bd-footer a { + color: var(--pst-color-on-background, white); } /* Responsive design */ diff --git a/administrator-manual/en/conf.py b/administrator-manual/en/conf.py index 1be2f2ce..507b8aee 100644 --- a/administrator-manual/en/conf.py +++ b/administrator-manual/en/conf.py @@ -13,7 +13,9 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = [] +extensions = [ + 'sphinx_copybutton' +] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] @@ -23,18 +25,14 @@ # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'alabaster' +html_theme = 'sphinx_book_theme' html_static_path = ['_static'] -# Theme options for a splash page +# Theme options html_theme_options = { - 'description': 'Administrator\'s manual for all NethServer versions', - 'page_width': '980px', - 'sidebar_width': '0px', - 'body_max_width': '100%', - 'show_powered_by': False, - 'show_related': False, - 'fixed_sidebar': False, + "repository_url": "https://github.com/NethServer/docs", + "use_repository_button": True, + "use_download_button": False, } # Custom CSS for splash page styling