From 236c56167788ce8d470d2c1779b4f3e4ea387a19 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 29 Feb 2024 12:40:48 -0500 Subject: [PATCH] Disable scrolling effect for intra-page navigation --- netbox/project-static/dist/netbox.css | Bin 552405 -> 552441 bytes netbox/project-static/styles/netbox.scss | 1 + .../styles/overrides/_bootstrap.scss | 4 ++++ netbox/templates/base/base.html | 1 + netbox/templates/base/layout.html | 2 +- .../utilities/templates/navigation/menu.html | 2 +- 6 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 netbox/project-static/styles/overrides/_bootstrap.scss diff --git a/netbox/project-static/dist/netbox.css b/netbox/project-static/dist/netbox.css index e016f09234cf31288e44984ebd3d0752ee6ccc35..5209b38eb2d5947dc6f8fb2801ed92a7b7d42c3a 100644 GIT binary patch delta 80 zcmcb5Tk+>@#fBEf7N!>F7M2#)7Pc1lEgUj&Y8fTDIn~9F7M2#)7Pc1lEgUj&+a2OKcJc!N&*ckR diff --git a/netbox/project-static/styles/netbox.scss b/netbox/project-static/styles/netbox.scss index 3afaaa9fc..aa7150be7 100644 --- a/netbox/project-static/styles/netbox.scss +++ b/netbox/project-static/styles/netbox.scss @@ -5,6 +5,7 @@ @import '../node_modules/@tabler/core/src/scss/vendor/tom-select'; // Overrides of external libraries +@import 'overrides/bootstrap'; @import 'overrides/tabler'; // Transitional styling to ease migration of templates from NetBox v3.x diff --git a/netbox/project-static/styles/overrides/_bootstrap.scss b/netbox/project-static/styles/overrides/_bootstrap.scss new file mode 100644 index 000000000..f24e18890 --- /dev/null +++ b/netbox/project-static/styles/overrides/_bootstrap.scss @@ -0,0 +1,4 @@ +// Disable smooth scrolling for intra-page links +html { + scroll-behavior: auto !important; +} diff --git a/netbox/templates/base/base.html b/netbox/templates/base/base.html index b7d4f6fc6..2ae1ebb9b 100644 --- a/netbox/templates/base/base.html +++ b/netbox/templates/base/base.html @@ -21,6 +21,7 @@ + {# Page title #} {% block title %}{% trans "Home" %}{% endblock %} | NetBox diff --git a/netbox/templates/base/layout.html b/netbox/templates/base/layout.html index 432138ee8..943ec9dbf 100644 --- a/netbox/templates/base/layout.html +++ b/netbox/templates/base/layout.html @@ -79,7 +79,7 @@ Blocks: {# Page content #}
-
+
{# Page header #} {% block header %} diff --git a/netbox/utilities/templates/navigation/menu.html b/netbox/utilities/templates/navigation/menu.html index 739d4ff08..d9800b27f 100644 --- a/netbox/utilities/templates/navigation/menu.html +++ b/netbox/utilities/templates/navigation/menu.html @@ -1,6 +1,6 @@ {% load helpers %} -