Skip to content
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

Alternative icon URLs to Simple Icons #10464

Closed
HariSekhon opened this issue Aug 16, 2024 · 5 comments
Closed

Alternative icon URLs to Simple Icons #10464

HariSekhon opened this issue Aug 16, 2024 · 5 comments

Comments

@HariSekhon
Copy link

📋 Description

Feature request to use other icons by URL instead of just Simple Icons or base64 embedded icons which make URLs huge.

Motivation is that Simple Icons are removing some icons that I use eg.

simple-icons/simple-icons#11372

For example, D2 and Python diagrams languages pull icons dynamically which you can see in many diagrams-as-code here:

https://github.com/HariSekhon/Diagrams-as-Code#readme

@HariSekhon
Copy link
Author

HariSekhon commented Aug 16, 2024

I've just rustled up a quick script to work around this:

https://github.com/HariSekhon/DevOps-Bash-tools/blob/master/bin/shields_embed_logo.sh

which I've documented in both the --help usage of the script as well as my Knowlege-Base repo here:

https://github.com/HariSekhon/Knowledge-Base/blob/main/documentation-as-code.md#badges--icons

I think it would be nice if shields.io could pull from icon URLs like my favourite D2lang does.

But I also appreciate this would have a performance cost as the diagramming tech above is local and not internet and therefore latency sensitive.

Thank you for your time to review and feed back on this either way.

And also I'm big fan of your work on shields.io, thank you for this excellent project.

@HariSekhon
Copy link
Author

HariSekhon commented Aug 16, 2024

Any idea why this embedded data icon is dark compared to the simple icons one which is white?

The simple icons version is light:

[![My LinkedIn](https://img.shields.io/badge/LinkedIn%20Profile-HariSekhon-blue?logo=linkedin)](https://www.linkedin.com/in/HariSekhon/)

My LinkedIn

Compared to this embedded version where I even added the logoColor=white parameter but it doesn't seem to be working:

[![My LinkedIn](https://img.shields.io/badge/LinkedIn%20Profile-HariSekhon-blue?logoColor=white&logo=data:image/svg%2bxml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+TGlua2VkSW48L3RpdGxlPjxwYXRoIGQ9Ik0yMC40NDcgMjAuNDUyaC0zLjU1NHYtNS41NjljMC0xLjMyOC0uMDI3LTMuMDM3LTEuODUyLTMuMDM3LTEuODUzIDAtMi4xMzYgMS40NDUtMi4xMzYgMi45Mzl2NS42NjdIOS4zNTFWOWgzLjQxNHYxLjU2MWguMDQ2Yy40NzctLjkgMS42MzctMS44NSAzLjM3LTEuODUgMy42MDEgMCA0LjI2NyAyLjM3IDQuMjY3IDUuNDU1djYuMjg2ek01LjMzNyA3LjQzM2MtMS4xNDQgMC0yLjA2My0uOTI2LTIuMDYzLTIuMDY1IDAtMS4xMzguOTItMi4wNjMgMi4wNjMtMi4wNjMgMS4xNCAwIDIuMDY0LjkyNSAyLjA2NCAyLjA2MyAwIDEuMTM5LS45MjUgMi4wNjUtMi4wNjQgMi4wNjV6bTEuNzgyIDEzLjAxOUgzLjU1NVY5aDMuNTY0djExLjQ1MnpNMjIuMjI1IDBIMS43NzFDLjc5MiAwIDAgLjc3NCAwIDEuNzI5djIwLjU0MkMwIDIzLjIyNy43OTIgMjQgMS43NzEgMjRoMjAuNDUxQzIzLjIgMjQgMjQgMjMuMjI3IDI0IDIyLjI3MVYxLjcyOUMyNCAuNzc0IDIzLjIgMCAyMi4yMjIgMGguMDAzeiIvPjwvc3ZnPgo=)](https://www.linkedin.com/in/HariSekhon/)

My LinkedIn

The exact instructions I followed to generate the base64 data are in script and Knowledge Base links in the comment above.

I even tried putting logoColor=white before and after the logo=data... but it made no difference and suspect the problem is in the logo data itself.

@LitoMore
Copy link
Contributor

@HariSekhon Simply append the attribute fill="#0A66C2" to the SVG source before the base64 encoding.

@HariSekhon
Copy link
Author

Thanks, that's worked

@calebcartwright
Copy link
Member

Closing as a duplicate of #9143

@calebcartwright calebcartwright closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
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

No branches or pull requests

3 participants