Commit ae0449c0

mo khan <mo@mokhan.ca>
2014-09-02 15:30:10
shrink the size of each cake in the my cakes section.
1 parent 36f5fa5
Changed files (2)
app
assets
javascripts
backbone
templates
views
app/assets/javascripts/backbone/templates/cakes/cake.jst.ejs
@@ -3,7 +3,7 @@
     <a href="#cakes/<%= id %>"><img src="<%= randomPhoto().thumb_url %>" /></a>
   <% } %>
   <div class="caption">
-    <h3><a href="#cakes/<%= id %>"><%= name %></a></h3>
+    <h4><a href="#cakes/<%= id %>"><%= shrink(name) %></a></h4>
     <span class="badge badge-warning"><i class="icon-comments"> <a href="/creations/<%= id %>#disqus_thread" data-disqus-identifier="c-<%= id %>"></a></i></span>
   </div>
 </div>
app/assets/javascripts/backbone/views/cakes/cake_view.js.coffee
@@ -3,9 +3,11 @@ CakeSide.Views.Cakes ||= {}
 class CakeSide.Views.Cakes.CakeView extends Marionette.ItemView
   template: JST["backbone/templates/cakes/cake"]
   tagName: 'li'
-  className: 'span3'
+  className: 'span2'
   templateHelpers:
     randomPhoto: ->
       @photos[Math.floor(Math.random()*@photos.length)]
     hasImage: ->
       typeof(@photos) != 'undefined' && _.any(@photos)
+    shrink: (message) ->
+      message.substring(0, 12)