Skip to content

Commit

Permalink
Added active class logic to About menu include, added Download menu t…
Browse files Browse the repository at this point in the history
…o appropriate pages, updated posts-by-date.html and posts-by-date-min.html includes to provide links to posts by month in two digit format. Saves space at the top of blog post pages.
  • Loading branch information
Chris Ritzo committed Feb 25, 2014
1 parent a57b991 commit 5052795
Show file tree
Hide file tree
Showing 49 changed files with 1,395 additions and 599 deletions.
2 changes: 1 addition & 1 deletion test.commotion/_includes/about_menu.html
@@ -1,7 +1,7 @@
<div id="subsection-menu">
<h3><a href="/about">About</a></h3>
<ul>
<li {% if page.url == '/about/' %} class="active" {% endif %}><a href="/about">About Commotion</a></li>
<li {% if page.url contains '/about/index.html' %} class="active" {% endif %}><a href="/about">About Commotion</a></li>
<li {% if page.url contains '/about/faq' %} class="active" {% endif %}><a href="/about/faq">FAQ</a></li>
<li {% if page.url contains '/about/guiding-principles' %} class="active" {% endif %}><a href="/about/guiding-principles">Guiding Principles</a></li>
<li {% if page.url contains '/about/where-its-used' %} class="active" {% endif %}><a href="/about/where-its-used">Where It&#039;s Used</a></li>
Expand Down
8 changes: 8 additions & 0 deletions test.commotion/_includes/downloads_menu.html
@@ -1,2 +1,10 @@
<div id="subsection-menu">
<h3><a href="/download">Download</a></h3>
<ul>
<li {% if page.url contains '/download/index.html' %} class="active" {% endif %}><a href="/download">Download Commotion</a></li>
<li {% if page.url contains '/download/routers' %} class="active" {% endif %}><a href="/download/routers">Routers</a></li>
<li {% if page.url contains '/download/phones' %} class="active" {% endif %}><a href="/download/android">Phones</a></li>
<li {% if page.url contains '/download/computers' %} class="active" {% endif %}><a href="/download/computers">Computers</a></li>
<li {% if page.url contains '/download/openbts' %} class="active" {% endif %}><a href="/download/openbts">Cellular Networks</a></li>
<li {% if page.url contains '/download/verify-signatures' %} class="active" {% endif %}><a href="/download/verify-signatures">Verifying Downloads</a></li>
</div>
10 changes: 5 additions & 5 deletions test.commotion/_includes/posts-by-date-min.html
@@ -1,22 +1,22 @@
{% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %}
{% capture this_month %}{{ post.date | date: "%m" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}
{% capture next_month %}{{ post.previous.date | date: "%m" }}{% endcapture %}

{% if forloop.first %}
<h3><a href="/blog/blogindex.html#{{this_year}}">{{this_year}}</a></h3>
<h4><a href="/blog/blogindex.html#{{this_year}}-{{ this_month }}">{{ this_month }}</a></h4>
<a href="/blog/blogindex.html#{{this_year}}-{{ this_month }}">{{ this_month }}</a>
{% endif %}

{% if forloop.last %}
{% else %}
{% if this_year != next_year %}
<h3><a href="/blog/blogindex.html#{{next_year}}">{{next_year}}</a></h3>
<h4><a href="/blog/blogindex.html#{{next_year}}-{{next_month}}">{{ next_month }}</a></h4>
<a href="/blog/blogindex.html#{{next_year}}-{{next_month}}">{{ next_month }}</a>
{% else %}
{% if this_month != next_month %}
<h4><a href="/blog/blogindex.html#{{this_year}}-{{next_month}}">{{next_month}}</a></h4>
| <a href="/blog/blogindex.html#{{this_year}}-{{next_month}}">{{next_month}}</a>
{% endif %}
{% endif %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions test.commotion/_includes/posts-by-date.html
@@ -1,9 +1,9 @@
<h2>Posts by Date</h2>
{% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %}
{% capture this_month %}{{ post.date | date: "%m" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}
{% capture next_month %}{{ post.previous.date | date: "%m" }}{% endcapture %}

{% if forloop.first %}
<h3 id="{{ this_year }}">{{this_year}}</h3>
Expand Down
2 changes: 1 addition & 1 deletion test.commotion/_includes/sub-sections-menu.html
Expand Up @@ -5,7 +5,7 @@
{% include help_menu.html %}
{% when 'blog' %}
{% include blog_menu.html %}
{% when 'downloads' %}
{% when 'download' %}
{% include downloads_menu.html %}
{% when 'developers' %}
{% include developers_menu.html %}
Expand Down
@@ -1,7 +1,7 @@
---
layout: blog
title: Step-by-step - creating and installing a package for Commotion
categories: [chat,applications,routers,,messaging]
categories: [chat,applications,routers,messaging]
created: 2012-10-08
changed: 2012-11-21
post_author: The Work Department
Expand Down
2 changes: 1 addition & 1 deletion test.commotion/_site/about/index.html
Expand Up @@ -114,7 +114,7 @@ <h1 class="pageheadings">About Commotion</h1>
<div id="subsection-menu">
<h3><a href="/about">About</a></h3>
<ul>
<li ><a href="/about">About Commotion</a></li>
<li class="active" ><a href="/about">About Commotion</a></li>
<li ><a href="/about/faq">FAQ</a></li>
<li ><a href="/about/guiding-principles">Guiding Principles</a></li>
<li ><a href="/about/where-its-used">Where It&#039;s Used</a></li>
Expand Down
Expand Up @@ -118,7 +118,7 @@ <h1 class="pageheadings">Integrating design and development to shape Commotion


<h3><a href="/blog/blogindex.html#2014">2014</a></h3>
<h4><a href="/blog/blogindex.html#2014-January">January</a></h4>
<a href="/blog/blogindex.html#2014-01">01</a>



Expand All @@ -137,7 +137,7 @@ <h4><a href="/blog/blogindex.html#2014-January">January</a></h4>


<h3><a href="/blog/blogindex.html#2013">2013</a></h3>
<h4><a href="/blog/blogindex.html#2013-December">December</a></h4>
<a href="/blog/blogindex.html#2013-12">12</a>



Expand All @@ -164,7 +164,7 @@ <h4><a href="/blog/blogindex.html#2013-December">December</a></h4>



<h4><a href="/blog/blogindex.html#2013-October">October</a></h4>
| <a href="/blog/blogindex.html#2013-10">10</a>



Expand Down Expand Up @@ -192,7 +192,7 @@ <h4><a href="/blog/blogindex.html#2013-October">October</a></h4>



<h4><a href="/blog/blogindex.html#2013-September">September</a></h4>
| <a href="/blog/blogindex.html#2013-09">09</a>



Expand Down Expand Up @@ -220,7 +220,7 @@ <h4><a href="/blog/blogindex.html#2013-September">September</a></h4>



<h4><a href="/blog/blogindex.html#2013-July">July</a></h4>
| <a href="/blog/blogindex.html#2013-07">07</a>



Expand Down Expand Up @@ -287,7 +287,7 @@ <h4><a href="/blog/blogindex.html#2013-July">July</a></h4>



<h4><a href="/blog/blogindex.html#2013-June">June</a></h4>
| <a href="/blog/blogindex.html#2013-06">06</a>



Expand Down Expand Up @@ -328,7 +328,7 @@ <h4><a href="/blog/blogindex.html#2013-June">June</a></h4>



<h4><a href="/blog/blogindex.html#2013-March">March</a></h4>
| <a href="/blog/blogindex.html#2013-03">03</a>



Expand Down Expand Up @@ -356,7 +356,7 @@ <h4><a href="/blog/blogindex.html#2013-March">March</a></h4>



<h4><a href="/blog/blogindex.html#2013-February">February</a></h4>
| <a href="/blog/blogindex.html#2013-02">02</a>



Expand Down Expand Up @@ -410,7 +410,7 @@ <h4><a href="/blog/blogindex.html#2013-February">February</a></h4>


<h3><a href="/blog/blogindex.html#2012">2012</a></h3>
<h4><a href="/blog/blogindex.html#2012-November">November</a></h4>
<a href="/blog/blogindex.html#2012-11">11</a>



Expand Down Expand Up @@ -463,7 +463,7 @@ <h4><a href="/blog/blogindex.html#2012-November">November</a></h4>



<h4><a href="/blog/blogindex.html#2012-October">October</a></h4>
| <a href="/blog/blogindex.html#2012-10">10</a>



Expand Down Expand Up @@ -491,7 +491,7 @@ <h4><a href="/blog/blogindex.html#2012-October">October</a></h4>



<h4><a href="/blog/blogindex.html#2012-September">September</a></h4>
| <a href="/blog/blogindex.html#2012-09">09</a>



Expand All @@ -506,7 +506,7 @@ <h4><a href="/blog/blogindex.html#2012-September">September</a></h4>



<h4><a href="/blog/blogindex.html#2012-August">August</a></h4>
| <a href="/blog/blogindex.html#2012-08">08</a>



Expand Down Expand Up @@ -534,7 +534,7 @@ <h4><a href="/blog/blogindex.html#2012-August">August</a></h4>



<h4><a href="/blog/blogindex.html#2012-May">May</a></h4>
| <a href="/blog/blogindex.html#2012-05">05</a>



Expand Down Expand Up @@ -607,15 +607,15 @@ <h3>Tags:</h3>

<a href="/blog/blogindex.html#ux">ux</a> (3)<br />

<a href="/blog/blogindex.html#messaging">messaging</a> (4)<br />
<a href="/blog/blogindex.html#messaging">messaging</a> (5)<br />

<a href="/blog/blogindex.html#drupal">drupal</a> (1)<br />

<a href="/blog/blogindex.html#chat">chat</a> (3)<br />
<a href="/blog/blogindex.html#chat">chat</a> (4)<br />

<a href="/blog/blogindex.html#applications">applications</a> (4)<br />
<a href="/blog/blogindex.html#applications">applications</a> (5)<br />

<a href="/blog/blogindex.html#routers">routers</a> (2)<br />
<a href="/blog/blogindex.html#routers">routers</a> (3)<br />

<a href="/blog/blogindex.html#energy">energy</a> (1)<br />

Expand Down
Expand Up @@ -118,7 +118,7 @@ <h1 class="pageheadings">Neighborhood network builders- a summary</h1>


<h3><a href="/blog/blogindex.html#2014">2014</a></h3>
<h4><a href="/blog/blogindex.html#2014-January">January</a></h4>
<a href="/blog/blogindex.html#2014-01">01</a>



Expand All @@ -137,7 +137,7 @@ <h4><a href="/blog/blogindex.html#2014-January">January</a></h4>


<h3><a href="/blog/blogindex.html#2013">2013</a></h3>
<h4><a href="/blog/blogindex.html#2013-December">December</a></h4>
<a href="/blog/blogindex.html#2013-12">12</a>



Expand All @@ -164,7 +164,7 @@ <h4><a href="/blog/blogindex.html#2013-December">December</a></h4>



<h4><a href="/blog/blogindex.html#2013-October">October</a></h4>
| <a href="/blog/blogindex.html#2013-10">10</a>



Expand Down Expand Up @@ -192,7 +192,7 @@ <h4><a href="/blog/blogindex.html#2013-October">October</a></h4>



<h4><a href="/blog/blogindex.html#2013-September">September</a></h4>
| <a href="/blog/blogindex.html#2013-09">09</a>



Expand Down Expand Up @@ -220,7 +220,7 @@ <h4><a href="/blog/blogindex.html#2013-September">September</a></h4>



<h4><a href="/blog/blogindex.html#2013-July">July</a></h4>
| <a href="/blog/blogindex.html#2013-07">07</a>



Expand Down Expand Up @@ -287,7 +287,7 @@ <h4><a href="/blog/blogindex.html#2013-July">July</a></h4>



<h4><a href="/blog/blogindex.html#2013-June">June</a></h4>
| <a href="/blog/blogindex.html#2013-06">06</a>



Expand Down Expand Up @@ -328,7 +328,7 @@ <h4><a href="/blog/blogindex.html#2013-June">June</a></h4>



<h4><a href="/blog/blogindex.html#2013-March">March</a></h4>
| <a href="/blog/blogindex.html#2013-03">03</a>



Expand Down Expand Up @@ -356,7 +356,7 @@ <h4><a href="/blog/blogindex.html#2013-March">March</a></h4>



<h4><a href="/blog/blogindex.html#2013-February">February</a></h4>
| <a href="/blog/blogindex.html#2013-02">02</a>



Expand Down Expand Up @@ -410,7 +410,7 @@ <h4><a href="/blog/blogindex.html#2013-February">February</a></h4>


<h3><a href="/blog/blogindex.html#2012">2012</a></h3>
<h4><a href="/blog/blogindex.html#2012-November">November</a></h4>
<a href="/blog/blogindex.html#2012-11">11</a>



Expand Down Expand Up @@ -463,7 +463,7 @@ <h4><a href="/blog/blogindex.html#2012-November">November</a></h4>



<h4><a href="/blog/blogindex.html#2012-October">October</a></h4>
| <a href="/blog/blogindex.html#2012-10">10</a>



Expand Down Expand Up @@ -491,7 +491,7 @@ <h4><a href="/blog/blogindex.html#2012-October">October</a></h4>



<h4><a href="/blog/blogindex.html#2012-September">September</a></h4>
| <a href="/blog/blogindex.html#2012-09">09</a>



Expand All @@ -506,7 +506,7 @@ <h4><a href="/blog/blogindex.html#2012-September">September</a></h4>



<h4><a href="/blog/blogindex.html#2012-August">August</a></h4>
| <a href="/blog/blogindex.html#2012-08">08</a>



Expand Down Expand Up @@ -534,7 +534,7 @@ <h4><a href="/blog/blogindex.html#2012-August">August</a></h4>



<h4><a href="/blog/blogindex.html#2012-May">May</a></h4>
| <a href="/blog/blogindex.html#2012-05">05</a>



Expand Down Expand Up @@ -607,15 +607,15 @@ <h3>Tags:</h3>

<a href="/blog/blogindex.html#ux">ux</a> (3)<br />

<a href="/blog/blogindex.html#messaging">messaging</a> (4)<br />
<a href="/blog/blogindex.html#messaging">messaging</a> (5)<br />

<a href="/blog/blogindex.html#drupal">drupal</a> (1)<br />

<a href="/blog/blogindex.html#chat">chat</a> (3)<br />
<a href="/blog/blogindex.html#chat">chat</a> (4)<br />

<a href="/blog/blogindex.html#applications">applications</a> (4)<br />
<a href="/blog/blogindex.html#applications">applications</a> (5)<br />

<a href="/blog/blogindex.html#routers">routers</a> (2)<br />
<a href="/blog/blogindex.html#routers">routers</a> (3)<br />

<a href="/blog/blogindex.html#energy">energy</a> (1)<br />

Expand Down

0 comments on commit 5052795

Please sign in to comment.