Skip to content

Conversation

@icy-comet
Copy link
Contributor

What does this PR change? What problem does it solve?
This PR adds label.iconSVG key under site params. It can be used to embed the SVG directly for easier styling, e.g. for handling the change between dark and light mode.

Was the change discussed in an issue or in the Discussions before?
Closes #974.

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

Copy link
Owner

@adityatelange adityatelange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean for it to come across as a complaint.

I was just looking for a confirmation on the matter to proceed with the PR.

I had already said we can go ahead in discord. Anyways about the svg height, we don't need to implement that.
It is redundant to add iconHeight to replace height in svg. User can add height directly in svg.

Originally posted by @adityatelange in #974 (comment)

@icy-comet icy-comet requested a review from adityatelange July 16, 2022 19:49
Copy link
Owner

@adityatelange adityatelange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image isn't aligned properly
image
can you add svg to existing css rules to fit this in?

@icy-comet icy-comet requested a review from adityatelange July 18, 2022 09:03
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adityatelange adityatelange merged commit 77ffb30 into adityatelange:master Jul 23, 2022
romainx pushed a commit to romainx/hugo-PaperMod that referenced this pull request Jul 26, 2022
Usage =>
Params.label.iconSVG: "<your SVG as a string>"
@adityatelange adityatelange added the icons Related to Icons label Aug 28, 2022
minyeamer pushed a commit to minyeamer/hugo-PaperMod that referenced this pull request Sep 16, 2022
Usage =>
Params.label.iconSVG: "<your SVG as a string>"
dunklecat pushed a commit to dunklecat/hugo-PaperModX that referenced this pull request Oct 9, 2022
Usage =>
Params.label.iconSVG: "<your SVG as a string>"
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
Usage =>
Params.label.iconSVG: "<your SVG as a string>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

icons Related to Icons

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] embed svg icon in the header

2 participants