|
1 | | -<!-- Check if any share-links are active --> |
2 | | -{% assign any-share-links = false %} |
3 | | -{% for links in site.share-links-active %} |
4 | | - {% if links[1] == true %} |
5 | | - {% assign any-share-links = true %} |
6 | | - {% endif %} |
7 | | -{% endfor %} |
8 | | - |
9 | | -{% if any-share-links %} |
| 1 | +{% if site.share-links-active.twitter == false and site.share-links-active.facebook == false and site.share-links-active.google == false and site.share-links-active.linkedin == false %} |
| 2 | +{% else %} |
10 | 3 | <section id = "social-share-section"> |
11 | 4 |
|
12 | 5 | <!--- Share on Twitter --> |
13 | | - {% if site.share-links-active.twitter %} |
| 6 | + {% unless site.share-links-active.twitter == false %} |
14 | 7 | <a href="https://twitter.com/intent/tweet?text={{ page.title | url_encode }}+{{ site.url }}{{ page.url }}" |
15 | 8 | class="btn btn-social-icon btn-twitter" title="Share on Twitter"> |
16 | 9 | <span class="fa fa-fw fa-twitter" aria-hidden="true"></span> |
17 | 10 | </a> |
18 | | - {% endif %} |
| 11 | + {% endunless %} |
19 | 12 |
|
20 | 13 | <!--- Share on Facebook --> |
21 | | - {% if site.share-links-active.facebook %} |
| 14 | + {% unless site.share-links-active.facebook == false %} |
22 | 15 | <a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url }}" |
23 | 16 | class="btn btn-social-icon btn-facebook" title="Share on Facebook"> |
24 | 17 | <span class="fa fa-fw fa-facebook" aria-hidden="true"></span> |
25 | 18 | </a> |
26 | | - {% endif %} |
| 19 | + {% endunless %} |
27 | 20 |
|
28 | 21 | <!--- Share on Google Plus --> |
29 | | - {% if site.share-links-active.google %} |
| 22 | + {% unless site.share-links-active.google == false %} |
30 | 23 | <a href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}" |
31 | 24 | class="btn btn-social-icon btn-google" title="Share on Google+"> |
32 | 25 | <span class="fa fa-fw fa-google-plus" aria-hidden="true"></span> |
33 | 26 | </a> |
34 | | - {% endif %} |
| 27 | + {% endunless %} |
35 | 28 |
|
36 | 29 | <!--- Share on LinkedIn --> |
37 | | - {% if site.share-links-active.linkedin %} |
| 30 | + {% unless site.share-links-active.linkedin == false %} |
38 | 31 | <a href="https://www.linkedin.com/shareArticle?mini=true&url={{ site.url }}{{ page.url }}" |
39 | 32 | class="btn btn-social-icon btn-linkedin" title="Share on LinkedIn"> |
40 | 33 | <span class="fa fa-fw fa-linkedin" aria-hidden="true"></span> |
41 | 34 | </a> |
42 | | - {% endif %} |
| 35 | + {% endunless %} |
43 | 36 |
|
44 | 37 | </section> |
45 | 38 |
|
|
0 commit comments