From 2535429b85d4ee491f13cea07e1af481dd86b2d8 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 31 Aug 2014 20:16:21 +0300 Subject: [PATCH] Styling of Lectures and Workshops show views --- app/assets/stylesheets/events.css.scss | 36 ++++++++++++++++++++++++++ app/views/lectures/show.html.slim | 14 +++++----- app/views/workshops/show.html.slim | 12 ++++----- 3 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 app/assets/stylesheets/events.css.scss diff --git a/app/assets/stylesheets/events.css.scss b/app/assets/stylesheets/events.css.scss new file mode 100644 index 0000000..dc6fdeb --- /dev/null +++ b/app/assets/stylesheets/events.css.scss @@ -0,0 +1,36 @@ +.lecture-title { + font-family: Arial,sans-serif; + font-size: 26px; + font-weight: bold; + line-height: 26px; + padding: 0px 0px 7px; + font-style: italic; + + span.subtitle { + font-size: 18px; + font-style: italic; + color: #999; + } +} + +.abstract, .description { + h3 { + font-family: Arial,sans-serif; + margin-top: 14px; + font-size: 21px; + font-style: italic; + font-weight: bold; + } + + p { + text-indent: 10px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0; + width: 600px; + } + + p:last-of-type { + margin-bottom: 15px; + } +} \ No newline at end of file diff --git a/app/views/lectures/show.html.slim b/app/views/lectures/show.html.slim index 89ab7ef..04fb996 100644 --- a/app/views/lectures/show.html.slim +++ b/app/views/lectures/show.html.slim @@ -1,12 +1,10 @@ -h1.entry-title Преглед на лекция - h2.lecture-title - = @lecture.title + => @lecture.title span.subtitle = @lecture.subtitle - .entry-meta - | - поток: „#{@lecture.track.name}“, - продължителност: #{@lecture.length} мин. +.entry-meta + | + поток: „#{@lecture.track.name}“, + продължителност: #{@lecture.length} мин. section.abstract h3 Резюме @@ -17,4 +15,4 @@ section.description = simple_format @lecture.description - if current_user == @lecture.user - = link_to 'Редактирай', edit_lecture_path(@lecture) + = link_to 'Редактирай', edit_lecture_path(@lecture), class: 'btn-link' diff --git a/app/views/workshops/show.html.slim b/app/views/workshops/show.html.slim index 6cbdf39..dc26192 100644 --- a/app/views/workshops/show.html.slim +++ b/app/views/workshops/show.html.slim @@ -1,12 +1,10 @@ -h1.entry-title Преглед на уъркшоп - h2.workshop-title = @workshop.title span.subtitle = @workshop.subtitle - .entry-meta - | - поток: „#{@workshop.track.name}“, - продължителност: #{@workshop.length} мин. +.entry-meta + | + поток: „#{@workshop.track.name}“, + продължителност: #{@workshop.length} мин. section.abstract h3 Резюме @@ -17,4 +15,4 @@ section.description = simple_format @workshop.description - if current_user == @workshop.user - = link_to 'Редактирай', edit_workshop_path(@workshop) + = link_to 'Редактирай', edit_workshop_path(@workshop), class: 'btn-link'