From 003d3e82b071dc067509e75430abece38b59bc8a Mon Sep 17 00:00:00 2001 From: Alessandro Cuoghi Date: Wed, 9 Jan 2019 15:46:49 +0100 Subject: [PATCH] Convert Color to Variables - Added two temporal variables for colors. (Deciding how to call these new variables) - Replaced hexadecimal with variable - Remove white space in the html --- app/assets/stylesheets/_consul_settings.scss | 3 +++ app/assets/stylesheets/dashboard.scss | 12 ++++++------ app/views/dashboard/poster/index.html.erb | 4 ---- app/views/dashboard/poster/index.pdf.erb | 3 --- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/_consul_settings.scss b/app/assets/stylesheets/_consul_settings.scss index 4a083bb62..9e8af3615 100644 --- a/app/assets/stylesheets/_consul_settings.scss +++ b/app/assets/stylesheets/_consul_settings.scss @@ -65,6 +65,9 @@ $alert-bg: #f2dede; $alert-border: #ebccd1; $color-alert: #a94442; +$pdf-primary: #0300ff; +$pdf-secondary: #ff9e00; + // 2. Foundation settings overrides // --------------------------------- diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index 85bced319..5d588682c 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -425,7 +425,7 @@ .dashboard-mail-preview { .mail-header { - background: #0300ff; + background: $pdf-primary; color: #fff; padding: $line-height; @@ -461,7 +461,7 @@ .dashboard-poster-preview, .dashboard-poster-pdf { .poster-header { - background: #0300ff; + background: $pdf-primary; color: #fff; h1 { color: #fff; @@ -474,7 +474,7 @@ position: relative; &::before { - background: #ff9e00; + background: $pdf-secondary; content: ''; position: absolute; } @@ -508,7 +508,7 @@ .curly-quotes:before, .curly-quotes:after { - color: #0300ff; + color: $pdf-primary; display: inline-block; vertical-align: top; height: rem-calc(18); @@ -530,7 +530,7 @@ } h3 { - color: #0300ff; + color: $pdf-primary; display: inline; } @@ -550,7 +550,7 @@ .dashboard-poster-preview { .preview-width { - width: 661px; + width: rem-calc(661); } .poster-header { diff --git a/app/views/dashboard/poster/index.html.erb b/app/views/dashboard/poster/index.html.erb index 8d2882268..bc34812e6 100644 --- a/app/views/dashboard/poster/index.html.erb +++ b/app/views/dashboard/poster/index.html.erb @@ -13,7 +13,6 @@

<%= t("dashboard.poster.index.proposal_code", code: proposal.code) %>

-
<% if proposal.image.present? %>
@@ -21,16 +20,13 @@
);">
<% end %>
-

<%= t("dashboard.poster.index.support") %>

-

<%= proposal.title %>

-
diff --git a/app/views/dashboard/poster/index.pdf.erb b/app/views/dashboard/poster/index.pdf.erb index b5598d087..04f52b884 100644 --- a/app/views/dashboard/poster/index.pdf.erb +++ b/app/views/dashboard/poster/index.pdf.erb @@ -14,14 +14,12 @@ <%= wicked_pdf_image_tag("finger.png") %> <%= t("dashboard.poster.index.poster_subtitle") %> -

<%= t("dashboard.poster.index.intro_text").html_safe %>

<%= t("dashboard.poster.index.proposal_code", code: proposal.code) %>

-
<% if proposal.image.present? %>
');">
@@ -31,7 +29,6 @@ <%#= wicked_pdf_image_tag "default_mailing.jpg" %> <% end %>
-

<%= t("dashboard.poster.index.support") %>