beeminder ETA in the navbar

master
muflax 2013-03-17 04:52:48 +01:00
parent 294188aaf7
commit b910399bd5
4 changed files with 21 additions and 1 deletions

View File

@ -81,6 +81,14 @@ module ::Nanoc
self["disqus_site"]
end
def beeminder_goal
self["beeminder"]
end
def beeminded?
!!beeminder_goal
end
def url
"http://#{main_site? ? "" : "#{@name}."}muflax.com"
end

View File

@ -0,0 +1,7 @@
<h1 class="title">ETA To Next Post</h1>
<p>
<a href="https://beeminder.com/muflax/goals/<%= @goal %>">
<img src="https://beeminder.com/muflax/goals/<%= @goal %>/graph?style=thumb">
</a>
</p>

View File

@ -21,7 +21,11 @@
<!-- navigation sidebar -->
<div id="nav">
<h1 class="title">Navigation</h1>
<% if @site.beeminded? %>
<%= render 'beeminder-eta', :goal => @site.beeminder_goal %>
<% end %>
<h1 class="title">Navigation</h1>
<% if @search %>
<%= google_search %>

View File

@ -8,5 +8,6 @@ sites:
daily:
title: muflax becomes a saint
disqus_site: dailymuflax
beeminder: dailylog
gospel:
title: The Unchanging Gospel