Skip to content

Commit 3efde33

Browse files
committed
added google analytics and next previous in category include
1 parent 6636839 commit 3efde33

22 files changed

Lines changed: 151 additions & 63 deletions

_config.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ defaults:
110110
google_author: "https://plus.google.com/u/0/118311555303973066167"
111111
google_site_verification: "Vk0IOJ2jwG_qEoG7fuEXYqv0m2rLa8P778Fi_GrsgEQ"
112112
bing_webmastertools_id: "0FB4C028ABCF07C908C54386ABD2D97F"
113-
# alexa_verify_id: ""
113+
alexa_verify_id: "m1VxsMv1gIN-up4Sw0PGQIvyCRw"
114114

115115

116116

@@ -162,17 +162,32 @@ og_description: "Feeling Responsive is built on the fabulous
162162
# / /_/ / (__ ) /_/ / /_/ (__ )
163163
# /_____/_/____/\__, /\__,_/____/
164164
# /_/
165+
#
166+
# used in _includes/comments.html
165167

166168
disqus_shortname: feelingresponsive
167169

168170

169171
# _____
170172
# / ___/____ ___________
171173
# \__ \/ __ `/ ___/ ___/
172-
# ___/ / /_/ (__ |__ )
173-
# /____/\__,_/____/____/
174+
# ___/ / /_/ (__ |__ ) More › http://sass-lang.com/
175+
# /____/\__,_/____/____/ More › http://jekyllrb.com/docs/assets/#sassscss
174176
#
175177

176178
sass:
177179
sass_dir: _sass
178-
style: :compressed
180+
style: :compressed
181+
182+
183+
# ___ __ __ _
184+
# / | ____ ____ _/ /_ __/ /_(_)_________
185+
# / /| | / __ \/ __ `/ / / / / __/ / ___/ ___/
186+
# / ___ |/ / / / /_/ / / /_/ / /_/ / /__(__ )
187+
# /_/ |_/_/ /_/\__,_/_/\__, /\__/_/\___/____/ https://www.google.com/analytics/
188+
# /____/
189+
#
190+
# used in _includes/footer_scripts.html
191+
192+
google_analytics_tracking_id: UA-60112281-1
193+

_data/language.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ previous_posts: "Previous Posts"
1414
read: "Read"
1515
read_more: "Read More ›"
1616
if_you_are_not_redirected_automatically: "If you are not redirected automatically,"
17-
click_here: "click here"
17+
click_here: "click here"
18+
next_post_in: "Next Post in"
19+
previous_post_in: "Previous Post in"

_includes/breadcrumb.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{% comment %}
2-
3-
http://stackoverflow.com/questions/9612235/what-are-some-good-ways-to-implement-breadcrumbs-on-a-jekyll-site
4-
https://github.com/huonw/huonw.github.io/blob/master/_layouts/default.html#L17
5-
2+
*
3+
* http://stackoverflow.com/questions/9612235/what-are-some-good-ways-to-implement-breadcrumbs-on-a-jekyll-site
4+
* https://github.com/huonw/huonw.github.io/blob/master/_layouts/default.html#L17
5+
*
66
{% endcomment %}
77

88

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h5 class="shadow-black">{{ network_item.menu_name }}</h5>
6969
<nav class="row">
7070
<section id="subfooter-left" class="b30 small-12 medium-6 columns">
7171
<ul class="inline-list">
72-
<li>We &hearts; <a style="display:inline;" href="http://jekyllrb.com/" target="_blank">Jekyll</a> &amp; <a style="display:inline;" href="http://phlow.github.io/feeling-responsive/">Feeling Responsive</a> </li>
72+
<li>Created with &hearts; by <a style="display:inline;" href="http://phlow.de/">Phlow</a> with <a style="display:inline;" href="http://jekyllrb.com/" target="_blank">Jekyll</a> using <a style="display:inline;" href="http://phlow.github.io/feeling-responsive/">Feeling Responsive</a> </li>
7373
</ul>
7474
</section>
7575

_includes/footer_scripte.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

_includes/footer_scripts.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<script src="{{ site.url }}/assets/js/javascript.min.js"></script>
2+
3+
{% if page.header.image_fullwidth %}
4+
<script>
5+
$("#masthead").backstretch("{{ site.url }}/images/{{ page.header.image_fullwidth }}", {fade: 700});
6+
$("#masthead-with-text").backstretch("{{ site.url }}/images/{{ page.header.image_fullwidth }}", {fade: 700});
7+
</script>
8+
{% endif %}
9+
10+
11+
12+
{% if site.google_analytics_tracking_id %}
13+
<script>
14+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
15+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
16+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
17+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
18+
19+
ga('create', '{{ if site.google_analytics_tracking_id }}', 'auto');
20+
ga('set', 'anonymizeIp', true);
21+
ga('send', 'pageview');
22+
23+
</script>
24+
{% endif %}

