diff --git a/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs b/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs
index 3aa9b85777..94a83f8fa0 100644
--- a/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs
+++ b/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Net;
using System.Text;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Localization;
@@ -24,7 +25,7 @@ namespace Volo.Docs.Areas.Documents.TagHelpers
private const string LiItemTemplateWithLink = @"
{2}{3}";
- private const string ListItemAnchor = @"{3}";
+ private const string ListItemAnchor = @"{3}";
private const string ListItemSpan = @"{1}";
@@ -157,10 +158,11 @@ namespace Volo.Docs.Areas.Documents.TagHelpers
sb.Clear();
var additionalAttributes = node.Keywords.IsNullOrEmpty() ? "" : "data-keywords=\"" + node.Keywords.JoinAsString(",") + "\"";
- listInnerItem = string.Format(ListItemAnchor, NormalizePath(node.Path), additionalAttributes ,textCss,
+ listInnerItem = string.Format(ListItemAnchor, NormalizePath(node.Path), additionalAttributes, textCss,
node.Text.IsNullOrEmpty()
? "?"
- : sb.Append(node.Text).Append(badgeStringBuilder.ToString()).ToString());
+ : sb.Append(node.Text).Append(badgeStringBuilder.ToString()).ToString(),
+ WebUtility.HtmlEncode(node.Text));
}
sb.Clear();
diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml
index 51a1bbe59c..78fcf168a1 100644
--- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml
+++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml
@@ -11,7 +11,7 @@
@foreach (var item in Model)
{
- @item.Heading.Text
+ @item.Heading.Text
@if (item.Children.Any())
{
@@ -28,7 +28,7 @@
@foreach (var child in children)
{
- @child.Heading.Text
+ @child.Heading.Text
@if (child.Children.Any())
{
diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js
index 127a6223d9..da4f12b449 100644
--- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js
+++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js
@@ -31,6 +31,7 @@ var doc = doc || {};
var dataKeywords = node.keywords ? `data-keywords="${node.keywords}"` : "";
$li.append(` ${node.text}`)
+ $li.children("a").attr("title", node.text);
if(node.isLazyExpandable){
$li.addClass("lazy-expand");
diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css
index 488e6ab9cf..846016ac46 100644
--- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css
+++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css
@@ -356,6 +356,9 @@ body.scrolledMore:has(#abp-chatbot-container) .alert-criteria .options-header .t
padding: 4px 0;
display: block;
border-bottom: 0;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.docs-page .docs-sidebar .docs-tree-list ul li a:hover {
color: #fff;
@@ -696,6 +699,7 @@ body.scrolledMore:has(#abp-chatbot-container) .alert-criteria .options-header .t
font-size: 0.92em;
margin-left: 15px;
border-left: 1px solid #eee;
+ flex-wrap: nowrap;
}
.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-link {
padding: 3px 14px 4px;
@@ -709,6 +713,10 @@ body.scrolledMore:has(#abp-chatbot-container) .alert-criteria .options-header .t
margin-bottom: 1px;
transition: 0.2s;
font-weight: normal;
+ display: block;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-link.active {
border-left: 1px solid #E83090;
@@ -724,9 +732,15 @@ body.scrolledMore:has(#abp-chatbot-container) .alert-criteria .options-header .t
}
.docs-page .docs-page-index .docs-inner-anchors .index-scroll {
margin-left: -30px;
+ flex-wrap: nowrap;
+}
+.docs-page .docs-page-index .docs-inner-anchors .index-scroll > .nav-pills {
+ flex: 1 1 0;
+ min-width: 0;
}
.docs-page .docs-page-index #scroll-index {
max-height: 38vh;
+ overflow-x: hidden;
overflow-y: auto;
scrollbar-width: thin;
}
diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss
index 70c9d8beaa..79f6e05310 100644
--- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss
+++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss
@@ -437,6 +437,10 @@ body {
padding: 4px 0;
display: block;
border-bottom: 0;
+ // Truncate long titles visually; the full text stays in the HTML.
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
&:hover {
color: #fff;
@@ -861,6 +865,8 @@ body {
font-size: 0.92em;
margin-left: 15px;
border-left: 1px solid #eee;
+ // Without nowrap, items size to their longest heading instead of the panel width.
+ flex-wrap: nowrap;
.nav-link {
padding: 3px 14px 4px;
@@ -874,6 +880,11 @@ body {
margin-bottom: 1px;
transition: 0.2s;
font-weight: normal;
+ // Truncate long headings visually; the full text stays in the HTML.
+ display: block;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
&.active {
border-left: 1px solid #E83090;
@@ -903,11 +914,18 @@ body {
.index-scroll {
margin-left: -30px;
+ flex-wrap: nowrap;
+
+ > .nav-pills {
+ flex: 1 1 0;
+ min-width: 0;
+ }
}
}
#scroll-index {
max-height: 38vh;
+ overflow-x: hidden;
overflow-y: auto;
scrollbar-width: thin;
}