diff --git a/app/assets/stylesheets/microposts.sass b/app/assets/stylesheets/microposts.sass index 4a793c55..22789c56 100644 --- a/app/assets/stylesheets/microposts.sass +++ b/app/assets/stylesheets/microposts.sass @@ -5,3 +5,14 @@ color: #ddd box-shadow: 0px 0px 0px 10px black inset, 0px 0px 0px 43px white inset, 0px 0px 116px 62px black inset rotate: -36deg +.micropost + .display-name, .timestamp + font-family: "Press Start 2P", "Anton", Impact, fantasy, sans-serif + font-size: .4em + margin: 1em + padding: 1em + background: #ffffff33 + .content + font-family: sans + font-size: .8em + text-shadow: none diff --git a/app/views/microposts/_micropost.html.haml b/app/views/microposts/_micropost.html.haml index 35b64c85..c0a3ebbd 100644 --- a/app/views/microposts/_micropost.html.haml +++ b/app/views/microposts/_micropost.html.haml @@ -1,6 +1,7 @@ -%li{id: "micropost-#{micropost.id}"} - %span= link_to micropost.micropostable.display_name, micropost.micropostable +%li.micropost{id: "micropost-#{micropost.id}"} + %div + %span.display-name= link_to micropost.micropostable.display_name, micropost.micropostable + %span.timestamp #{time_ago_in_words(micropost.created_at)} ago. + - if policy(micropost).destroy? + %span= link_to "❌", micropost, method: :delete, data: { confirm: 'Are you sure?' } %span.content= micropost.content - %span.timestamp Posted #{time_ago_in_words(micropost.created_at)} ago. - - if policy(micropost).destroy? - %span= link_to "❌", micropost, method: :delete, data: { confirm: 'Are you sure?' }