feat: collapse the cited-documents list in the sociedades panel
This commit is contained in:
+7
-2
@@ -130,6 +130,11 @@
|
||||
.lst{ display:flex; flex-direction:column; gap:1px; }
|
||||
.lst .ex{ opacity:.6; }
|
||||
.lst .txt{ min-width:0; overflow:hidden; text-overflow:ellipsis; }
|
||||
.cited summary{ cursor:pointer; list-style:none; display:flex; align-items:center; gap:6px; }
|
||||
.cited summary::-webkit-details-marker{ display:none; }
|
||||
.cited summary::before{ content:"▸"; font-size:11px; transition:transform .15s; }
|
||||
.cited[open] summary::before{ transform:rotate(90deg); }
|
||||
.cited summary:hover{ color:var(--ink); }
|
||||
.docs a{ display:block; color:var(--ink-2); font-size:11.5px; padding:3px 0; text-decoration:none; word-break:break-word; }
|
||||
.docs a:hover{ color:var(--accent); text-decoration:underline; }
|
||||
.empty{ color:var(--ink-3); font-size:13px; line-height:1.5; }
|
||||
@@ -631,12 +636,12 @@
|
||||
}
|
||||
// documentos
|
||||
if (n.docs.length){
|
||||
h += '<div class="sec-title">Citado em ' + n.docs.length + ' documento' + (n.docs.length > 1 ? "s" : "") + '</div><div class="docs">' +
|
||||
h += '<details class="cited"><summary class="sec-title">Citado em ' + n.docs.length + ' documento' + (n.docs.length > 1 ? "s" : "") + '</summary><div class="docs">' +
|
||||
n.docs.slice(0, 60).map(function(i){
|
||||
var d = D.docs[i];
|
||||
var url = "https://git.rodado.xyz/rodado/pet16704/src/branch/main/originals/" + d[0].split("/").map(encodeURIComponent).join("/");
|
||||
return '<a href="' + url + '" target="_blank" rel="noopener noreferrer">' + esc(d[0].replace(/^Parte\d\//, "").replace(/_[0-9a-f]{8}\.md$/, "")) + '</a>';
|
||||
}).join("") + (n.docs.length > 60 ? '<p class="empty">… e mais ' + (n.docs.length - 60) + '.</p>' : "") + '</div>';
|
||||
}).join("") + (n.docs.length > 60 ? '<p class="empty">… e mais ' + (n.docs.length - 60) + '.</p>' : "") + '</div></details>';
|
||||
}
|
||||
var body = document.getElementById("infoBody");
|
||||
body.innerHTML = h;
|
||||
|
||||
Reference in New Issue
Block a user