Recent Posts

Creating and styling social Media buttons

Sunday, March 24, 2019
Step 1 - LOAD AN ICON LIBRARY:

<!-- Load an icon library for example-->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">


Step 2 - ADD HTML IN THE BODY SECTION:

search for

<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/> 


and paste the following HTML code below it



<!-- Add font awesome icons -->
<a href="#" class="fa fa-facebook"></a>
<a href="#" class="fa fa-twitter"></a>
<a href="#" class="fa fa-google"></a>
<a href="#" class="fa fa-google-plus"></a>
<a href="#" class="fa fa-linkedin"></a>
<a href="#" class="fa fa-youtube"></a>
<a href="#" class="fa fa-instagram"></a>
<a href="#" class="fa fa-whatsapp"></a>
<a href="#" class="fa fa-vk"></a>
<a href="#" class="fa fa-pinterest"></a>
<a href="#" class="fa fa-snapchat"></a>
<a href="#" class="fa fa-snapchat-ghost"></a>
<a href="#" class="fa fa-skype"></a>
<a href="#" class="fa fa-android"></a>
<a href="#" class="fa fa-dribbble"></a>
<a href="#" class="fa fa-vimeo"></a>
<a href="#" class="fa fa-tumblr"></a>
<a href="#" class="fa fa-vine"></a>
<a href="#" class="fa fa-foursquare"></a>
<a href="#" class="fa fa-stumbleupon"></a>
<a href="#" class="fa fa-flickr"></a>
<a href="#" class="fa fa-yahoo"></a>
<a href="#" class="fa fa-reddit"></a>
<a href="#" class="fa fa-rss"></a>
<a href="#" class="fa fa-github"></a>   
<a href="#" class="fa fa-digg"></a> 
<a href="#" class="fa fa-amazon"></a> 
<a href="#" class="fa fa-soundcloud"></a>
<a href="#" class="fa fa-telegram"></a> 
<a href="#" class="fa fa-quora"></a>  
<a href="#" class="fa fa-delicious"></a>

Take note: If you also want the social media bar to show on HomePage, search for

<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>

and post the HTML which is above, below the searched code




Step 3 - ADD CSS IN THE HEAD SECTION:




<style>

body {margin:0;}



.icon-bar {

  width: 100%;

  background-color: whitesmoke;

  overflow: auto;

}



.icon-bar a {

  float: left;

  width: 8%;

  text-align: center;

  padding: 5px 0;

  transition: all 0.3s ease;

  color: white;

  font-size: 25px;

}



.icon-bar a:hover {

  background-color: #000;

}



.active {

  background-color: #4CAF50;

}



/* Style all font awesome icons */

.fa {

  padding: 20px;

  font-size: 10px;

  width: 10px;

  text-align: center;

  text-decoration: none;

  margin: 5px 2px;

  border-radius: 50%; /* Add border-radius:50% to create round buttons, and reduce the width */

}



/* Add a hover effect if you want */

.fa:hover {

    opacity: 0.7;

}



/* Set a specific color for each brand */



/* Facebook */

.fa-facebook {

  background: #3B5998;

  color: white;

}



/* Twitter */

.fa-twitter {

  background: #55ACEE;

  color: white;

}



/* Google */

.fa-google {

  background: #dd4b39;

  color: white;

}



/* Google plus */

.fa-google-plus {

  background: #f81212;

  color: white;

}



/* Linked in */

.fa-linkedin {

  background: #007bb5;

  color: white;

}



/* Youtube */

.fa-youtube {

  background: #bb0000;

  color: white;

}



/* Instagram */

.fa-instagram {

  background: #125688;

  color: white;

}



/* Whatsapp */

.fa-whatsapp {

  background: #5fcc2f;

  color: white;

}



/* Vk */

.fa-vk {

  background: #238be9;

  color: white;

}



/* Pinterest */

.fa-pinterest {

  background: #cb2027;

  color: white;

}



/* Snapchat */

.fa-snapchat {

  background: #f8f821;

  color: white;

}



/* Snapchat ghost */

.fa-snapchat-ghost {

  background: #fffc00;

  color: white;

  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;

}



/* Skype */

.fa-skype {

  background: #00aff0;

  color: white;

}



/* Android */

.fa-android {

  background: #a4c639;

  color: white;

}



/* Dribble */

.fa-dribbble {

  background: #ea4c89;

  color: white;

}



/* Vimeo */

.fa-vimeo {

  background: #45bbff;

  color: white;

}



/* Tumblr */

.fa-tumblr {

  background: #2c4762;

  color: white;

}



/* Vine */

.fa-vine {

  background: #00b489;

  color: white;

}



/* Foursquare */

.fa-foursquare {

  background: #45bbff;

  color: white;

}



/* Stumbleupon */

.fa-stumbleupon {

  background: #eb4924;

  color: white;

}



/* Flickr */

.fa-flickr {

  background: #f40083;

  color: white;

}



/* Yahoo */

.fa-yahoo {

  background: #430297;

  color: white;

}



/* Reddit */

.fa-reddit {

  background: #ff5700;

  color: white;

}



/* Rss */

.fa-rss {

  background: #ff6600;

  color: white;

}



/* Github */

.fa-github {

  background: #000000;

  color: white;

}



/* Digg */

.fa-digg {

  background: #6fa8dc;

  color: white;

}



/* Amazon */

.fa-amazon {

  background: #444444;

  color: white;

}



/* Soundcloud */

.fa-soundcloud {

  background: #ff5500;

  color: white;

}



/* Telegram */

.fa-telegram {

  background: #1272c9;

  color: white;

}



/* Quora */

.fa-quora {

  background: #cc0000;

  color: white;

}



/* Delicious */

.fa-delicious {

  background: #e06666;

  color: white;

}

</style>

No comments:

Post a Comment