Files
growstuff/app/views/neighbours/_days.html.haml
T

13 lines
648 B
Plaintext

-# Days of the feed. `after` is the last day already on the page, so a day that
-# carries on from it does not get a second heading, and neither does a season
-# marker when it is still the same season.
- previous_season = after && season_start(after)
- neighbours.feed.each_with_index do |day, index|
- season = season_start(day.day)
- if season != previous_season && (heading = season_heading(season, neighbours))
%h3.neighbours-season= heading
- previous_season = season
- unless index.zero? && day.day == after
%h4.neighbours-day= day_heading(day.day)
= render partial: 'neighbours/entry', collection: day.updates, as: :entry