Skip to content

Commit 21f2fab

Browse files
committed
Adding social share privacy plugin
1 parent 96bd36a commit 21f2fab

File tree

77 files changed

+1052
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1052
-85
lines changed

.jekyll-metadata

96.3 KB
Binary file not shown.

Gemfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ GEM
1212
http_parser.rb (~> 0.6.0)
1313
eventmachine (1.2.7)
1414
execjs (2.7.0)
15-
ffi (1.13.1)
15+
ffi (1.14.2)
1616
forwardable-extended (2.6.0)
1717
htmlcompressor (0.4.0)
1818
http_parser.rb (0.6.0)
19-
i18n (1.8.5)
19+
i18n (1.8.7)
2020
concurrent-ruby (~> 1.0)
21-
jekyll (4.1.1)
21+
jekyll (4.2.0)
2222
addressable (~> 2.4)
2323
colorator (~> 1.0)
2424
em-websocket (~> 0.5)
2525
i18n (~> 1.0)
2626
jekyll-sass-converter (~> 2.0)
2727
jekyll-watch (~> 2.0)
28-
kramdown (~> 2.1)
28+
kramdown (~> 2.3)
2929
kramdown-parser-gfm (~> 1.0)
3030
liquid (~> 4.0)
3131
mercenary (~> 0.4.0)
3232
pathutil (~> 0.9)
3333
rouge (~> 3.0)
3434
safe_yaml (~> 1.0)
35-
terminal-table (~> 1.8)
35+
terminal-table (~> 2.0)
3636
jekyll-archives (2.2.1)
3737
jekyll (>= 3.6, < 5.0)
3838
jekyll-asciidoc (3.0.0)
@@ -54,15 +54,15 @@ GEM
5454
jekyll (>= 3.8, < 5.0)
5555
jekyll-watch (2.2.1)
5656
listen (~> 3.0)
57-
json (2.3.1)
57+
json (2.5.1)
5858
json-minify (0.0.3)
5959
json (> 0)
6060
kramdown (2.3.0)
6161
rexml
6262
kramdown-parser-gfm (1.1.0)
6363
kramdown (~> 2.0)
6464
liquid (4.0.3)
65-
listen (3.3.1)
65+
listen (3.4.0)
6666
rb-fsevent (~> 0.10, >= 0.10.3)
6767
rb-inotify (~> 0.9, >= 0.9.10)
6868
mercenary (0.4.0)
@@ -73,16 +73,16 @@ GEM
7373
pathutil (0.16.2)
7474
forwardable-extended (~> 2.6)
7575
public_suffix (4.0.6)
76-
rake (13.0.1)
76+
rake (13.0.3)
7777
rb-fsevent (0.10.4)
7878
rb-inotify (0.10.1)
7979
ffi (~> 1.0)
8080
rexml (3.2.4)
81-
rouge (3.25.0)
81+
rouge (3.26.0)
8282
safe_yaml (1.0.5)
8383
sassc (2.4.0)
8484
ffi (~> 1.9)
85-
terminal-table (1.8.0)
85+
terminal-table (2.0.0)
8686
unicode-display_width (~> 1.1, >= 1.1.1)
8787
uglifier (4.2.0)
8888
execjs (>= 0.3.0, < 3)

