This commit is contained in:
wilsonfreitas
2026-03-28 16:21:50 +00:00
parent e4a7660bc4
commit f37ea1616f
5 changed files with 10193 additions and 10104 deletions
+14 -5
View File
@@ -73,7 +73,7 @@
" " +
(expand ? expand.textContent : "")
).toLowerCase();
const language = row.dataset.language || "";
const languages = (row.dataset.languages || "").split(" ");
const category = row.dataset.category || "";
const sources = row.dataset.sources || "";
@@ -86,7 +86,7 @@
if (show && activeFilter.value) {
const ft = activeFilter.type;
const fv = activeFilter.value;
if (ft === "language" && language !== fv) show = false;
if (ft === "language" && !languages.includes(fv)) show = false;
if (ft === "category" && category !== fv) show = false;
if (ft === "source" && !sources.split(" ").includes(fv)) show = false;
}
@@ -128,8 +128,8 @@
applyFilters();
});
// ===== Tag Click =====
tableBody.addEventListener("click", (e) => {
// ===== Tag Click Handler =====
function handleTagClick(e) {
const tag = e.target.closest(".tag");
if (tag) {
e.stopPropagation();
@@ -145,7 +145,16 @@
applyFilters();
return;
}
});
}
// Listen for tag clicks on table rows
tableBody.addEventListener("click", handleTagClick);
// Listen for tag clicks on tag cloud (outside table)
const tagCloud = $(".tag-cloud");
if (tagCloud) {
tagCloud.addEventListener("click", handleTagClick);
}
// ===== Row Expand =====
tableBody.addEventListener("click", (e) => {
+47
View File
@@ -363,6 +363,36 @@ button {
pointer-events: none;
}
/* ===== Tag Cloud ===== */
.tag-cloud {
padding: 1rem 0 0.5rem 0;
margin-bottom: 1rem;
}
.tag-cloud-label {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--ink-tertiary);
margin-bottom: 0.5rem;
}
.tag-cloud-items {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
}
.tag-cloud-item {
transition: transform var(--transition), opacity var(--transition);
}
.tag-cloud-item:hover {
transform: scale(1.08);
}
.filter-controls select {
padding: 0.625rem 2rem 0.625rem 0.875rem;
font-family: var(--font);
@@ -703,6 +733,23 @@ button {
border-color: rgba(252, 211, 77, 0.25);
}
/* Language-specific tag colors */
.tag-lang[data-filter-value="Python"] { background: #306998; color: #FFD43B; border: 1px solid rgba(48, 105, 152, 0.3); }
.tag-lang[data-filter-value="R"] { background: #276DC3; color: #fff; border: 1px solid rgba(39, 109, 195, 0.3); }
.tag-lang[data-filter-value="Julia"] { background: #9558B2; color: #fff; border: 1px solid rgba(149, 88, 178, 0.3); }
.tag-lang[data-filter-value="JavaScript"] { background: #F7DF1E; color: #000; border: 1px solid rgba(247, 223, 30, 0.3); }
.tag-lang[data-filter-value="Rust"] { background: #CE412B; color: #fff; border: 1px solid rgba(206, 65, 43, 0.3); }
.tag-lang[data-filter-value="C++"] { background: #00599C; color: #fff; border: 1px solid rgba(0, 89, 156, 0.3); }
.tag-lang[data-filter-value="C#"] { background: #68217A; color: #fff; border: 1px solid rgba(104, 33, 122, 0.3); }
.tag-lang[data-filter-value="Java"] { background: #ED8B00; color: #fff; border: 1px solid rgba(237, 139, 0, 0.3); }
.tag-lang[data-filter-value="Golang"] { background: #00ADD8; color: #fff; border: 1px solid rgba(0, 173, 216, 0.3); }
.tag-lang[data-filter-value="Haskell"] { background: #5D4F85; color: #fff; border: 1px solid rgba(93, 79, 133, 0.3); }
.tag-lang[data-filter-value="Scala"] { background: #DC322F; color: #fff; border: 1px solid rgba(220, 50, 47, 0.3); }
.tag-lang[data-filter-value="Ruby"] { background: #CC342D; color: #fff; border: 1px solid rgba(204, 52, 45, 0.3); }
.tag-lang[data-filter-value="Matlab"] { background: #E16737; color: #fff; border: 1px solid rgba(225, 103, 55, 0.3); }
.tag-lang[data-filter-value="Elixir/Erlang"] { background: #4B275F; color: #fff; border: 1px solid rgba(75, 39, 95, 0.3); }
.tag-lang[data-filter-value="PHP"] { background: #777BB4; color: #fff; border: 1px solid rgba(119, 123, 180, 0.3); }
/* ===== Results ===== */
.no-results {
text-align: center;