Entrance Events! Chat Gallery Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
February 06, 2025 - @35.67 (what is this?)
Activity rating: Four Stars Posts & Arts: 95/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :4u: Love is not possession  :4u: Super News: E-Zine #3 Accepting Entries!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ♺ ∙ Web Crafting Materials
| | |-+  using carrd icons in non-carrd sites!


« previous next »
Pages: [1] Print
Author Topic: using carrd icons in non-carrd sites!  (Read 149 times)
Bailey / Jay
Newbie ⚓︎
*


any prns

⛺︎ My Room
iMood: lockheartlove
Itch.io: My Games

View Profile WWW

Joined 2024!
« on: December 18, 2024 @67.15 »

Hello hello! I've been working on something that I want to share! :seal:

Most people who make websites are probably familiar with fontawesome, but before I knew it existed, I copy/pasted the inline SVG from a carrd and styled it to my liking. A bit convoluted and a bit clunky, but it worked, looked good, had brand icons that fontawesome didn't, and made me feel smart. I like the icons, and generally, I think they look good even when used in regular sites!



As mentioned, though, it was a bit convoluted and clunky to set up. I wanted to find a solution that would make the process easier to use, and I think I have!

Said solution can be found at carrd-icons.netlify.app, and while I would recommend taking a look since it has a list of the current icons I have set up, I'll explain how to use said solution here as well!

First, take a look at this, though again, an easier-to-look-at icons list is in the first link. If it has the icons you're looking for, most of the current ones being brand icons, then download it and add it into the main folder of your website!

Next, add this between the header tags of the page(s) you'll be needing icons on.
Code
<script src="https://code.jquery.com/jquery-1.10.2.js"></script><div id="icon-holder"></div>

Then, put this at the end of the page(s) you're putting icons on. It should be the last thing before the closing body tag.
Code
<script>
    $(function(){
    $("#icon-holder").load("/icons.htm");
  });
</script>

After that, you stick this in your CSS stylesheet, or in the style tags on the page(s) you're putting icons on, whichever you prefer! Tweak as needed, but only AFTER putting the icons in :'D
Code
svg{
    width: 1.5rem;
    margin: -67px 0px -69px;
    fill:white;
}

And that's pretty much the whole setup! then, wherever you need icons, put this, switching out "name" for the name of whatever icon you're using. Again, the icons list in the site I made is much better, since it has every icon currently set up with this code snippet copy/paste-able.
Code
<svg><use xlink:href="#icon-name"></use></svg>

Sooooo yeah! I wanted to share this, since I've been working on it for a bit, and I'm pretty happy with it! I wanna find a way to make it work with a link so you don't have to download anything, but even in its current state, it gets the job done. It works well as far as I've tested, but if anyone has suggestions (either for specific carrd icons or for how to improve it), please let me know! I hope this can be helpful to somebody :D
Logged

Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Pixel Art - Mini Contest - New message icons!

Started by MelooonBoard ☑︎ ∙ Events and Activities

Replies: 21
Views: 5306
Last post July 18, 2024 @680.65
by Zunne
POLL: How many personal sites have you built?

Started by xandraBoard ✁ ∙ Web Crafting

Replies: 37
Views: 6794
Last post December 05, 2024 @794.73
by pencilz
I am new to making sites and I want some tips to improve.

Started by Icey!Board ☔︎ ∙ I need Help!

Replies: 4
Views: 2307
Last post December 14, 2021 @853.48
by Icey!

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi