hugo-theme-cactus icon indicating copy to clipboard operation
hugo-theme-cactus copied to clipboard

Tags design seems too big

Open goakshit opened this issue 3 years ago • 4 comments

If we use few tags very frequently, the tags page turns into a bad UI.

goakshit avatar Aug 02 '21 13:08 goakshit

Yes, by bad UI we mean something like font size 50.

Berndinox avatar Jan 31 '22 15:01 Berndinox

In /layouts/_default/terms.html I replaced the code in <div class="tag-cloud-tags"> with:

    {{- range $.Site.Taxonomies.tags.ByCount -}}
        <a href="{{ .Page.RelPermalink }}">#{{ .Page.Title }} ({{ .Count }})</a>&nbsp;
    {{- end -}}

Which got me a much nicer UI for my new site (still working on general look and feel, I can't leave anything alone): Screen Shot 2022-06-02 at 9 33 10 PM

Hope you find this helpful! :)

CuriousMagpie avatar Jun 03 '22 01:06 CuriousMagpie

In /layouts/_default/terms.html you can also modify the font-size calculation (line 14)

From: <a style="font-size: {{ (add 0.8 (mul 15 (div (float $elem.Count) $AllRegularPagesCount))) }}rem; To: <a style="font-size: {{ (add 0.3 (mul 3 (div (float $elem.Count) $AllRegularPagesCount))) }}rem; or whatever numbers work for you.

Is there a way to do this outside of the themes folder to avoid overwriting customisations when pulling changes?

cookieoverflow avatar Jun 15 '22 23:06 cookieoverflow

You can create a custom.css file and import it into style.css. You'll just need to make sure that you're overriding the correct class/id/element in the CSS--I would think it's potentially in tags.css but don't quote me on that, as there are a lot of CSS files and I found it a bit of a challenge to figure out which ones were taking precedence so I could override them.

Also, to be completely honest here: it looks like the theme's author has abandoned the project, so I wouldn't be too worried about overwriting changes. That's also why I didn't clone it into my project as a submodule--I wanted to be able to make as many changes as I wanted to the theme. I have made so many changes and have more planned that I am going to end up with a completely different theme by the time I'm done.

CuriousMagpie avatar Jun 16 '22 13:06 CuriousMagpie