Improve post delete style

This commit is contained in:
TheNeedful-DO 2024-02-08 15:56:59 +00:00
parent d3286750aa
commit 6bf88abbf2
2 changed files with 13 additions and 2 deletions

View File

@ -8,7 +8,7 @@
ol.microposts
padding: 0
.micropost
.display-name, .timestamp
.display-name, .timestamp, .delete
font-family: "Press Start 2P", "Anton", Impact, fantasy, sans-serif
font-size: .4em
margin: 1em
@ -18,3 +18,13 @@ ol.microposts
font-family: sans
font-size: .8em
text-shadow: none
.delete
&.emoji
font-size: .6em
a
text-shadow: -1px 1px #e1b027, 1px -1px #00ddff
&.text a
color: #cc0000
text-shadow: -1px 1px #e1b027, 1px -1px #00ddff
// a
color: #111111

View File

@ -3,5 +3,6 @@
%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.delete.emoji= link_to "❌", micropost, method: :delete, data: { confirm: 'Delete Post. Are you sure?' }
%span.delete.text= link_to "Delete", micropost, method: :delete, data: { confirm: 'Delete Post. Are you sure?' }
%span.content= micropost.content