parent
6974b5bf3a
commit
91cfe496aa
6 changed files with 115 additions and 80 deletions
|
|
@ -87,11 +87,13 @@ post-preview-words: 96
|
|||
|
||||
paginate: 5
|
||||
|
||||
email-share: True
|
||||
fb-share: True
|
||||
twitter-share: True
|
||||
reddit-share: True
|
||||
google-plus-share: True
|
||||
linkedin-share: True
|
||||
tumblr-share: True
|
||||
pinterest-share: True
|
||||
vkontakte-share: True
|
||||
disqus-shortname: "panossakkos"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
<link href="//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
|
||||
<link href="//fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="stylesheet" href="{{site.baseurl}}/css/rrssb.css" />
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
|
|
|
|||
|
|
@ -102,20 +102,7 @@ $(window).scroll(toggleNavCollapse);$(function(){$("a.page-scroll").bind("click"
|
|||
|
||||
<!-- Share buttons Start -->
|
||||
|
||||
{% if site.twitter-share %}
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
{% endif %}
|
||||
|
||||
{% if site.fb-share %}
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
{% endif %}
|
||||
<script src="{{site.baseurl}}/js/rrssb.min.js"></script>
|
||||
|
||||
<!-- Share buttons End -->
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +1,115 @@
|
|||
|
||||
<!-- Share Buttons Start -->
|
||||
|
||||
<div>
|
||||
|
||||
{% if site.fb-share %}
|
||||
<div style="float:left; vertical-align:top">
|
||||
<div class="fb-share-button" data-href="{{site.url}}{{site.baseurl}}{{page.url}}" data-layout="button_count"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if site.twitter-share %}
|
||||
<div style="float:left; padding: 0 5px; vertical-align:top">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="{{site.url}}{{ site.baseurl}}{{page.url}}" data-text="{{page.title}} {% for tag in page.tags%}#{{ tag }} {% endfor %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if site.reddit-share %}
|
||||
<div style="float:left; padding: 0 5px; vertical-align:top">
|
||||
<script type="text/javascript">reddit_newwindow='1'</script>
|
||||
<script type="text/javascript">reddit_title='{{page.title}}'</script>
|
||||
<script type="text/javascript">reddit_url='{{site.url}}{{site.baseurl}}{{page.url}}'</script>
|
||||
<script type="text/javascript" src="//www.redditstatic.com/button/button1.js"></script>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if site.linkedin-share %}
|
||||
<div style="float:left; padding: 0 5px; vertical-align:top; background-color: #0077B5; border-radius:3px">
|
||||
<a style="color: #fff; vertical-align:middle; align: middle;" href="https://www.linkedin.com/cws/share?url={{site.url}}{{site.baseurl}}{{page.url}}&title={{site.title}} | {{page.title}}&lang=en_US" target="_blank"><i class="fa fa-linkedin"></i> | Share</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if site.pinterest-share %}
|
||||
<div style="float:left; padding: 0 5px; vertical-align:top">
|
||||
<script type="text/javascript" async defer src="//assets.pinterest.com/js/pinit.js"></script>
|
||||
<a data-pin-do="buttonPin" href="https://www.pinterest.com/pin/create/button/" data-pin-config="beside" data-pin-description="{{page.description}}" data-pin-url="{{site.url}}{{ site.baseurl}}{{page.url}}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if site.google-plus-share %}
|
||||
<div style="float:left; padding: 0 5px; vertical-align:top">
|
||||
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
||||
<div class="g-plus" data-action="share" data-href="{{site.url}}{{ site.baseurl}}{{page.url}}" data-annotation="bubble"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if site.vkontakte-share %}
|
||||
<div style="float:left; padding: 0 5px; vertical-align:top; background-color: #0077B5; border-radius:3px">
|
||||
<style type="text/css">
|
||||
vk {color: #fff;}
|
||||
</style>
|
||||
<script type="text/javascript" src="https://vk.com/js/api/share.js?9"; charset="windows-1251"></script>
|
||||
<script type="text/javascript">
|
||||
document.write(VK.Share.button(
|
||||
{
|
||||
url: '{{site.url}}{{ site.baseurl}}{{page.url}}',
|
||||
title: '{{site.title}} | {{page.title}}',
|
||||
description: '{{page.description}}',
|
||||
},
|
||||
{
|
||||
type: 'custom',
|
||||
text: '<vk><i class="fa fa-vk"></i> Share</vk>'
|
||||
}
|
||||
));
|
||||
</script>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<ul class="rrssb-buttons clearfix">
|
||||
{% if site.email-share %}
|
||||
<li class="rrssb-email">
|
||||
<a href="mailto:?subject={{page.title}}&body={{site.url}}{{site.baseurl}}{{page.url}}">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
||||
<path d="M20.11 26.147c-2.335 1.05-4.36 1.4-7.124 1.4C6.524 27.548.84 22.916.84 15.284.84 7.343 6.602.45 15.4.45c6.854 0 11.8 4.7 11.8 11.252 0 5.684-3.193 9.265-7.398 9.3-1.83 0-3.153-.934-3.347-2.997h-.077c-1.208 1.986-2.96 2.997-5.023 2.997-2.532 0-4.36-1.868-4.36-5.062 0-4.75 3.503-9.07 9.11-9.07 1.713 0 3.7.4 4.6.972l-1.17 7.203c-.387 2.298-.115 3.3 1 3.4 1.674 0 3.774-2.102 3.774-6.58 0-5.06-3.27-8.994-9.304-8.994C9.05 2.87 3.83 7.545 3.83 14.97c0 6.5 4.2 10.2 10 10.202 1.987 0 4.09-.43 5.647-1.245l.634 2.22zM16.647 10.1c-.31-.078-.7-.155-1.207-.155-2.572 0-4.596 2.53-4.596 5.53 0 1.5.7 2.4 1.9 2.4 1.44 0 2.96-1.83 3.31-4.088l.592-3.72z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="rrssb-text">email</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.fb-share %}
|
||||
<li class="rrssb-facebook">
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{site.url}}{{site.baseurl}}{{page.url}}&title={{page.title}}" class="popup">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" width="29" height="29" viewBox="0 0 29 29"><path d="M26.4 0H2.6C1.714 0 0 1.715 0 2.6v23.8c0 .884 1.715 2.6 2.6 2.6h12.393V17.988h-3.996v-3.98h3.997v-3.062c0-3.746 2.835-5.97 6.177-5.97 1.6 0 2.444.173 2.845.226v3.792H21.18c-1.817 0-2.156.9-2.156 2.168v2.847h5.045l-.66 3.978h-4.386V29H26.4c.884 0 2.6-1.716 2.6-2.6V2.6c0-.885-1.716-2.6-2.6-2.6z"
|
||||
class="cls-2" fill-rule="evenodd"/></svg>
|
||||
</span>
|
||||
<span class="rrssb-text">facebook</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.twitter-share %}
|
||||
<li class="rrssb-twitter">
|
||||
<a href="https://twitter.com/share?url={{site.url}}{{site.baseurl}}{{page.url}}&text={{page.title}}"
|
||||
class="popup">
|
||||
<span class="rrssb-icon"><svg xmlns="https://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><path d="M24.253 8.756C24.69 17.08 18.297 24.182 9.97 24.62c-3.122.162-6.22-.646-8.86-2.32 2.702.18 5.375-.648 7.507-2.32-2.072-.248-3.818-1.662-4.49-3.64.802.13 1.62.077 2.4-.154-2.482-.466-4.312-2.586-4.412-5.11.688.276 1.426.408 2.168.387-2.135-1.65-2.73-4.62-1.394-6.965C5.574 7.816 9.54 9.84 13.802 10.07c-.842-2.738.694-5.64 3.434-6.48 2.018-.624 4.212.043 5.546 1.682 1.186-.213 2.318-.662 3.33-1.317-.386 1.256-1.248 2.312-2.4 2.942 1.048-.106 2.07-.394 3.02-.85-.458 1.182-1.343 2.15-2.48 2.71z"/></svg></span>
|
||||
<span class="rrssb-text">twitter</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.linkedin-share %}
|
||||
<li class="rrssb-linkedin">
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{site.url}}{{site.baseurl}}{{page.url}}" class="popup">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
||||
<path d="M25.424 15.887v8.447h-4.896v-7.882c0-1.98-.71-3.33-2.48-3.33-1.354 0-2.158.91-2.514 1.802-.13.315-.162.753-.162 1.194v8.216h-4.9s.067-13.35 0-14.73h4.9v2.087c-.01.017-.023.033-.033.05h.032v-.05c.65-1.002 1.812-2.435 4.414-2.435 3.222 0 5.638 2.106 5.638 6.632zM5.348 2.5c-1.676 0-2.772 1.093-2.772 2.54 0 1.42 1.066 2.538 2.717 2.546h.032c1.71 0 2.77-1.132 2.77-2.546C8.056 3.593 7.02 2.5 5.344 2.5h.005zm-2.48 21.834h4.896V9.604H2.867v14.73z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="rrssb-text">linkedin</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.reddit-share %}
|
||||
<li class="rrssb-reddit">
|
||||
<a href="https://www.reddit.com/submit?url={{site.url}}{{site.baseurl}}{{page.url}}&title={{page.title}}" target="_blank">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
||||
<path d="M11.794 15.316c0-1.03-.835-1.895-1.866-1.895-1.03 0-1.893.866-1.893 1.896s.863 1.9 1.9 1.9c1.023-.016 1.865-.916 1.865-1.9zM18.1 13.422c-1.03 0-1.895.864-1.895 1.895 0 1 .9 1.9 1.9 1.865 1.03 0 1.87-.836 1.87-1.865-.006-1.017-.875-1.917-1.875-1.895zM17.527 19.79c-.678.68-1.826 1.007-3.514 1.007h-.03c-1.686 0-2.834-.328-3.51-1.005-.264-.265-.693-.265-.958 0-.264.265-.264.7 0 1 .943.9 2.4 1.4 4.5 1.402.005 0 0 0 0 0 .005 0 0 0 0 0 2.066 0 3.527-.46 4.47-1.402.265-.264.265-.693.002-.958-.267-.334-.688-.334-.988-.043z"
|
||||
/>
|
||||
<path d="M27.707 13.267c0-1.785-1.453-3.237-3.236-3.237-.792 0-1.517.287-2.08.76-2.04-1.294-4.647-2.068-7.44-2.218l1.484-4.69 4.062.955c.07 1.4 1.3 2.6 2.7 2.555 1.488 0 2.695-1.208 2.695-2.695C25.88 3.2 24.7 2 23.2 2c-1.06 0-1.98.616-2.42 1.508l-4.633-1.09c-.344-.082-.693.117-.803.454l-1.793 5.7C10.55 8.6 7.7 9.4 5.6 10.75c-.594-.45-1.3-.75-2.1-.72-1.785 0-3.237 1.45-3.237 3.2 0 1.1.6 2.1 1.4 2.69-.04.27-.06.55-.06.83 0 2.3 1.3 4.4 3.7 5.9 2.298 1.5 5.3 2.3 8.6 2.325 3.227 0 6.27-.825 8.57-2.325 2.387-1.56 3.7-3.66 3.7-5.917 0-.26-.016-.514-.05-.768.965-.465 1.577-1.565 1.577-2.698zm-4.52-9.912c.74 0 1.3.6 1.3 1.3 0 .738-.6 1.34-1.34 1.34s-1.343-.602-1.343-1.34c.04-.655.596-1.255 1.396-1.3zM1.646 13.3c0-1.038.845-1.882 1.883-1.882.31 0 .6.1.9.21-1.05.867-1.813 1.86-2.26 2.9-.338-.328-.57-.728-.57-1.26zm20.126 8.27c-2.082 1.357-4.863 2.105-7.83 2.105-2.968 0-5.748-.748-7.83-2.105-1.99-1.3-3.087-3-3.087-4.782 0-1.784 1.097-3.484 3.088-4.784 2.08-1.358 4.86-2.106 7.828-2.106 2.967 0 5.7.7 7.8 2.106 1.99 1.3 3.1 3 3.1 4.784C24.86 18.6 23.8 20.3 21.8 21.57zm4.014-6.97c-.432-1.084-1.19-2.095-2.244-2.977.273-.156.59-.245.928-.245 1.036 0 1.9.8 1.9 1.9-.016.522-.27 1.022-.57 1.327z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="rrssb-text">reddit</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.google-plus-share %}
|
||||
<li class="rrssb-googleplus">
|
||||
<a href="https://plus.google.com/share?url={{site.url}}{{site.baseurl}}{{page.url}}" class="popup">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M21 8.29h-1.95v2.6h-2.6v1.82h2.6v2.6H21v-2.6h2.6v-1.885H21V8.29zM7.614 10.306v2.925h3.9c-.26 1.69-1.755 2.925-3.9 2.925-2.34 0-4.29-2.016-4.29-4.354s1.885-4.353 4.29-4.353c1.104 0 2.014.326 2.794 1.105l2.08-2.08c-1.3-1.17-2.924-1.883-4.874-1.883C3.65 4.586.4 7.835.4 11.8s3.25 7.212 7.214 7.212c4.224 0 6.953-2.988 6.953-7.082 0-.52-.065-1.104-.13-1.624H7.614z"/></svg>
|
||||
</span>
|
||||
<span class="rrssb-text">google+</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.tumblr-share %}
|
||||
<li class="rrssb-tumblr">
|
||||
<a href="https://tumblr.com/share/link?url={{site.url}}{{site.baseurl}}{{page.url}}" target="_blank">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
||||
<path d="M18.02 21.842c-2.03.052-2.422-1.396-2.44-2.446v-7.294h4.73V7.874H15.6V1.592h-3.714s-.167.053-.182.186c-.218 1.935-1.144 5.33-4.988 6.688v3.637h2.927v7.677c0 2.8 1.7 6.7 7.3 6.6 1.863-.03 3.934-.795 4.392-1.453l-1.22-3.54c-.52.213-1.415.413-2.115.455z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="rrssb-text">tumblr</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.pinterest-share %}
|
||||
<li class="rrssb-pinterest">
|
||||
<a href="https://pinterest.com/pin/create/button/?url={{site.url}}{{site.baseurl}}{{page.url}}" target="_blank">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
||||
<path d="M14.02 1.57c-7.06 0-12.784 5.723-12.784 12.785S6.96 27.14 14.02 27.14c7.062 0 12.786-5.725 12.786-12.785 0-7.06-5.724-12.785-12.785-12.785zm1.24 17.085c-1.16-.09-1.648-.666-2.558-1.22-.5 2.627-1.113 5.146-2.925 6.46-.56-3.972.822-6.952 1.462-10.117-1.094-1.84.13-5.545 2.437-4.632 2.837 1.123-2.458 6.842 1.1 7.557 3.71.744 5.226-6.44 2.924-8.775-3.324-3.374-9.677-.077-8.896 4.754.19 1.178 1.408 1.538.49 3.168-2.13-.472-2.764-2.15-2.683-4.388.132-3.662 3.292-6.227 6.46-6.582 4.008-.448 7.772 1.474 8.29 5.24.58 4.254-1.815 8.864-6.1 8.532v.003z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="rrssb-text">pinterest</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.vkontakte-share %}
|
||||
<li class="rrssb-vk">
|
||||
<a href="https://vk.com/share.php?url={{site.url}}{{site.baseurl}}{{page.url}}" class="popup">
|
||||
<span class="rrssb-icon">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="28" height="28" viewBox="70 70 378.7 378.7"><path d="M254.998 363.106h21.217s6.408-.706 9.684-4.23c3.01-3.24 2.914-9.32 2.914-9.32s-.415-28.47 12.796-32.663c13.03-4.133 29.755 27.515 47.482 39.685 13.407 9.206 23.594 7.19 23.594 7.19l47.407-.662s24.797-1.53 13.038-21.027c-.96-1.594-6.85-14.424-35.247-40.784-29.728-27.59-25.743-23.126 10.063-70.85 21.807-29.063 30.523-46.806 27.8-54.405-2.596-7.24-18.636-5.326-18.636-5.326l-53.375.33s-3.96-.54-6.892 1.216c-2.87 1.716-4.71 5.726-4.71 5.726s-8.452 22.49-19.714 41.618c-23.77 40.357-33.274 42.494-37.16 39.984-9.037-5.842-6.78-23.462-6.78-35.983 0-39.112 5.934-55.42-11.55-59.64-5.802-1.4-10.076-2.327-24.915-2.48-19.046-.192-35.162.06-44.29 4.53-6.072 2.975-10.757 9.6-7.902 9.98 3.528.47 11.516 2.158 15.75 7.92 5.472 7.444 5.28 24.154 5.28 24.154s3.145 46.04-7.34 51.758c-7.193 3.922-17.063-4.085-38.253-40.7-10.855-18.755-19.054-39.49-19.054-39.49s-1.578-3.873-4.398-5.947c-3.42-2.51-8.2-3.307-8.2-3.307l-50.722.33s-7.612.213-10.41 3.525c-2.488 2.947-.198 9.036-.198 9.036s39.707 92.902 84.672 139.72c41.234 42.93 88.048 40.112 88.048 40.112"/></svg>
|
||||
</span>
|
||||
<span class="rrssb-text">vk.com</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Share Buttons End -->
|
||||
|
|
|
|||
1
css/rrssb.css
Normal file
1
css/rrssb.css
Normal file
File diff suppressed because one or more lines are too long
1
js/rrssb.min.js
vendored
Normal file
1
js/rrssb.min.js
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
+function(t,e,r){"use strict";var i={calc:!1};e.fn.rrssb=function(t){var i=e.extend({description:r,emailAddress:r,emailBody:r,emailSubject:r,image:r,title:r,url:r},t);for(var s in i)i.hasOwnProperty(s)&&i[s]!==r&&(i[s]=n(i[s]));i.url!==r&&(e(this).find(".rrssb-facebook a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+i.url),e(this).find(".rrssb-tumblr a").attr("href","http://tumblr.com/share/link?url="+i.url+(i.title!==r?"&name="+i.title:"")+(i.description!==r?"&description="+i.description:"")),e(this).find(".rrssb-linkedin a").attr("href","http://www.linkedin.com/shareArticle?mini=true&url="+i.url+(i.title!==r?"&title="+i.title:"")+(i.description!==r?"&summary="+i.description:"")),e(this).find(".rrssb-twitter a").attr("href","https://twitter.com/intent/tweet?text="+(i.description!==r?i.description:"")+"%20"+i.url),e(this).find(".rrssb-hackernews a").attr("href","https://news.ycombinator.com/submitlink?u="+i.url+(i.title!==r?"&text="+i.title:"")),e(this).find(".rrssb-reddit a").attr("href","http://www.reddit.com/submit?url="+i.url+(i.description!==r?"&text="+i.description:"")+(i.title!==r?"&title="+i.title:"")),e(this).find(".rrssb-googleplus a").attr("href","https://plus.google.com/share?url="+(i.description!==r?i.description:"")+"%20"+i.url),e(this).find(".rrssb-pinterest a").attr("href","http://pinterest.com/pin/create/button/?url="+i.url+(i.image!==r?"&media="+i.image:"")+(i.description!==r?"&description="+i.description:"")),e(this).find(".rrssb-pocket a").attr("href","https://getpocket.com/save?url="+i.url),e(this).find(".rrssb-github a").attr("href",i.url)),i.emailAddress!==r&&e(this).find(".rrssb-email a").attr("href","mailto:"+i.emailAddress+"?"+(i.emailSubject!==r?"subject="+i.emailSubject:"")+(i.emailBody!==r?"&body="+i.emailBody:""))};var s=function(){var t=e("<div>"),r=["calc","-webkit-calc","-moz-calc"];e("body").append(t);for(var s=0;s<r.length;s++)if(t.css("width",r[s]+"(1px)"),1===t.width()){i.calc=r[s];break}t.remove()},n=function(t){if(t!==r&&null!==t){if(null===t.match(/%[0-9a-f]{2}/i))return encodeURIComponent(t);t=decodeURIComponent(t),n(t)}},a=function(){e(".rrssb-buttons").each(function(t){var r=e(this),i=e("li:visible",r),s=i.length,n=100/s;i.css("width",n+"%").attr("data-initwidth",n)})},l=function(){e(".rrssb-buttons").each(function(t){var r=e(this),i=r.width(),s=e("li",r).not(".small").first().width();s>170&&e("li.small",r).length<1?r.addClass("large-format"):r.removeClass("large-format"),200>i?r.removeClass("small-format").addClass("tiny-format"):r.removeClass("tiny-format")})},o=function(){e(".rrssb-buttons").each(function(t){var r=e(this),i=e("li",r),s=i.filter(".small"),n=0,a=0,l=s.first(),o=parseFloat(l.attr("data-size"))+55,c=s.length;if(c===i.length){var d=42*c,m=r.width();m>d+o&&(r.removeClass("small-format"),s.first().removeClass("small"),h())}else{i.not(".small").each(function(t){var r=e(this),i=parseFloat(r.attr("data-size"))+55,s=parseFloat(r.width());n+=s,a+=i});var u=n-a;u>o&&(l.removeClass("small"),h())}})},c=function(t){e(".rrssb-buttons").each(function(t){var r=e(this),i=e("li",r);e(i.get().reverse()).each(function(t,r){var s=e(this);if(s.hasClass("small")===!1){var n=parseFloat(s.attr("data-size"))+55,a=parseFloat(s.width());if(n>a){var l=i.not(".small").last();e(l).addClass("small"),h()}}--r||o()})}),t===!0&&m(h)},h=function(){e(".rrssb-buttons").each(function(t){var r,s,n,l,o,c=e(this),h=e("li",c),d=h.filter(".small"),m=d.length;m>0&&m!==h.length?(c.removeClass("small-format"),d.css("width","42px"),n=42*m,r=h.not(".small").length,s=100/r,o=n/r,i.calc===!1?(l=(c.innerWidth()-1)/r-o,l=Math.floor(1e3*l)/1e3,l+="px"):l=i.calc+"("+s+"% - "+o+"px)",h.not(".small").css("width",l)):m===h.length?(c.addClass("small-format"),a()):(c.removeClass("small-format"),a())}),l()},d=function(){e(".rrssb-buttons").each(function(t){e(this).addClass("rrssb-"+(t+1))}),s(),a(),e(".rrssb-buttons li .rrssb-text").each(function(t){var r=e(this),i=r.width();r.closest("li").attr("data-size",i)}),c(!0)},m=function(t){e(".rrssb-buttons li.small").removeClass("small"),c(),t()},u=function(e,i,s,n){var a=t.screenLeft!==r?t.screenLeft:screen.left,l=t.screenTop!==r?t.screenTop:screen.top,o=t.innerWidth?t.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,c=t.innerHeight?t.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,h=o/2-s/2+a,d=c/3-n/3+l,m=t.open(e,i,"scrollbars=yes, width="+s+", height="+n+", top="+d+", left="+h);t.focus&&m.focus()},f=function(){var t={};return function(e,r,i){i||(i="Don't call this twice without a uniqueId"),t[i]&&clearTimeout(t[i]),t[i]=setTimeout(e,r)}}();e(document).ready(function(){e(document).on("click",".rrssb-buttons a.popup",{},function(t){var r=e(this);u(r.attr("href"),r.find(".rrssb-text").html(),580,470),t.preventDefault()}),e(t).resize(function(){m(h),f(function(){m(h)},200,"finished resizing")}),d()}),t.rrssbInit=d}(window,jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue