Будь в курсе событий!

01.12.2013

Виджет социальные кнопки, в стиле Метро.

Leave a Comment
 


Этот урок будет про установку уникальных кнопок,уникальны они тем что эти социальные кнопки имеют вид  в стиле метро. И помимо того очень красивый раздвижной эффект при навелении на них.Они привлекают к себе взляд, а вставляются они как раз под каждый ваш пост ваших сообщений. И сейчас я дам вам уважаемые читатели так такие кнопочки поставить себе на свой веб ресурс. Начать нам стоит с того, сначала надо зайти в шаблон своего блога, а для этого жмем Шаблон в меню справа далее Изменить HTML . Потом зажимаем CTR+F,
и в открывшимся окошке поиска ищем тег </head>  далее выше него вставляем этот код.
<style type='text/css'>
      /*<![CDATA[*/@import url(http://fonts.googleapis.com/css?family=Open+Sans:400);@import "//netdna.bootstrapcdn.com/font-awesome/3.0/css/font-awesome.css";#sbuttons {    border-radius: 5px;    padding: 14px 7px;    background: white;    width: 680px;    overflow: hidden;    margin: 2px auto 0;    box-shadow:0 2px 3px rgba(71, 71, 71, 0.31);}.button {    background: #DCE0E0;    position: relative;    display: block;    float: left;    height: 40px;    margin: 0 7px;    overflow: hidden;    width: 150px;    border-radius: 3px;    -o-border-radius: 3px;    -ms-border-radius: 3px;    -moz-border-radius: 3px;    -webkit-border-radius: 3px;}.icon {    display: block;    float: left;    position: relative;    z-index: 3;    height: 100%;    vertical-align: top;    width: 38px;    -moz-border-radius-topleft: 3px;    -moz-border-radius-topright: 0px;    -moz-border-radius-bottomright: 0px;    -moz-border-radius-bottomleft: 3px;    -webkit-border-radius: 3px 0px 0px 3px;    border-radius: 3px 0px 0px 3px;    text-align: center;}.icon i {    color: #fff;    line-height: 42px;}.slide {    z-index: 2;    display: block;    margin: 0;    height: 100%;    left: 38px;    position: absolute;    width: 112px;    -moz-border-radius-topleft: 0px;    -moz-border-radius-topright: 3px;    -moz-border-radius-bottomright: 3px;    -moz-border-radius-bottomleft: 0px;    -webkit-border-radius: 0px 3px 3px 0px;    border-radius: 0px 3px 3px 0px;}.slide p {    font-family: Open Sans;    font-weight: 400;    border-left: 1px solid #fff;    border-left: 1px solid rgba(255,255,255,0.35);    color: #fff;    font-size: 16px;    left: 0;    margin: 0;    position: absolute;    text-align: center;    top: 10px;    width: 100%;}.button .slide {    -webkit-transition: all 0.2s ease-in-out;    -moz-transition: all 0.2s ease-in-out;    -ms-transition: all 0.2s ease-in-out;    -o-transition: all 0.2s ease-in-out;    transition: all 0.2s ease-in-out;}.facebook iframe {    display: block;    position: absolute;    right: -16px;    top: 10px;    z-index: 1;}.twitter iframe {    width: 90px !important;    right: 5px;    top: 10px;    z-index: 1;    display: block;    position: absolute;}.google #___plusone_0 {    width: 70px !important;    top: 10px;    right: 15px;    position: absolute;    display: block;    z-index: 1;}.linkedin .IN-widget {    top: 10px;    right: 2px;    position: absolute;    display: block;    z-index: 1;}.facebook:hover .slide {    left: 150px;}.twitter:hover .slide {    top: -40px;}.google:hover .slide {    bottom: -40px;}.linkedin:hover .slide {    left: -150px;}.facebook .icon, .facebook .slide {    background: #305c99;}.twitter .icon, .twitter .slide {    background: #00cdff;}.google .icon, .google .slide {    background: #d24228;}.linkedin .icon, .linkedin .slide {    background: #007bb6;}  /*]]>*/</style>

А далее так же в строке поиска ищем строчку кода.

<div class='post-footer-line post-footer-line-1'>

И после нее вставляем вот этот скрипт.



&lt;b:if cond=&#39;data:blog.pageType == &quot;item&quot;&#39;&gt;
                          &lt;div id=&quot;sbuttons&quot;&gt;  &lt;div class=&quot;facebook button&quot;&gt;    &lt;i class=&quot;icon&quot;&gt;      &lt;i class=&quot;icon-facebook&quot;&gt;    &lt;/i&gt;  &lt;/i&gt;  &lt;div class=&quot;slide&quot;&gt;    &lt;p&gt;      facebook    &lt;/p&gt;  &lt;/div&gt;  &lt;iframe src=&quot;//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Freference%2Fplugins%2Flike&amp;&amp;send=&amp;&amp;falselayout=button_count&amp;&amp;width=80&amp;&amp;show_faces=false&amp;&amp;font&amp;&amp;colorscheme=light&amp;&amp;action=like&amp;&amp;height=20&amp;&amp;appId=307475409394594&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:80px; height:20px;&quot; allowTransparency=&quot;true&quot;&gt;  &lt;/iframe&gt;  &lt;/div&gt;  &lt;div class=&quot;twitter button&quot;&gt;    &lt;i class=&quot;icon&quot;&gt;      &lt;i class=&quot;icon-twitter&quot;&gt;    &lt;/i&gt;  &lt;/i&gt;  &lt;div class=&quot;slide&quot;&gt;    &lt;p&gt;      twitter    &lt;/p&gt;  &lt;/div&gt;  &lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;digitalhubinc&quot;&gt;    Tweet  &lt;/a&gt;  &lt;script&gt;    !function(d,s,id){      var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?&#39;http&#39;:&#39;https&#39;;      if(!d.getElementById(id)){        js=d.createElement(s);        js.id=id; js.src=p+&#39;://platform.twitter.com/widgets.js&#39;;fjs.parentNode.insertBefore(js,fjs);}}(document, &#39;script&#39;, &#39;twitter-wjs&#39;);  &lt;/script&gt;  &lt;/div&gt;  &lt;div class=&quot;google button&quot;&gt;    &lt;i class=&quot;icon&quot;&gt;      &lt;i class=&quot;icon-google-plus&quot;&gt;    &lt;/i&gt;  &lt;/i&gt;  &lt;div class=&quot;slide&quot;&gt;    &lt;p&gt;      google+    &lt;/p&gt;  &lt;/div&gt;  &lt;!-- Place this tag where you want the +1 button to render. --&gt;  &lt;div class=&quot;g-plusone&quot; data-size=&quot;medium&quot;&gt;  &lt;/div&gt;  &lt;!-- Place this tag after the last +1 button tag. --&gt;  &lt;script type=&quot;text/javascript&quot;&gt;    (function() {      var po = document.createElement(&#39;script&#39;);      po.type = &#39;text/javascript&#39;;      po.async = true;      po.src = &#39;https://apis.google.com/js/plusone.js&#39;;      var s = document.getElementsByTagName(&#39;script&#39;)[0];      s.parentNode.insertBefore(po, s);    }    )();  &lt;/script&gt;  &lt;/div&gt;  &lt;div class=&quot;linkedin button&quot;&gt;    &lt;i class=&quot;icon&quot;&gt;      &lt;i class=&quot;icon-linkedin&quot;&gt;    &lt;/i&gt;  &lt;/i&gt;  &lt;div class=&quot;slide&quot;&gt;    &lt;p&gt;      linkedin    &lt;/p&gt;  &lt;/div&gt;  &lt;script type=&quot;IN/Share&quot; data-counter=&quot;right&quot;&gt;  &lt;/script&gt;  &lt;script src=&quot;//platform.linkedin.com/in.js&quot; type=&quot;text/javascript&quot;&gt;    lang: en_US  &lt;/script&gt;  &lt;/div&gt;&lt;/div&gt;&lt;/b:if&gt;

Не забываем все это добро сохранить.

0 коммент. :

© 2012-2017 Cash's from program