Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add year filter (wip) #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Vagrant.configure('2') do |config|
config.vm.network "forwarded_port", guest: 4000, host: 4000, auto_correct: true
config.vm.provision :shell, :inline => <<-EOT
sudo apt-get -y install build-essential
sudo apt-get -y install ruby-rvm
rvm use 1.9.3 --default
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be working. Still complaining:

Error installing jekyll:
redcarpet requires Ruby version >= 1.9.2

sudo /opt/vagrant_ruby/bin/gem install jekyll rdiscount kramdown --no-ri --no-rdoc
EOT
end
21 changes: 15 additions & 6 deletions archive/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
---
layout: default
title: My blog's archive
description: All posts are gathered here
title: Balanced Blog
description: Balanced Blog Archive
---

<article>
<ul class="posts-list hfeed">
{% for post in paginator.posts %}
{% include post-list-item.html %}
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}

<li><a href="{{ post.url }}">{{ post.title }}</a></li>

{% endfor %}
</ul>
</article>

{% if site.tags.size > 0 %}
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
description: This is the landing page
title: Balanced Blog
description: Balanced Blog Index
---

<div id="listing-main" class="container clearfix" role="main">
Expand Down
5 changes: 5 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
$(document).ready(function(){
headerToggleInit();

$('#filter-options a').click(function(event){
console.log($(event.target).text())
});

function headerToggleInit(){
var open = false;
$('#filter-btn').click(function(){
Expand Down