From 730e79e78785857fd706b73252547a5c7f6431d9 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 4 Mar 2013 22:00:51 +0200 Subject: [PATCH] better event-notes typography --- .../stylesheets/gitlab_bootstrap/typography.scss | 4 ++++ app/assets/stylesheets/sections/events.scss | 12 +++++------- app/views/events/event/_note.html.haml | 7 ++++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/gitlab_bootstrap/typography.scss b/app/assets/stylesheets/gitlab_bootstrap/typography.scss index a7d71d53..1f0c4802 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/typography.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/typography.scss @@ -95,3 +95,7 @@ a:focus { .white .highlight pre { background: #f5f5f5; } ul { margin: 0 0 9px 25px !important; } } + +.md { + @include md-typography; +} diff --git a/app/assets/stylesheets/sections/events.scss b/app/assets/stylesheets/sections/events.scss index df8fd8d6..94e1d0b6 100644 --- a/app/assets/stylesheets/sections/events.scss +++ b/app/assets/stylesheets/sections/events.scss @@ -48,15 +48,13 @@ color: #666; } .event-note { - padding-top: 5px; - padding-left: 5px; - display: inline-block; color: #555; + margin-top: 5px; + margin-left: 40px; .note-file-attach { - margin-left: -25px; - float: left; .note-image-attach { + margin-top: 4px; margin-left: 0px; max-width: 200px; } @@ -66,8 +64,8 @@ color: #777; float: left; font-size: 16px; - line-height: 18px; - margin: 5px; + line-height: 16px; + margin-right: 5px; } } .avatar { diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index 19665ce0..199785e6 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -21,9 +21,10 @@ = event.project_name .event-body - %i.icon-comment-alt.event-note-icon - %span.event-note - = markdown truncate(event.target.note, length: 70) + .event-note + .md + %i.icon-comment-alt.event-note-icon + = sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p)) - note = event.target - if note.attachment.url = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do