mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
Adjust paddingLeft calculation and margin in styles for improved layout
This commit is contained in:
2
index.js
2
index.js
@@ -156,7 +156,7 @@ class DOMService {
|
|||||||
link.href = `?${doc.slug}`;
|
link.href = `?${doc.slug}`;
|
||||||
link.textContent = doc.title || doc.path.split('/').pop().replace('.md', '');
|
link.textContent = doc.title || doc.path.split('/').pop().replace('.md', '');
|
||||||
link.dataset.path = doc.path;
|
link.dataset.path = doc.path;
|
||||||
link.style.paddingLeft = `${level * 0.6}rem`; // Reduced from 0.8 + 1.2 to just 0.6
|
link.style.paddingLeft = `${(level * 0.6) + 0.8}rem`; // Add base padding of 0.8rem
|
||||||
|
|
||||||
link.onclick = (e) => {
|
link.onclick = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ body {
|
|||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder-icons {
|
.folder-icons {
|
||||||
@@ -201,7 +202,7 @@ body {
|
|||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
color: var(--ifm-color-content-secondary);
|
color: var(--ifm-color-content-secondary);
|
||||||
min-width: 1.5em;
|
min-width: 1.5em;
|
||||||
margin-right: 0.5rem;
|
margin-right: 0.25rem;
|
||||||
order: 1;
|
order: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user