Skip to content

Feature request: Add custom icon for widgets. #1120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Fantasime opened this issue Feb 3, 2025 · 2 comments · May be fixed by #1121
Closed

Feature request: Add custom icon for widgets. #1120

Fantasime opened this issue Feb 3, 2025 · 2 comments · May be fixed by #1121

Comments

@Fantasime
Copy link

What happened?

I want to add custom icon for widgets but no config can do this.

Image

This following features for widgets are needed:

  1. custom icon
  2. make icon invisible

Hugo version

0.143.0

Theme version

3.30.0

What browsers are you seeing the problem on?

No response

More information about the browser

No response

Relevant log output

Link to Minimal Reproducible Example

https://demo.stack.jimmycai.com/

Fantasime added a commit to Fantasime/hugo-theme-stack that referenced this issue Feb 3, 2025
User can disable icon using `widgets.[home]page.iconVisible`,
and change widget icon using `widgets.[home]page.icon`.
@drohhyn
Copy link

drohhyn commented Feb 7, 2025

You can do this by overwriting /layouts/partials/widget/categories.html, have a look at {{ partial "helper/icon" "categories" }}
Also putting the SVGs into /assets/icons/MY.svg can be used to overwrite existing icons.

@Fantasime
Copy link
Author

You can do this by overwriting /layouts/partials/widget/categories.html, have a look at {{ partial "helper/icon" "categories" }} Also putting the SVGs into /assets/icons/MY.svg can be used to overwrite existing icons.

Thanks. It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants