Skip to content
This repository was archived by the owner on Mar 29, 2022. It is now read-only.

Commit 6c8c7d8

Browse files
committed
adding assets for new clean theme
1 parent 09d629c commit 6c8c7d8

29 files changed

+1358
-0
lines changed

_includes/JB/analytics

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %}
2+
3+
{% case site.JB.analytics.provider %}
4+
{% when "google" %}
5+
{% include JB/analytics-providers/google %}
6+
{% when "getclicky" %}
7+
{% include JB/analytics-providers/getclicky %}
8+
{% when "mixpanel" %}
9+
{% include JB/analytics-providers/mixpanel %}
10+
{% when "custom" %}
11+
{% include custom/analytics %}
12+
{% endcase %}
13+
14+
{% endif %}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script type="text/javascript">
2+
var clicky_site_ids = clicky_site_ids || [];
3+
clicky_site_ids.push({{ site.JB.analytics.getclicky.site_id }});
4+
(function() {
5+
var s = document.createElement('script');
6+
s.type = 'text/javascript';
7+
s.async = true;
8+
s.src = '//static.getclicky.com/js';
9+
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
10+
})();
11+
</script>
12+
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/{{ site.JB.analytics.getclicky.site_id }}ns.gif" /></p></noscript>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script type="text/javascript">
2+
var _gaq = _gaq || [];
3+
_gaq.push(['_setAccount', '{{ site.JB.analytics.google.tracking_id }}']);
4+
_gaq.push(['_trackPageview']);
5+
6+
(function() {
7+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
8+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
9+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
10+
})();
11+
</script>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script type="text/javascript">
2+
var mpq = [];
3+
mpq.push(["init", "{{ site.JB.analytics.mixpanel.token}}"]);
4+
(function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";
5+
b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+
6+
"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];
7+
a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push(
8+
[f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links",
9+
"track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<
10+
d.length;c++){mpq[d[c]]=e(d[c])}})();
11+
</script>

_includes/JB/categories_list

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% comment %}<!--
2+
The categories_list include is a listing helper for categories.
3+
Usage:
4+
1) assign the 'categories_list' variable to a valid array of tags.
5+
2) include JB/categories_list
6+
example:
7+
<ul>
8+
{% assign categories_list = site.categories %}
9+
{% include JB/categories_list %}
10+
</ul>
11+
12+
Notes:
13+
Categories can be either a Hash of Category objects (hashes) or an Array of category-names (strings).
14+
The encapsulating 'if' statement checks whether categories_list is a Hash or Array.
15+
site.categories is a Hash while page.categories is an array.
16+
17+
This helper can be seen in use at: ../_layouts/default.html
18+
-->{% endcomment %}
19+
20+
{% if site.JB.categories_list.provider == "custom" %}
21+
{% include custom/categories_list %}
22+
{% else %}
23+
{% if categories_list.first[0] == null %}
24+
{% for category in categories_list %}
25+
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
26+
{{ category | join: "/" }} <span>{{ site.categories[category].size }}</span>
27+
</a></li>
28+
{% endfor %}
29+
{% else %}
30+
{% for category in categories_list %}
31+
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
32+
{{ category[0] | join: "/" }} <span>{{ category[1].size }}</span>
33+
</a></li>
34+
{% endfor %}
35+
{% endif %}
36+
{% endif %}
37+
{% assign categories_list = nil %}

_includes/JB/comments

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% if site.JB.comments.provider and page.comments != false %}
2+
3+
{% case site.JB.comments.provider %}
4+
{% when "disqus" %}
5+
{% include JB/comments-providers/disqus %}
6+
{% when "livefyre" %}
7+
{% include JB/comments-providers/livefyre %}
8+
{% when "intensedebate" %}
9+
{% include JB/comments-providers/intensedebate %}
10+
{% when "facebook" %}
11+
{% include JB/comments-providers/facebook %}
12+
{% when "custom" %}
13+
{% include custom/comments %}
14+
{% endcase %}
15+
16+
{% endif %}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div id="disqus_thread"></div>
2+
<script type="text/javascript">
3+
{% if site.safe == false %}var disqus_developer = 1;{% endif %}
4+
var disqus_shortname = '{{ site.JB.comments.disqus.short_name }}'; // required: replace example with your forum shortname
5+
{% if page.wordpress_id %}var disqus_identifier = '{{page.wordpress_id}} {{site.production_url}}/?p={{page.wordpress_id}}';{% endif %}
6+
/* * * DON'T EDIT BELOW THIS LINE * * */
7+
(function() {
8+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
9+
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
10+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
11+
})();
12+
</script>
13+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
14+
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div id="fb-root"></div>
2+
<script>(function(d, s, id) {
3+
var js, fjs = d.getElementsByTagName(s)[0];
4+
if (d.getElementById(id)) return;
5+
js = d.createElement(s); js.id = id;
6+
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId={{ site.JB.comments.facebook.appid }}";
7+
fjs.parentNode.insertBefore(js, fjs);
8+
}(document, 'script', 'facebook-jssdk'));</script>
9+
<div class="fb-comments" data-href="{{ site.production_url }}" data-num-posts="{{ site.JB.comments.facebook.num_posts }}" data-width="{{ site.JB.comments.facebook.width }}" data-colorscheme="{{ site.JB.comments.facebook.colorscheme }}"></div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script>
2+
var idcomments_acct = '{{ site.JB.comments.intensedebate.account }}';
3+
var idcomments_post_id;
4+
var idcomments_post_url;
5+
</script>
6+
<script type="text/javascript" src="http://www.intensedebate.com/js/genericLinkWrapperV2.js"></script>
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script type='text/javascript' src='http://zor.livefyre.com/wjs/v1.0/javascripts/livefyre_init.js'></script>
2+
<script type='text/javascript'>
3+
var fyre = LF({
4+
site_id: {{ site.JB.comments.livefyre.site_id }}
5+
});
6+
</script>

_includes/JB/liquid_raw

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{% comment%}<!--
2+
The liquid_raw helper is a way to display raw liquid code, as opposed to parsing it.
3+
Normally you'd use Liquid's built in 'raw' tag.
4+
The problem is GitHub Jekyll does not support the current Liquid release.
5+
GitHub Jekyll supports the deprecated 'literal' tag.
6+
Using one will break the other if you plan to deploy to GitHub pages.
7+
see: https://github.com/mojombo/jekyll/issues/425
8+
9+
Since I don't want to mess with Liquid versions, I'll just rewrite the way I
10+
intend to give liquid examples. It's not an elegant by any means:
11+
12+
Usage:
13+
1) Define a 'text' variable with the block of liquid code you intend to display.
14+
2) Pass the text variable to include JB/liquid_raw
15+
16+
example:
17+
{% capture text %}|.% for tag in tags_list %.|
18+
<li><a href="|.{ site.var.tags_path }.||.{ tag[0] }.|-ref">|.{ tag[0] }.| <span>|.{tag[1].size}.|</span></a></li>
19+
|.% endfor %.|
20+
21+
|.% assign tags_list = null %.|{% endcapture %}
22+
{% include JB/liquid_raw %}
23+
24+
As seen here, you must use "|." and ".|" as opening and closing brackets.
25+
-->{% endcomment%}
26+
27+
{% if site.JB.liquid_raw.provider == "custom" %}
28+
{% include custom/liquid_raw %}
29+
{% else %}
30+
<pre><code>{{text | replace:"|.", "&#123;" | replace:".|", "&#125;" | replace:">", "&gt;" | replace:"<", "&lt;" }}</code></pre>
31+
{% endif %}
32+
{% assign text = nil %}

_includes/JB/pages_list

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{% comment %}<!--
2+
The pages_list include is a listing helper.
3+
Usage:
4+
1) assign the 'pages_list' variable to a valid array of pages or posts.
5+
2) include JB/pages_list
6+
example:
7+
<ul>
8+
{% assign pages_list = site.pages %}
9+
{% include JB/pages_list %}
10+
</ul>
11+
12+
Grouping: (optional):
13+
assign the 'group' variable to constrain the list to only pages/posts
14+
in the given group. Note you must define the group manually in the page/post
15+
meta-data to use this feature.
16+
Grouping is mainly helpful for non-post pages.
17+
If you want to group posts, it's easier/better to tag them, then pass the tagged posts array.
18+
i.e. site.tags.cool_tag (this returns an array of posts tagged: cool_tag)
19+
20+
This helper can be seen in use at: ../_layouts/default.html
21+
-->{% endcomment %}
22+
23+
{% if site.JB.pages_list.provider == "custom" %}
24+
{% include custom/pages_list %}
25+
{% else %}
26+
{% for node in pages_list %}
27+
{% if node.title != null %}
28+
{% if group == null or group == node.group %}
29+
{% if page.url == node.url %}
30+
<li class="active"><a href="{{ BASE_PATH }}{{node.url}}" class="active">{{node.title}}</a></li>
31+
{% else %}
32+
<li><a href="{{ BASE_PATH }}{{node.url}}">{{node.title}}</a></li>
33+
{% endif %}
34+
{% endif %}
35+
{% endif %}
36+
{% endfor %}
37+
{% endif %}
38+
{% assign pages_list = nil %}
39+
{% assign group = nil %}

