From 22f057888aecf9b66a3547711c50d7d5a88a9b55 Mon Sep 17 00:00:00 2001 From: Remo Mueller Date: Thu, 14 Mar 2019 13:23:16 -0400 Subject: [PATCH] Fix theme colors for medications review, addresses #697. --- .../stylesheets/components/headings.scss | 30 +++++++++++++++++++ app/views/medications/index.html.haml | 3 +- app/views/medications/review.html.haml | 4 +-- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/components/headings.scss b/app/assets/stylesheets/components/headings.scss index 9db5fa492..b560b028b 100644 --- a/app/assets/stylesheets/components/headings.scss +++ b/app/assets/stylesheets/components/headings.scss @@ -192,3 +192,33 @@ } } } + +.dashboard-heading { + border-radius: $border-radius; + font-size: 1.5rem; + font-weight: 500; + margin-bottom: $spacer; + padding: $spacer; + + @include media-breakpoint-up(sm) { + font-size: 1.75rem; + } + + @include media-breakpoint-up(md) { + font-size: 1.75rem; + } + + @include media-breakpoint-up(lg) { + font-size: 2rem; + } +} + +@each $name, $theme in $themes { + .theme-#{$name}-bg { + .dashboard-heading { + background-color: map-get($theme, dashboard-bg); + box-shadow: 0 0 5px map-get($theme, box-shadow-color); + color: map-get($theme, body-color); + } + } +} diff --git a/app/views/medications/index.html.haml b/app/views/medications/index.html.haml index 95a8e4cf5..7045ec211 100644 --- a/app/views/medications/index.html.haml +++ b/app/views/medications/index.html.haml @@ -29,8 +29,7 @@ - @medications.each_with_index do |medication, index| - if medication.stopped? && !separator_found - separator_found = true - .mb-3{ class: index.positive? ? "mt-5" : nil } - %h2 Stopped Medications + .dashboard-heading.text-center.text-sm-left Stopped Medications = render "medications/card", medication: medication, actions: true .center-horizontally= paginate @medications, theme: "bootstrap" diff --git a/app/views/medications/review.html.haml b/app/views/medications/review.html.haml index fba383d75..f2f082628 100644 --- a/app/views/medications/review.html.haml +++ b/app/views/medications/review.html.haml @@ -23,11 +23,11 @@ Yes = icon("fas", "caret-right") - = link_to something_changed_project_subject_medication_path(@project, @subject, @medication), class: "btn btn-link" do + = link_to something_changed_project_subject_medication_path(@project, @subject, @medication), class: "btn btn-link bg-dashboard mr-3" do = icon("fas", "exclamation-circle") No, something changed - = link_to stopped_completely_project_subject_medication_path(@project, @subject, @medication), class: "btn btn-link" do + = link_to stopped_completely_project_subject_medication_path(@project, @subject, @medication), class: "btn btn-link bg-dashboard" do = icon("fas", "stop-circle") No, stopped completely