hummingbird-me/hummingbird

View on GitHub
app/assets/javascripts/old/templates/stories/story.hamlbars

Summary

Maintainability
Test Coverage
%li.feed-item.cf
  .large-12.columns.feed-wrapper
    .small-3.large-2.columns.no-padding-right
      {{#type.comment}}
      %a(href="{{poster.url}}")
        %img(src="{{poster.avatar}}" alt="{{poster.name}}")
      {{/type.comment}}
      {{#type.followed}}
      %a(href="{{user.url}}")
        %img(src="{{user.avatar}}" alt="{{user.name}}")
      {{/type.followed}}
      {{#type.media_story}}
      %a(href="{{media.url}}")
        %img(src="{{media.cover_image}}" alt="{{media.title}}")
      {{/type.media_story}}
    .small-9.large-10.columns
      {{#type.comment}}
      %h4.anime-feed-title
        %a(href="{{poster.url}}") {{poster.name}}
        {{^self_post}}
        to
        %a(href="{{user.url}}") {{user.name}}
        {{/self_post}}
      {{/type.comment}}
      {{#type.followed}}
      %h4.anime-feed-title
        %a(href="{{user.url}}") {{user.name}}
        started following {{pluralCount substories_count 'person' 'people'}}.
      {{/type.followed}}
      {{#type.media_story}}
      %h4.anime-feed-title
        %a(href="{{media.url}}") {{media.title}}
      .anime-feed-genres
        %ul
          {{#media.genres}}
          %li 
            %a {{name}}
          {{/media.genres}}
      {{/type.media_story}}
      
      {{#substories}}
      {{> old/templates/stories/_substory}}
      {{/substories}}

    {{#morethantwo}}
    .large-12.columns.center
      %a.show-more(href="javascript:void(0)")
        {{^expanded}}
        %i.fa.fa-angle-down
        Show {{additional}} More
        {{/expanded}}
        {{#expanded}}
        %i.fa.fa-angle-up
        Hide
        {{/expanded}}
    {{/morethantwo}}