diff --git a/assets/ts/main.ts b/assets/ts/main.ts index e48f4d2..4d07631 100644 --- a/assets/ts/main.ts +++ b/assets/ts/main.ts @@ -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 */ diff --git a/exampleSite/content/categories/Test/_index.md b/exampleSite/content/categories/Test/_index.md index 547b3b7..0b3cfa9 100644 --- a/exampleSite/content/categories/Test/_index.md +++ b/exampleSite/content/categories/Test/_index.md @@ -3,4 +3,7 @@ title: "Test" description: "This is a example category" slug: "test" image: "hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg" +style: + background: "#2a9d8f" + color: "#fff" --- \ No newline at end of file diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 7650704..5c5397b 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -1,22 +1,10 @@ -{{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" }} -{{- $context := . -}}
{{ if .Params.categories }}
{{ range (.GetTerms "categories") }} - {{ if and $image.exists $image.resource }} - {{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}} - {{- $20x := $imageRaw.Fill "20x20 smart" -}} - - {{ .LinkTitle }} - - {{ else }} - {{ .LinkTitle }} - {{ end }} + + {{ .LinkTitle }} + {{ end }}
{{ end }}