_includes/JB/posts_collate

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{% comment %}<!--
2+
Collate_posts helper. Collated posts by year and month.
3+
Usage:
4+
1) assign the 'posts_collate' variable to a valid array of posts.
5+
2) include JB/posts_collate
6+
example:
7+
{% assign posts_collate = site.posts %}
8+
{% include JB/posts_collate %}
9+
10+
Ordering:
11+
Posts are displayed in reverse chronological order.
12+
For normal chronological order:
13+
1) Change the for loop to this:
14+
=> 'for post in site.posts reversed'
15+
2) Next make sure to change 'post.previous.date' to:
16+
=> 'post.next.date'
17+
18+
-->{% endcomment %}
19+
20+
{% if site.JB.posts_collate.provider == "custom" %}
21+
{% include custom/posts_collate %}
22+
{% else %}
23+
{% for post in posts_collate %}
24+
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
25+
{% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %}
26+
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
27+
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}
28+
29+
{% if forloop.first %}
30+
<h2>{{this_year}}</h2>
31+
<h3>{{this_month}}</h3>
32+
<ul>
33+
{% endif %}
34+
35+
<li><span>{{ post.date | date: "%B %e, %Y" }}</span> &raquo; <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
36+
37+
{% if forloop.last %}
38+
</ul>
39+
{% else %}
40+
{% if this_year != next_year %}
41+
</ul>
42+
<h2>{{next_year}}</h2>
43+
<h3>{{next_month}}</h3>
44+
<ul>
45+
{% else %}
46+
{% if this_month != next_month %}
47+
</ul>
48+
<h3>{{next_month}}</h3>
49+
<ul>
50+
{% endif %}
51+
{% endif %}
52+
{% endif %}
53+
{% endfor %}
54+
{% endif %}
55+
{% assign posts_collate = nil %}

_includes/JB/setup

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% capture jbcache %}
2+
<!--
3+
- Dynamically set liquid variables for working with URLs/paths
4+
-->
5+
{% if site.JB.setup.provider == "custom" %}
6+
{% include custom/setup %}
7+
{% else %}
8+
{% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
9+
{% assign BASE_PATH = site.JB.BASE_PATH %}
10+
{% assign HOME_PATH = site.JB.BASE_PATH %}
11+
{% else %}
12+
{% assign BASE_PATH = nil %}
13+
{% assign HOME_PATH = "/" %}
14+
{% endif %}
15+
16+
{% if site.JB.ASSET_PATH %}
17+
{% assign ASSET_PATH = site.JB.ASSET_PATH %}
18+
{% else %}
19+
{% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ layout.theme.name }}{% endcapture %}
20+
{% endif %}
21+
{% endif %}
22+
{% endcapture %}{% assign jbcache = nil %}

_includes/JB/sharing

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %}
2+
3+
{% case site.JB.sharing.provider %}
4+
{% when "custom" %}
5+
{% include custom/sharing %}
6+
{% endcase %}
7+
8+
{% endif %}

_includes/JB/tags_list

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% comment %}<!--
2+
The tags_list include is a listing helper for tags.
3+
Usage:
4+
1) assign the 'tags_list' variable to a valid array of tags.
5+
2) include JB/tags_list
6+
example:
7+
<ul>
8+
{% assign tags_list = site.tags %}
9+
{% include JB/tags_list %}
10+
</ul>
11+
12+
Notes:
13+
Tags can be either a Hash of tag objects (hashes) or an Array of tag-names (strings).
14+
The encapsulating 'if' statement checks whether tags_list is a Hash or Array.
15+
site.tags is a Hash while page.tags is an array.
16+
17+
This helper can be seen in use at: ../_layouts/default.html
18+
-->{% endcomment %}
19+
20+
{% if site.JB.tags_list.provider == "custom" %}
21+
{% include custom/tags_list %}
22+
{% else %}
23+
{% if tags_list.first[0] == null %}
24+
{% for tag in tags_list %}
25+
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
26+
{% endfor %}
27+
{% else %}
28+
{% for tag in tags_list %}
29+
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag[0] }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
30+
{% endfor %}
31+
{% endif %}
32+
{% endif %}
33+
{% assign tags_list = nil %}

0 commit comments

Comments
 (0)