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
@@ -95,3 +95,7 @@ a:focus { | @@ -95,3 +95,7 @@ a:focus { | ||
95 | .white .highlight pre { background: #f5f5f5; } | 95 | .white .highlight pre { background: #f5f5f5; } |
96 | ul { margin: 0 0 9px 25px !important; } | 96 | ul { margin: 0 0 9px 25px !important; } |
97 | } | 97 | } |
98 | + | ||
99 | +.md { | ||
100 | + @include md-typography; | ||
101 | +} |
app/assets/stylesheets/sections/events.scss
@@ -48,15 +48,13 @@ | @@ -48,15 +48,13 @@ | ||
48 | color: #666; | 48 | color: #666; |
49 | } | 49 | } |
50 | .event-note { | 50 | .event-note { |
51 | - padding-top: 5px; | ||
52 | - padding-left: 5px; | ||
53 | - display: inline-block; | ||
54 | color: #555; | 51 | color: #555; |
52 | + margin-top: 5px; | ||
53 | + margin-left: 40px; | ||
55 | 54 | ||
56 | .note-file-attach { | 55 | .note-file-attach { |
57 | - margin-left: -25px; | ||
58 | - float: left; | ||
59 | .note-image-attach { | 56 | .note-image-attach { |
57 | + margin-top: 4px; | ||
60 | margin-left: 0px; | 58 | margin-left: 0px; |
61 | max-width: 200px; | 59 | max-width: 200px; |
62 | } | 60 | } |
@@ -66,8 +64,8 @@ | @@ -66,8 +64,8 @@ | ||
66 | color: #777; | 64 | color: #777; |
67 | float: left; | 65 | float: left; |
68 | font-size: 16px; | 66 | font-size: 16px; |
69 | - line-height: 18px; | ||
70 | - margin: 5px; | 67 | + line-height: 16px; |
68 | + margin-right: 5px; | ||
71 | } | 69 | } |
72 | } | 70 | } |
73 | .avatar { | 71 | .avatar { |
app/views/events/event/_note.html.haml
@@ -21,9 +21,10 @@ | @@ -21,9 +21,10 @@ | ||
21 | = event.project_name | 21 | = event.project_name |
22 | 22 | ||
23 | .event-body | 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 | - note = event.target | 28 | - note = event.target |
28 | - if note.attachment.url | 29 | - if note.attachment.url |
29 | = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do | 30 | = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do |