Skip to content

Build your personal knowledge base with Trilium Notes

Fix multiple cases of overflow

Zerebos81e986db307c
diff --git a/src/styles/content.css b/src/styles/content.css
index 46f4c64b61..1e9e0b591e 100644
--- a/src/styles/content.css
+++ b/src/styles/content.css
@@ -28,4 +28,8 @@
color: var(--text-heading);
border-bottom: 1px solid var(--background-highlight);
padding-bottom: 5px;
+}
+
+#content img {
+ max-width: 100%;
}
\ No newline at end of file
diff --git a/src/styles/navbar/navbar.css b/src/styles/navbar/navbar.css
index 5b93d1d3e1..e409d7813f 100644
--- a/src/styles/navbar/navbar.css
+++ b/src/styles/navbar/navbar.css
@@ -42,6 +42,13 @@
flex-direction: column;
list-style: none;
cursor: pointer;
+ max-width: 350px;
+}
+
+#menu li span {
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
#menu li .collapsible-label {
diff --git a/src/styles/toc.css b/src/styles/toc.css
index 234c25eefb..3e02d65771 100644
--- a/src/styles/toc.css
+++ b/src/styles/toc.css
@@ -18,6 +18,7 @@
margin: 0;
border-radius: 6px;
padding: 0 0 0 16px;
+ max-width: 250px;
}
#toc, #toc ul {
@@ -28,6 +29,12 @@
padding-left: 16px;
}
+#toc span {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ display: inline-block;
+}
+
#toc li a {
/* position: relative; */
display: flex;
diff --git a/src/templates/toc_item.ejs b/src/templates/toc_item.ejs
index 1a85710922..b18b4a1a60 100644
--- a/src/templates/toc_item.ejs
+++ b/src/templates/toc_item.ejs
@@ -6,7 +6,7 @@ const slug = slugify(entry.name);
<li>
<a href="#<%= slug %>">
- <%= entry.name %>
+ <span><%= entry.name %></span>
</a>
<% if (entry.children.length) { %>
diff --git a/src/templates/tree_item.ejs b/src/templates/tree_item.ejs
index f39d0d14ef..84762bb201 100644
--- a/src/templates/tree_item.ejs
+++ b/src/templates/tree_item.ejs
@@ -8,7 +8,7 @@ const target = isExternalLink ? ` target="_blank" rel="noopener noreferrer"` : "
<% if (note.noteId !== subRoot.note.noteId) { %>
<a class="<%= linkClass %>" href="<%= linkHref %>"<%= target %>>
<% if (note.hasVisibleChildren()) { %><button class="collapse-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></button><% } %>
- <%= note.title %>
+ <span><%= note.title %></span>
</a>
<% } %>