Add Gruvbox share theme + blog system for Trilium (anonymized)
Blog generator, publish manager, share scripts, theme CSS, highlight.js bundles, font, favicon, templates and generated-reference outputs, plus an English installation guide.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<script>
|
||||
(function () {
|
||||
function clearColHover(table) {
|
||||
table.querySelectorAll(".col-hover").forEach(function (el) {
|
||||
el.classList.remove("col-hover");
|
||||
});
|
||||
}
|
||||
document.addEventListener("mouseover", function (e) {
|
||||
var cell = e.target.closest("td, th");
|
||||
if (!cell) return;
|
||||
var table = cell.closest("table");
|
||||
if (!table) return;
|
||||
clearColHover(table);
|
||||
var idx = cell.cellIndex;
|
||||
table.querySelectorAll("tr").forEach(function (tr) {
|
||||
var c = tr.children[idx];
|
||||
if (c) c.classList.add("col-hover");
|
||||
});
|
||||
});
|
||||
document.addEventListener("mouseout", function (e) {
|
||||
var table = e.target.closest("table");
|
||||
if (table && !table.contains(e.relatedTarget)) {
|
||||
clearColHover(table);
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
Reference in New Issue
Block a user