accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mjw...@apache.org
Subject [1/2] accumulo-website git commit: Clean up logic for making header row
Date Tue, 21 Feb 2017 18:32:55 GMT
Repository: accumulo-website
Updated Branches:
  refs/heads/master 919ac1ac4 -> 538f419ab


Clean up logic for making header row


Project: http://git-wip-us.apache.org/repos/asf/accumulo-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo-website/commit/75859911
Tree: http://git-wip-us.apache.org/repos/asf/accumulo-website/tree/75859911
Diff: http://git-wip-us.apache.org/repos/asf/accumulo-website/diff/75859911

Branch: refs/heads/master
Commit: 75859911f216389a033b04b62ae22732855b89d6
Parents: 919ac1a
Author: Michael Wall <mjwall@gmail.com>
Authored: Tue Feb 21 13:32:30 2017 -0500
Committer: Michael Wall <mjwall@gmail.com>
Committed: Tue Feb 21 13:32:30 2017 -0500

----------------------------------------------------------------------
 pages/news.md    |  8 +++++---
 pages/release.md | 11 ++++++-----
 2 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/75859911/pages/news.md
----------------------------------------------------------------------
diff --git a/pages/news.md b/pages/news.md
index 52a2d6a..912bcb6 100644
--- a/pages/news.md
+++ b/pages/news.md
@@ -5,12 +5,14 @@ redirect_from: /blog/
 ---
 
 <div>
+{% assign header_year = site.posts[0].date | date: "%Y" %}
+<h3>{{header_year}}</h3>
 {% for post in site.posts %}
   {% assign post_year = post.date | date: "%Y" %}
-  {% assign newer_post_year = post.next.date | date: "%Y" %}
-  {% if post_year != newer_post_year %}
+  {% if post_year != header_year %}
+    {% assign header_year = post_year %}
     <hr>
-    <h3>{{ post_year }}</h3>
+    <h3>{{ header_year }}</h3>
   {% endif %}
   <div class="row" style="margin-top: 15px">
     <div class="col-md-1">{{ post.date | date: "%b %d" }}</div>

http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/75859911/pages/release.md
----------------------------------------------------------------------
diff --git a/pages/release.md b/pages/release.md
index 6c8dda6..e198b12 100644
--- a/pages/release.md
+++ b/pages/release.md
@@ -8,13 +8,14 @@ redirect_from:
 
 <div>
 <hr>
-<h3>{{ site.categories.release[0].date | date: "%Y" }}</h3>
+{% assign header_year = site.categories.release[0].date | date: "%Y" %}
+<h3>{{header_year}}</h3>
 {% for release in site.categories.release %}
-  {% assign release_year = release.date | date: "%Y" %}
-  {% assign newer_release_year = release.next.date | date: "%Y" %}
-  {% if release_year != newer_release_year %}
+  {% assign current_release_year = release.date | date: "%Y" %}
+  {% if current_release_year != header_year %}
+    {% assign header_year = current_release_year %}
     <hr>
-    <h3>{{ release_year }}</h3>
+    <h3>{{ header_year }}</h3>
   {% endif %}
   <div class="row" style="margin-top: 15px">
     <div class="col-md-1">{{ release.date | date: "%b %d" }}</div>


Mime
View raw message