Skip to content

Commit 3fb65a2

Browse files
Merge pull request sergiokopplin#185 from rowmatrix/add-share-links
Add share links
2 parents 208a19c + db12bac commit 3fb65a2

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

_includes/author.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,27 @@ <h4 class="name">{{ site.authors[page.author].name }}</h4>
88
<p class="bio">{{ site.authors[page.author].bio }}</p>
99

1010
<div class="share">
11+
<!-- Note: Only use three share links if your site width is set to large -->
12+
<!-- If site width is set to normal, you may choose any two share links -->
1113
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ site.url }}{{ page.url }} - {{ page.title }} by @{{ site.twitter }}">
1214
<svg class="icon icon-twitter"><use xlink:href="#icon-twitter"></use></svg><span class="icon-twitter">Tweet</span>
1315
</a>
1416

1517
<a class="facebook" href="javascript:void(0)" onclick="window.open('https://facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href), 'facebook-share-dialog', 'width=626,height=436'); return false;">
1618
<svg class="icon icon-facebook"><use xlink:href="#icon-facebook"></use></svg><span class="icon-facebook-rect">Share</span>
1719
</a>
20+
21+
<!-- <a class="google-plus" href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}" target="_blank">
22+
<svg class="icon icon-google-plus"><use xlink:href="#icon-google-plus"></use></svg><span class="icon-google-plus">Share</span>
23+
</a> -->
24+
25+
<!-- <a class="linkedin" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ site.url }}{{ page.url }}&amp;title={{ page.title }}&amp;summary={{ page.description }}&amp;source={{ site.url }}" target="_blank">
26+
<svg class="icon icon-linkedin"><use xlink:href="#icon-linkedin"></use></svg><span class="icon-linkedin">Share</span>
27+
</a> -->
28+
29+
<!-- <a class="reddit" href="https://reddit.com/submit?url={{ site.url }}{{ page.url }}&amp;title={{ page.title }}" target="_blank">
30+
<svg class="icon icon-reddit"><use xlink:href="#icon-reddit"></use></svg><span class="icon-reddit">Share</span>
31+
</a> -->
1832
</div>
1933
</div>
2034
</section>

_includes/icons.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
<path class="path1" d="M522.2 438.8v175.6h290.4c-11.8 75.4-87.8 220.8-290.4 220.8-174.8 0-317.4-144.8-317.4-323.2s142.6-323.2 317.4-323.2c99.4 0 166 42.4 204 79l139-133.8c-89.2-83.6-204.8-134-343-134-283 0-512 229-512 512s229 512 512 512c295.4 0 491.6-207.8 491.6-500.2 0-33.6-3.6-59.2-8-84.8l-483.6-0.2z"></path>
5353
</symbol>
5454

55+
<symbol id="icon-google-plus" viewBox="0 0 1317 1024">
56+
<title>google-plus</title>
57+
<path class="path1" d="M821.143 521.714q0 118.857-49.714 211.714t-141.714 145.143-210.857 52.286q-85.143 0-162.857-33.143t-133.714-89.143-89.143-133.714-33.143-162.857 33.143-162.857 89.143-133.714 133.714-89.143 162.857-33.143q163.429 0 280.571 109.714l-113.714 109.143q-66.857-64.571-166.857-64.571-70.286 0-130 35.429t-94.571 96.286-34.857 132.857 34.857 132.857 94.571 96.286 130 35.429q47.429 0 87.143-13.143t65.429-32.857 44.857-44.857 28-47.429 12.286-42.286h-237.714v-144h395.429q6.857 36 6.857 69.714zM1316.571 452v120h-119.429v119.429h-120v-119.429h-119.429v-120h119.429v-119.429h120v119.429h119.429z"></path>
58+
</symbol>
59+
5560
<symbol id="icon-pinterest" viewBox="0 0 1024 1024">
5661
<title>pinterest</title>
5762
<path class="path1" d="M512 68.4c-245 0-443.6 198.6-443.6 443.6 0 188 117 348.4 282 413-3.8-35-7.4-89 1.6-127.2 8-34.6 52-220.4 52-220.4s-13.2-26.6-13.2-65.8c0-61.6 35.8-107.8 80.2-107.8 37.8 0 56.2 28.4 56.2 62.4 0 38-24.2 95-36.8 147.6-10.6 44.2 22 80.2 65.6 80.2 78.8 0 139.4-83.2 139.4-203.2 0-106.2-76.4-180.4-185.2-180.4-126.2 0-200.2 94.6-200.2 192.6 0 38.2 14.6 79 33 101.2 3.6 4.4 4.2 8.2 3 12.8-3.4 14-10.8 44.2-12.4 50.4-2 8.2-6.4 9.8-14.8 6-55.4-25.8-90-106.8-90-171.8 0-140 101.6-268.4 293-268.4 153.8 0 273.4 109.6 273.4 256.2 0 152.8-96.4 276-230.2 276-45 0-87.2-23.4-101.6-51 0 0-22.2 84.6-27.6 105.4-10 38.6-37 86.8-55.2 116.2 41.6 12.8 85.6 19.8 131.4 19.8 245 0 443.6-198.6 443.6-443.6 0-245.2-198.6-443.8-443.6-443.8z"></path>

_sass/components/share.sass

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
margin-top: 5px
2424

2525
> .twitter,
26-
> .facebook
26+
> .facebook,
27+
> .google-plus,
28+
> .linkedin,
29+
> .reddit
2730
display: inline
2831
vertical-align: middle
2932
font-size: 13px
@@ -46,6 +49,15 @@
4649
> .facebook
4750
background: #4361b3
4851

52+
> .google-plus
53+
background: #dd4b39
54+
55+
> .linkedin
56+
background: #0077b5
57+
58+
> .reddit
59+
background: #ff4500
60+
4961
// #bug
5062
// can't use .icon with >
5163
// don't know why - sorry

0 commit comments

Comments
 (0)