Skip to content

Commit

Permalink
Fix theme colors for medications review, addresses #697.
Browse files Browse the repository at this point in the history
  • Loading branch information
remomueller committed Mar 14, 2019
1 parent 18f6621 commit 22f0578
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
30 changes: 30 additions & 0 deletions app/assets/stylesheets/components/headings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
3 changes: 1 addition & 2 deletions app/views/medications/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions app/views/medications/review.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 22f0578

Please sign in to comment.