_includes/share-page.html

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
1-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
21
<div class="share-box">
3-
<h2>Share:</h2>
4-
5-
<a class="t" href="https://twitter.com/intent/tweet?text={{ page.title | url_encode}}&via={{ site.twitter_username }}&url={{ page.url | absolute_url | url_encode }}"
6-
onclick="window.open(this.href, 'pop-up', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"
7-
title="Share on Twitter">
8-
<i class="fa fa-twitter fa"></i><span> twitter</span>
9-
</a>
10-
11-
<a class="f" href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | absolute_url | url_encode }}" onclick="window.open(this.href, 'debezium',
12-
'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="Share on Facebook"><i class="fa fa-facebook-official fa"></i><span> facebook</span></a>
13-
14-
<a class="l" href="https://www.linkedin.com/shareArticle?mini=true&url={{site.url}}{{page.url}}" onclick="window.open(this.href, 'debezium',
15-
'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="Share on Linkedin"><i class="fa fa-linkedin fa"></i><span> linkedin</span></a>
16-
17-
<a class="r" href="http://www.reddit.com/submit?url={{site.url}}{{page.url}}}&title={{page.title}}" onclick="window.open(this.href, 'debezium',
18-
'left=20,top=20,width=900,height=500,toolbar=1,resizable=0'); return false;" title="Share on Reddit"><i class="fa fa-reddit fa"></i><span> reddit</span></a>
19-
20-
<a class="e" href="mailto:?subject={{ page.title}}&body=Check out this site {{site.url}}{{page.url}}" title="Share via Email"><i class="fa fa-envelope fa"></i><span> email</span></a>
21-
2+
<h3>Share:</h3>
3+
<div
4+
data-social-share-privacy='true'
5+
data-options='{
6+
"order" : ["fbshare", "twitter", "linkedin"]
7+
}'
8+
></div>
229
</div>
23-

_layouts/base.html

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,44 @@
3333
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
3434
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
3535
<script type="text/javascript" src="/assets/javascript/vanilla-back-to-top.min.js"></script>
36-
<script>
37-
addBackToTop({
38-
scrollDuration: 400
39-
})
36+
<script type="text/javascript" src="/assets/javascript/jquery.cookies.js"></script>
37+
<script type="text/javascript" src="/assets/socialshare/javascript/jquery.socialshareprivacy.min.autoload.js"></script>
38+
<script type="application/x-social-share-privacy-settings">
39+
{
40+
"path_prefix":"{{site.baseurl}}/assets/socialshare/",
41+
"layout":"line",
42+
"services": {
43+
"buffer": {
44+
"status": false
45+
},
46+
"delicious": {
47+
"status": false
48+
},
49+
"disqus": {
50+
"status": false
51+
},
52+
"facebook": {
53+
"status": false
54+
},
55+
"flattr": {
56+
"status": false
57+
},
58+
"gplus": {
59+
"status": false
60+
},
61+
"hackernews": {
62+
"status": false
63+
},
64+
"pinterest": {
65+
"status": false
66+
},
67+
"xing": {
68+
"status": false
69+
}
70+
}
71+
}
4072
</script>
73+
<script> addBackToTop({ scrollDuration: 400 })</script>
4174
</body>
4275

4376
</html>

