r/RedesignHelp • u/1998CR • May 09 '20
CSS I made a simple CSS widget for social media
Hey, I get a lot of messages asking how I made a widget for one of my subreddits. I figured I'd make a simple version for people to use on their sub.
This is not a tutorial on how to make a CSS widget. You need to know what a CSS widget is, and the basics of setting one up. The CSS widget option is found when you click "Advanced" during widget creation.
/u/SolariaHues created a detailed guide on how to use this widget. Check it out by clicking HERE
Example preview: https://imgur.com/bEWulEF
CSS: https://gitlab.com/josh981/reddit-css-widget/-/blob/master/style.css
Spritesheet: https://gitlab.com/josh981/reddit-css-widget/-/blob/master/reddit-social-icons.png
Example Markdown: https://gitlab.com/josh981/reddit-css-widget/-/blob/master/markdown.txt
Notes:
- The name of the image must be "reddit-social-icons"
- You can configure the widget header background color and text color in the CSS.
If the images are not showing up after saving the widget, delete:
/*DELETE THIS COMMENT AFTER SAVING ONCE, THEN SAVE AGAIN IF YOU CAN'T SEE THE IMAGES (FIXES COMMON REDDIT BUG)*/- The widget height is dependent on how many social media buttons you have. The height in the example is 205px.
- This works with https links, not http links.
Feel free to reach out to me for suggestions/feedback/support. My time is limited, but I will reply when I am available.
2
u/MajorParadox Just Helping May 10 '20
This is very cool, thanks for sharing!
2
u/Garwald May 11 '20 edited May 11 '20
It's looking good on my test sub: https://www.reddit.com/r/Swagbucksbeta2
Any plans for more in depth guides; Similiar to the 'Useful Links' one you use on /r/clashroyale?
I think I'd like being able to feature 1 or 2 links like you guys doing with the discord and twitter.
1
u/Garwald May 10 '20
What are the dimensions of each image on the sprite sheet? I would possibly like to add some custom ones of my own
1
u/Garwald May 10 '20 edited May 11 '20
I'm attempting to add this to a private beta subreddit I have.
Images aren't showing up after saving the widget
I attempt to delete:
But when I try to delete the above, I'm unable to save. It gives me an error:
Any ideas?
Edit: I was getting the error when trying to test in a private subreddit. When I tested in a public one I did not receive that error.
1
u/GgGameAr May 26 '20
The CSS/Example Markdown provided links are empty
1
u/FaviFake Redesign Team Apr 28 '22
Could you update the Discord icon?