Commit 730e79e78785857fd706b73252547a5c7f6431d9
1 parent
d54845a1
Exists in
master
and in
4 other branches
better event-notes typography
Showing
3 changed files
with
13 additions
and
10 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap/typography.scss
app/assets/stylesheets/sections/events.scss
... | ... | @@ -48,15 +48,13 @@ |
48 | 48 | color: #666; |
49 | 49 | } |
50 | 50 | .event-note { |
51 | - padding-top: 5px; | |
52 | - padding-left: 5px; | |
53 | - display: inline-block; | |
54 | 51 | color: #555; |
52 | + margin-top: 5px; | |
53 | + margin-left: 40px; | |
55 | 54 | |
56 | 55 | .note-file-attach { |
57 | - margin-left: -25px; | |
58 | - float: left; | |
59 | 56 | .note-image-attach { |
57 | + margin-top: 4px; | |
60 | 58 | margin-left: 0px; |
61 | 59 | max-width: 200px; |
62 | 60 | } |
... | ... | @@ -66,8 +64,8 @@ |
66 | 64 | color: #777; |
67 | 65 | float: left; |
68 | 66 | font-size: 16px; |
69 | - line-height: 18px; | |
70 | - margin: 5px; | |
67 | + line-height: 16px; | |
68 | + margin-right: 5px; | |
71 | 69 | } |
72 | 70 | } |
73 | 71 | .avatar { | ... | ... |
app/views/events/event/_note.html.haml
... | ... | @@ -21,9 +21,10 @@ |
21 | 21 | = event.project_name |
22 | 22 | |
23 | 23 | .event-body |
24 | - %i.icon-comment-alt.event-note-icon | |
25 | - %span.event-note | |
26 | - = markdown truncate(event.target.note, length: 70) | |
24 | + .event-note | |
25 | + .md | |
26 | + %i.icon-comment-alt.event-note-icon | |
27 | + = sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p)) | |
27 | 28 | - note = event.target |
28 | 29 | - if note.attachment.url |
29 | 30 | = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do | ... | ... |