assets/css/custom.css

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10814,53 +10814,3 @@ span.test-with-subcategory {
1081410814
.pager-blog {
1081510815
margin-bottom: 0px !important;
1081610816
}
10817-
10818-
.share-box a {
10819-
display: inline-block;
10820-
-webkit-box-shadow: 0 0 1px #777;
10821-
box-shadow: 0 0 1px #777;
10822-
padding: 5px 12px;
10823-
margin-right: 5px;
10824-
margin-bottom: 5px;
10825-
text-decoration: none; }
10826-
.share-box a:hover {
10827-
text-decoration: none;
10828-
-webkit-transition: background-color 200ms linear;
10829-
-ms-transition: background-color 200ms linear;
10830-
transition: background-color 200ms linear; }
10831-
10832-
.f {
10833-
color: #3b5998; }
10834-
.f:hover {
10835-
color: #fff;
10836-
background-color: #3b5998; }
10837-
10838-
.t {
10839-
color: #4099FF; }
10840-
.t:hover {
10841-
color: #fff;
10842-
background-color: #4099FF; }
10843-
10844-
.g {
10845-
color: #d34836; }
10846-
.g:hover {
10847-
color: #fff;
10848-
background-color: #d34836; }
10849-
10850-
.r {
10851-
color: #ff5700; }
10852-
.r:hover {
10853-
color: #fff;
10854-
background-color: #ff5700; }
10855-
10856-
.l {
10857-
color: #0077b5; }
10858-
.l:hover {
10859-
color: #fff;
10860-
background-color: #0077b5; }
10861-
10862-
.e {
10863-
color: #444444; }
10864-
.e:hover {
10865-
color: #fff;
10866-
background-color: #444444; }
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
"use strict";
2+
3+
(function ($,undefined) {
4+
function decode (s) {
5+
try {
6+
return decodeURIComponent(s);
7+
}
8+
catch (e) {
9+
try {
10+
return unescape(s);
11+
}
12+
catch (e2) {
13+
return s;
14+
}
15+
}
16+
}
17+
18+
function get () {
19+
var cookies = {};
20+
if (document.cookie) {
21+
var values = document.cookie.split(/; */g);
22+
for (var i = 0; i < values.length; ++ i) {
23+
var value = values[i];
24+
var pos = value.search("=");
25+
var key, value;
26+
27+
if (pos < 0) {
28+
key = decode(value);
29+
value = undefined;
30+
}
31+
else {
32+
key = decode(value.slice(0,pos));
33+
value = decode(value.slice(pos+1));
34+
}
35+
36+
cookies[key] = value;
37+
}
38+
}
39+
40+
return cookies;
41+
}
42+
43+
function set (name, value, expires, path, domain, secure) {
44+
switch (arguments.length) {
45+
case 1:
46+
for (var key in name) {
47+
set(key, name[key]);
48+
}
49+
return;
50+
51+
case 2:
52+
if (typeof(value) === "object") {
53+
expires = value.expires;
54+
path = value.path;
55+
domain = value.domain;
56+
secure = value.secure;
57+
value = value.value;
58+
}
59+
60+
case 3:
61+
if (typeof(expires) === "object" && !(expires instanceof Date)) {
62+
path = expires.path;
63+
domain = expires.domain;
64+
secure = expires.secure;
65+
expires = expires.expires;
66+
}
67+
}
68+
69+
if (value === null || value === undefined) {
70+
expires = -1;
71+
}
72+
73+
var buf = [encodeURIComponent(name)+'='+encodeURIComponent(value)];
74+
switch (typeof(expires)) {
75+
case "string":
76+
expires = new Date(expires);
77+
78+
case "object":
79+
buf.push("expires="+expires.toUTCString());
80+
break;
81+
82+
case "boolean":
83+
if (expires) {
84+
break;
85+
}
86+
expires = 365*2000;
87+
88+
case "number":
89+
var date = new Date();
90+
date.setDate(date.getDate()+expires);
91+
buf.push("expires="+date.toUTCString());
92+
break;
93+
}
94+
95+
if (path === true) {
96+
buf.push("path="+document.location.pathname);
97+
}
98+
else if (path) {
99+
buf.push("path="+path.replace(/[;\s]/g,encodeURIComponent));
100+
}
101+
102+
if (domain === true) {
103+
buf.push("domain="+document.location.host);
104+
}
105+
else if (domain) {
106+
buf.push("domain="+domain.replace(/[;\s]/g,encodeURIComponent));
107+
}
108+
109+
if (secure) {
110+
buf.push("secure");
111+
}
112+
113+
document.cookie = buf.join("; ");
114+
}
115+
116+
$.cookie = function (name) {
117+
switch (arguments.length) {
118+
case 0:
119+
return get();
120+
case 1:
121+
if (typeof(name) !== "object") {
122+
var cookies = get();
123+
if (name === undefined) {
124+
return cookies;
125+
}
126+
else if (Object.prototype.hasOwnProperty.call(cookies,name)) {
127+
return cookies[name];
128+
}
129+
return null;
130+
}
131+
case 2:
132+
case 3:
133+
case 4:
134+
case 5:
135+
case 6:
136+
set.apply(this,arguments);
137+
return this;
138+
139+
default:
140+
throw new Error("Illegal number of arguments");
141+
}
142+
};
143+
144+
$.removeCookie = function (name) {
145+
var cookies = get();
146+
if (Object.prototype.hasOwnProperty.call(cookies,name)) {
147+
var args = Array.prototype.slice.call(arguments,1);
148+
args.unshift(name,null,-1);
149+
set.apply(this,args);
150+
return true;
151+
}
152+
return false;
153+
};
154+
})(jQuery);
4.57 KB
2.26 KB
2.42 KB
1.01 KB

0 commit comments

Comments
 (0)