_includes/list-posts.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{% comment %}
2-
3-
Possible parameter for this loop:
4-
5-
› entries
6-
› offset
7-
› category
8-
› tag
9-
10-
Example for Category: {% include list-posts.html entries='3' offset='1' category='design' %}
11-
12-
Example for Tag: {% include list-posts.html entries='5' tag='terminal' %}
13-
14-
15-
This loop works like this:
16-
17-
1. First we check if there was given a category for filtering › if include.categories == NULL
18-
2. If no category is given for filtering do a general loop.
19-
3. If a category/tag was given, assign category/tag to the variable category/tag › assign category = include.categories
20-
2+
*
3+
* Possible parameter for this loop:
4+
*
5+
* › entries
6+
* › offset
7+
* › category
8+
* › tag
9+
*
10+
* Example for Category: {% include list-posts.html entries='3' offset='1' category='design' %}
11+
*
12+
* Example for Tag: {% include list-posts.html entries='5' tag='terminal' %}
13+
*
14+
*
15+
* This loop works like this:
16+
*
17+
* 1. First we check if there was given a category for filtering › if include.categories == NULL
18+
* 2. If no category is given for filtering do a general loop.
19+
* 3. If a category/tag was given, assign category/tag to the variable category/tag › assign category = include.categories
20+
*
2121
{% endcomment %}
2222

2323

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{% comment %}
2+
*
3+
* This include creates a next/previous link to a post of the same category
4+
* using a the categories-variable in front matter.
5+
*
6+
* Source: https://github.com/jekyll/jekyll/issues/260a#issue-495435
7+
*
8+
* Use › {% include next-previous-post-in-category.html %}
9+
*
10+
{% endcomment %}
11+
12+
13+
{% comment %}
14+
*
15+
* assign FIRST category from categories variable from front matter to cat
16+
* and make a string from the array by using › join: ''
17+
*
18+
{% endcomment %}
19+
20+
{% assign cat = page.categories | first | join: '' %}
21+
{% for post in site.categories.[cat] %}
22+
{% if post.url == page.url %}
23+
{% assign post_index0 = forloop.index0 %}
24+
{% assign post_index1 = forloop.index %}
25+
{% endif %}
26+
{% endfor %}
27+
{% for post in site.categories.[cat] %}
28+
{% if post_index0 == forloop.index %}
29+
{% assign next_post = post.url %}
30+
{% endif %}
31+
{% if post_index1 == forloop.index0 %}
32+
{% assign prev_post = post.url %}
33+
{% endif %}
34+
{% endfor %}
35+
{% if next_post %}
36+
<a class="left button tiny radius icon-chevron-left r15" href="{{ next_post }}">{{ site.data.language.next_post_in }} {{ cat | upcase }}</a>
37+
{% endif %}
38+
{% if prev_post %}
39+
<a class="button tiny radius" href="{{ prev_post }}">{{ site.data.language.previous_post_in }} {{ cat | upcase }}<span class="icon-chevron-right"></span></a>
40+
{% endif %}
41+

_includes/pagination.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
<!-- This loops through the paginated posts
1+
{% comment %}
2+
* This loops through the paginated posts
3+
*
4+
* Total posts: {{ paginator.total_posts }}
5+
* Total paginate-pages: {{ paginator.total_pages }}
6+
*
7+
{% endcomment %}
28

3-
Total posts: {{ paginator.total_posts }}
4-
Total paginate-pages: {{ paginator.total_pages }}
59

6-
-->
710
{% for post in paginator.posts %}
811
<div class="row">
912
<div class="small-12 columns b60">

_includes/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h3>Sidebar</h3>
1414
<div class="border-dotted radius b30">
1515
<img src="http://placekitten.com/271/270" alt="uh, Placekitten">
1616
<p class="text-left">
17-
This is an advertisment with crazy cats! <a href="http://placekitten.com/">Check'em out.</a>
17+
This is an advertisment with a crazy cat! <a href="http://placekitten.com/">More cats, please!</a>
1818
</p>
1919
</div>
2020
</aside>

0 commit comments

Comments
 (0)