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:
Jimmy Cai
2020-12-22 19:43:14 +01:00
committed by GitHub
parent 31c42bcfe7
commit e606dca404
3 changed files with 6 additions and 29 deletions
-14
View File
@@ -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
*/