feat: sidebar récursive par arbre + liste des récents
Port de la logique buildTree/renderTree de MarkdownRender-nodejs vers Pena-tauri pour une navigation dossier à profondeur illimitée avec <details> collapsibles, gestion du Home.md par dossier et ouverture automatique des ancêtres du fichier courant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+165
@@ -61,6 +61,79 @@ body {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* ── Home recents ── */
|
||||
.home-recents {
|
||||
margin-top: 40px;
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
.home-recents__label {
|
||||
color: rgba(255,255,255,0.3);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
.home-recents__list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.home-recents__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 9px 14px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s;
|
||||
text-align: left;
|
||||
background: rgba(255,255,255,0.04);
|
||||
border: none;
|
||||
width: 100%;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
}
|
||||
|
||||
.home-recents__item:hover {
|
||||
background: rgba(255,255,255,0.08);
|
||||
}
|
||||
|
||||
.home-recents__item__icon {
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.home-recents__item__info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-recents__item__name {
|
||||
color: rgba(255,255,255,0.85);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.home-recents__item__path {
|
||||
color: rgba(255,255,255,0.3);
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* ── Sidebar ── */
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
@@ -152,6 +225,98 @@ body {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ── Tree nav ── */
|
||||
.nav-tree { list-style: none; margin: 0; padding: 0; }
|
||||
.nav-tree li { margin: 0; }
|
||||
|
||||
.nav-root-link {
|
||||
display: block;
|
||||
padding: 7px 24px;
|
||||
color: rgba(255,255,255,0.85);
|
||||
text-decoration: none;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.nav-root-link:hover { color: #ff5577; }
|
||||
.nav-root-link.active { color: #ff5577; font-weight: 500; }
|
||||
|
||||
.nav-folder { margin: 0; }
|
||||
.nav-folder > summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
cursor: default;
|
||||
user-select: none;
|
||||
padding: 0;
|
||||
}
|
||||
.nav-folder > summary::-webkit-details-marker { display: none; }
|
||||
|
||||
.nav-arrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
font-size: 9px;
|
||||
opacity: 0.4;
|
||||
cursor: pointer;
|
||||
transition: transform 0.18s, opacity 0.2s;
|
||||
border-radius: 4px;
|
||||
color: rgba(255,255,255,0.7);
|
||||
}
|
||||
.nav-arrow:hover { opacity: 1; background: rgba(255,255,255,0.08); }
|
||||
.nav-folder[open] > summary .nav-arrow { transform: rotate(90deg); opacity: 0.8; }
|
||||
|
||||
.nav-folder-link, .nav-folder-name {
|
||||
flex: 1;
|
||||
display: block;
|
||||
padding: 6px 24px 6px 0;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: rgba(255,255,255,0.35);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.nav-folder-link:hover { color: rgba(255,255,255,0.85); }
|
||||
.nav-folder-link.active { color: #ff5577; }
|
||||
|
||||
.nav-folder .nav-folder > summary .nav-folder-link,
|
||||
.nav-folder .nav-folder > summary .nav-folder-name {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
text-transform: none;
|
||||
letter-spacing: 0;
|
||||
color: rgba(255,255,255,0.45);
|
||||
}
|
||||
.nav-folder .nav-folder > summary .nav-folder-link:hover { color: rgba(255,255,255,0.9); }
|
||||
|
||||
.nav-file-link {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
color: rgba(255,255,255,0.55);
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.nav-file-link:hover { color: #ff5577; }
|
||||
.nav-file-link.active { color: #ff5577; font-weight: 500; }
|
||||
|
||||
.nav-depth-1 > .nav-file-link { padding: 5px 24px 5px 52px; }
|
||||
.nav-depth-1 > .nav-folder > summary { padding-left: 24px; }
|
||||
.nav-depth-2 > .nav-file-link { padding: 4px 24px 4px 68px; }
|
||||
.nav-depth-2 > .nav-folder > summary { padding-left: 40px; }
|
||||
.nav-depth-3 > .nav-file-link { padding: 4px 24px 4px 84px; }
|
||||
.nav-depth-3 > .nav-folder > summary { padding-left: 56px; }
|
||||
|
||||
/* ── Content ── */
|
||||
.content {
|
||||
margin-left: 264px;
|
||||
|
||||
Reference in New Issue
Block a user