refactor(article): remove color tag & add custom category color (#75)
closes: https://github.com/CaiJimmy/hugo-theme-stack/issues/71
This commit is contained in:
@@ -22,20 +22,6 @@ let Stack = {
|
||||
new StackGallery(articleContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add color to tags
|
||||
*/
|
||||
document.querySelectorAll('.color-tag').forEach(async (tag: HTMLLinkElement) => {
|
||||
const imageURL = tag.getAttribute('data-image'),
|
||||
key = tag.getAttribute('data-key'),
|
||||
hash = tag.getAttribute('data-hash');
|
||||
|
||||
const colors = await getColor(key, hash, imageURL);
|
||||
|
||||
tag.style.color = colors.Vibrant.bodyTextColor;
|
||||
tag.style.background = colors.Vibrant.hex;
|
||||
})
|
||||
|
||||
/**
|
||||
* Add linear gradient background to tile style article
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user