blog.html (1888B)
1 --- 2 layout: post 3 title: "Blog" 4 description: "A Clean Blog Theme by Start Bootstrap" 5 header-img: "img/post-bg-01.jpg" 6 --- 7 <div class="container-fluid index"> 8 <div class="row index all-posts"> 9 10 <h1 class="header author-header">{{ site.author_name }}</h1> 11 <h2 class="header" itemprop="headline">All posts</h2> 12 <h2 class="header categories" itemprop="headline"><small>grouped by 13 14 <div class="dropdown btn-group"> 15 <button class="btn btn-categories dropdown-toggle btn-xs" type="button" data-toggle="dropdown">Years</button> 16 <ul class="dropdown-menu"> 17 <li class="dropdown-item"><a href="{{ site.baseurl }}posts-by-categories/">Categories</a></li> 18 </ul> 19 </div> 20 21 </small></h2> 22 23 {% for post in site.posts %} 24 {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} 25 {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} 26 27 {% if forloop.first %} 28 <div class="col-lg-12 content-panel articles"> 29 <h2 id="{{ this_year }}-ref">{{ this_year }}</h2> 30 <ul style="list-style: none;"> 31 {% endif %} 32 33 <li> 34 <hr> 35 <a href="{{ post.url | prepend: site.baseurl }}"><img src="/{{ post.header-img | prepend: site.baseurl }}" class="img-responsive" alt="{{ post.title }}"></a> 36 <h3><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h3> 37 <small class="hidden-md">{{ post.date | date: "%B %-d, %Y" }}</small> 38 </li> 39 {% if forloop.last %} 40 </ul> 41 </div> 42 {% else %} 43 {% if this_year != next_year %} 44 </ul> 45 </div> 46 <div class="col-lg-12 content-panel articles"> 47 <h2 id="{{ next_year }}-ref">{{next_year}}</h2> 48 <ul style="list-style: none;"> 49 {% endif %} 50 {% endif %} 51 52 {% endfor %} 53 </div> 54 55 </div>