mirror of
https://github.com/aljazceru/cryptoanarchywiki.github.io.git
synced 2025-12-17 05:04:21 +01:00
added project,social share,google analytics
This commit is contained in:
10
_includes/analytics.html
Normal file
10
_includes/analytics.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ site.google_analytics }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
25
_includes/project_tags.html
Normal file
25
_includes/project_tags.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% if site.enableTags == true %}
|
||||
<div id="tag-filter" class="tag-group">
|
||||
<span class="tag-filter tag-cloud all active">All</span>
|
||||
{% assign tagarray = site.tagarray %}
|
||||
{% for project in site.data.projects %}
|
||||
{% for tag in project.tags %}
|
||||
{% assign tagarray = tagarray | push: tag %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% assign tags = tagarray[1] %}
|
||||
{% for item in tagarray %}
|
||||
{% assign tagDown = item | downcase %}
|
||||
{% assign tagComp = tags | downcase %}
|
||||
{% unless tagComp contains tagDown %}
|
||||
{% capture tags %}{{ tags }}|{{ item }}{% endcapture %}
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
{% assign taglist = tags | split: '|' | sort %}
|
||||
{% for tag in taglist %}
|
||||
<span class="tag-filter tag-cloud" data-tag="{{ tag | downcase }}">{{ tag }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
20
_includes/share-page.html
Normal file
20
_includes/share-page.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="share-page">
|
||||
Share this on →
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-via="{{ site.share.twitter_username }}">Tweet</a>
|
||||
<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>
|
||||
|
||||
<!-- Google + -->
|
||||
<div class="g-plus" data-action="share" data-annotation="bubble"></div>
|
||||
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
||||
|
||||
<!-- Facebook -->
|
||||
<div class="fb-share-button" data-href="{{site.url}}{{page.url}}" data-layout="button_count" style="position: relative; top: -8px; left: 3px;"></div>
|
||||
</div>
|
||||
<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.6&appId={{ site.share.fb_appid }}";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
7
_includes/social_links.html
Normal file
7
_includes/social_links.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="social">
|
||||
<ul>
|
||||
{% for link in site.social %}
|
||||
<li><a href="{{ link.link }}" target="_blank"><i class="fa {{ link.icon }}"></i></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user