3D viewer overhaul: full-bleed + responsive, Web Worker STEP parse, progress bar, caption stats, inline models in text notes, STL fix, app widget; weekday dates (dateText); fix shields badge escaping; docs + licenses
This commit is contained in:
@@ -13,9 +13,9 @@
|
||||
|
||||
function shorten(t) {
|
||||
t = String(t || "").replace(/\s+/g, " ").trim();
|
||||
if (t.length <= 26) return t;
|
||||
var cut = t.slice(0, 26).replace(/\s+\S*$/, "");
|
||||
return (cut.length ? cut : t.slice(0, 26)) + "…";
|
||||
if (t.length <= 32) return t;
|
||||
var cut = t.slice(0, 32).replace(/\s+\S*$/, "");
|
||||
return (cut.length ? cut : t.slice(0, 32)) + "…";
|
||||
}
|
||||
|
||||
menu.querySelectorAll("li").forEach(function (li) {
|
||||
@@ -25,8 +25,9 @@
|
||||
if (!m) return;
|
||||
var art = byAlias[m[1]];
|
||||
if (!art) return;
|
||||
var date = String(art.date || "").slice(0, 10);
|
||||
li.setAttribute("data-pubdate", date);
|
||||
var pub = String(art.date || "").slice(0, 10);
|
||||
var date = String(art.dateText || pub || "");
|
||||
li.setAttribute("data-pubdate", pub);
|
||||
var span = a.querySelector("span");
|
||||
if (span) {
|
||||
var label = (date ? date + " " : "") + shorten(a.textContent.replace(/\s+/g, " ").trim());
|
||||
|
||||
Reference in New Issue
Block a user