mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-08 02:33:02 +00:00
only outline mini selected tags
This commit is contained in:
@@ -194,6 +194,10 @@ const sortedTags = Array.from(allTags).sort((a, b) => a.localeCompare(b));
|
|||||||
const selectedTagText = "text-ayu-bg";
|
const selectedTagText = "text-ayu-bg";
|
||||||
const unselectedTagBorder = "border-ayu-gutter";
|
const unselectedTagBorder = "border-ayu-gutter";
|
||||||
const unselectedTagText = "text-ayu-fg";
|
const unselectedTagText = "text-ayu-fg";
|
||||||
|
const miniSelectedTagBorder = "border-ayu-accent";
|
||||||
|
const miniSelectedTagText = "text-ayu-accent";
|
||||||
|
const miniUnselectedTagBorder = "border-ayu-gutter";
|
||||||
|
const miniUnselectedTagText = "text-ayu-fg";
|
||||||
|
|
||||||
const tags = document.querySelectorAll("[data-tag]");
|
const tags = document.querySelectorAll("[data-tag]");
|
||||||
const projects = document.getElementsByClassName("project-item");
|
const projects = document.getElementsByClassName("project-item");
|
||||||
@@ -241,18 +245,24 @@ const sortedTags = Array.from(allTags).sort((a, b) => a.localeCompare(b));
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
Array.from(tagElements).forEach((tag) => {
|
Array.from(tagElements).forEach((tag) => {
|
||||||
tag.classList.remove(selectedTagBg, selectedTagText);
|
tag.classList.remove(
|
||||||
|
miniSelectedTagBorder,
|
||||||
|
miniSelectedTagText
|
||||||
|
);
|
||||||
tag.classList.add(
|
tag.classList.add(
|
||||||
unselectedTagBorder,
|
miniUnselectedTagBorder,
|
||||||
unselectedTagText
|
miniUnselectedTagText
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
matchingTags.forEach((tag) => {
|
matchingTags.forEach((tag) => {
|
||||||
tag.classList.add(selectedTagBg, selectedTagText);
|
tag.classList.add(
|
||||||
|
miniSelectedTagBorder,
|
||||||
|
miniSelectedTagText
|
||||||
|
);
|
||||||
tag.classList.remove(
|
tag.classList.remove(
|
||||||
unselectedTagBorder,
|
miniUnselectedTagBorder,
|
||||||
unselectedTagText
|
miniUnselectedTagText
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user