Leave a comment

DRY Social Media Links

Nice idea. You could go one step further and have the social_media as a variable in your controller.


I went a little crazy with social media links last night. I wanted to make a nice nav element full of them. First I found a great github repository and site for the images called simpleicons.org.

With all those great icon options I ended up wanting to make nine links but I wanted to keep things DRY so I used an array and a loop. I was pretty pleased with the result.


This code is available in a github gist for easy copying. Happy Coding!

View original post

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: