diff --git a/app/assets/fonts/quote-after.svg b/app/assets/fonts/quote-after.svg new file mode 100644 index 000000000..748305640 --- /dev/null +++ b/app/assets/fonts/quote-after.svg @@ -0,0 +1,18 @@ + + + + diff --git a/app/assets/fonts/quote-before.svg b/app/assets/fonts/quote-before.svg new file mode 100644 index 000000000..3620ae1ab --- /dev/null +++ b/app/assets/fonts/quote-before.svg @@ -0,0 +1,16 @@ + + + + diff --git a/app/assets/images/decide_madrid.png b/app/assets/images/decide_madrid.png new file mode 100644 index 000000000..7ae6b26b4 Binary files /dev/null and b/app/assets/images/decide_madrid.png differ diff --git a/app/assets/images/finger.png b/app/assets/images/finger.png new file mode 100644 index 000000000..eebd36e37 Binary files /dev/null and b/app/assets/images/finger.png differ diff --git a/app/assets/images/logo_header_black.png b/app/assets/images/logo_header_black.png new file mode 100644 index 000000000..7d9242f23 Binary files /dev/null and b/app/assets/images/logo_header_black.png differ diff --git a/app/assets/images/quote-after-blue.png b/app/assets/images/quote-after-blue.png new file mode 100644 index 000000000..f85ad04c4 Binary files /dev/null and b/app/assets/images/quote-after-blue.png differ diff --git a/app/assets/images/quote-after-white.png b/app/assets/images/quote-after-white.png new file mode 100644 index 000000000..5889b1780 Binary files /dev/null and b/app/assets/images/quote-after-white.png differ diff --git a/app/assets/images/quote-before-blue.png b/app/assets/images/quote-before-blue.png new file mode 100644 index 000000000..4c97bc0f7 Binary files /dev/null and b/app/assets/images/quote-before-blue.png differ diff --git a/app/assets/images/quote-before-white.png b/app/assets/images/quote-before-white.png new file mode 100644 index 000000000..78e74b277 Binary files /dev/null and b/app/assets/images/quote-before-white.png differ 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 dbe8c9897..a61301d24 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -436,18 +436,54 @@ .dashboard-mail-preview { + max-width: rem-calc(600); + .mail-header { - background: #3700fd; + background: $pdf-primary; color: #fff; - padding: $line-height; - text-align: center; + padding: $line-height * 2; + + img { + max-width: rem-calc(40); + vertical-align: top; + } + + h1 { + font-size: rem-calc(60); + } + + h2 { + margin-top: $line-height; + } + } + + .margin-bottom { + img { + box-shadow: -16px 61px 49px -19px rgba(0, 0, 0, 0.1); + width: 100%; + } } .mail-body { - text-align: justify; + color: $text-medium; + padding: $line-height * 2; + text-align: left; .button { - background: #3700fd; + background: #064c86; + box-shadow: -4px 18px 45px -19px rgba(0, 0, 0, 0.75); + margin-bottom: $line-height * 2; + margin-top: $line-height; + } + + img { + margin-top: $line-height; + max-width: rem-calc(120); + } + + p { + font-size: rem-calc(24); + line-height: rem-calc(30); } } } @@ -455,21 +491,85 @@ // 10. Poster preview // ------------------ -.dashboard-poster-preview { - +.dashboard-poster-preview, +.dashboard-poster-pdf { .poster-header { - background: $brand; + background: $pdf-primary; color: #fff; - padding: $line-height * 2 $line-height $line-height * 6; h1 { color: #fff; - font-size: rem-calc(80); + text-align: left; + } + } + + .proposal-image { + margin: 0 auto; + position: relative; + + &::before { + background: $pdf-secondary; + content: ''; + position: absolute; + } + + .overflow-image { + background-position: center; + background-size: cover; + background-repeat: no-repeat; + overflow: hidden; + position: relative; + } + } + + .poster-content { + max-width: 90%; + margin: 0 auto; + + h2 { + color: $text-medium; + text-align: left; + } + + h3 { + color: $pdf-primary; + display: inline; + } + + .title-quote { + display: inline-block; + } + + .poster-footer { + border-left: 2px solid $border; + color: $text-medium; + } + } +} + +.dashboard-poster-preview { + + .preview-width { + width: rem-calc(661); + } + + .poster-header { + height: rem-calc(600); + padding: $line-height * 2 $line-height; + + h1 { + font-size: rem-calc(60); line-height: rem-calc(80); + + img { + max-width: rem-calc(50); + } } p { - font-size: rem-calc(24); + font-size: rem-calc(18); + max-width: 60%; + margin: 0 auto; } .intro { @@ -481,51 +581,59 @@ .proposal-image { margin: 0 auto; - max-width: 80%; + max-width: 90%; position: relative; + .overflow-image { + height: 400px; + } + &::before { - background: #ff9e00; - content: ''; height: rem-calc(120); - left: -36px; - position: absolute; - top: -180px; + left: -30px; + top: -20px; width: rem-calc(120); } img { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25); - margin-top: rem-calc(-144); + margin-top: rem-calc(10); position: relative; width: 100%; } + + h2 { + margin: $line-height 0; + } } - h2 { - color: $text-medium; - margin: $line-height 0; - margin-left: 10%; - text-align: left; - } + .poster-content { - h3 { - color: $brand; - font-size: rem-calc(50); - margin-bottom: $line-height * 2; + img { + max-width: rem-calc(40); + vertical-align: top; + } + + h2 { + font-size: rem-calc(28); + margin: $line-height 0; + } + + h3 { + font-size: rem-calc(45); + margin-bottom: $line-height * 2; + } .title-quote { display: inline-block; - top: rem-calc(-12); - vertical-align: baseline; + font-size: rem-calc(50); } } .poster-footer { - border-left: 2px solid $border; - font-size: rem-calc(20); - margin: 0 auto; - padding-left: $line-height / 2; + font-size: rem-calc(19); + margin-top: rem-calc(50); + padding-left: rem-calc(40); width: 50%; } } @@ -533,90 +641,87 @@ // 11. Poster PDF // -------------- + .dashboard-poster-pdf { .poster-header { - background: $brand; - color: #fff; - padding: rem-calc(320) rem-calc(160) rem-calc(640); - text-align: center; + font-weight: normal; + height: 60cm; + padding: 5cm; h1 { - color: #fff; - font-size: rem-calc(250); + font-size: 6cm; + font-weight: bold; line-height: rem-calc(250); - text-align: left; + + img { + max-width: rem-calc(150); + } } p { + color: #fff; font-size: rem-calc(80); - line-height: rem-calc(80); + line-height: rem-calc(100); &.intro { margin: rem-calc(160) auto; - max-width: 60%; + max-width: 70%; text-align: justify; } + + &.proposal-code { + font-size: 1.7cm; + } } } .proposal-image { margin: 0 auto; - max-width: rem-calc(2000); + max-width: 90%; position: relative; &::before { - background: #ff9e00; - content: ''; - height: rem-calc(400); - left: -120px; - position: absolute; - top: -720px; - width: rem-calc(400); + height: rem-calc(420); + left: rem-calc(-130); + top: rem-calc(-130); + width: rem-calc(420); } - img { - box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25); - margin-top: rem-calc(-600); - position: relative; - width: 100%; + .overflow-image { + height: 37cm; + } + + h2 { + margin: $line-height 0; } } .poster-content { - margin: 0 auto; - max-width: rem-calc(2000); - } + img { + height: 3cm; + vertical-align: top; + width: 3cm; + } - h2 { - color: $text-medium; - font-size: rem-calc(80); - margin-top: rem-calc(80); - } + h2 { + font-size: 3cm; + margin: $line-height 0; + } - h3 { - color: $brand; - font-size: rem-calc(200); - line-height: rem-calc(240); - margin: rem-calc(80) 0; - position: relative; - width: 90%; - - .title-quote { - display: inline-block; - top: rem-calc(-40); - vertical-align: baseline; + h3 { + font-size: 4.7cm; + line-height: 5.5cm; + margin-top: $line-height; + max-width: 80%; } } .poster-footer { - border-left: 10px solid $border; - color: $text-medium; - font-size: rem-calc(60); - line-height: rem-calc(60); - margin: 0 auto; - max-width: 60%; - padding-left: rem-calc(40); - width: 100%; + display: block; + margin-left: 15cm; + margin-top: 2cm; + max-width: 55%; + padding-left: 4cm; } } diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss index 3d97084f4..5256b236e 100644 --- a/app/assets/stylesheets/icons.scss +++ b/app/assets/stylesheets/icons.scss @@ -292,3 +292,34 @@ .icon-bars::before { content: '\22'; } + +.icon-quote-before::before { + content: ''; + background-size: cover; + display: block; + width: 60px; + height: 60px; + background-image: url(quote-before.svg); + background-repeat: no-repeat; +} + +.icon-quote-after::before { + content: ''; + background-size: cover; + display: block; + width: 60px; + height: 60px; + background-image: url(quote-after.svg); + background-repeat: no-repeat; +} + + +.icon-finger::before { + content: ''; + background-size: cover; + display: inline-block; + width: 50px; + height: 50px; + background-image: url(finger.svg); + background-repeat: no-repeat; +} diff --git a/app/assets/stylesheets/pdf_fonts.scss.erb b/app/assets/stylesheets/pdf_fonts.scss.erb index bbf549949..07a577fa0 100644 --- a/app/assets/stylesheets/pdf_fonts.scss.erb +++ b/app/assets/stylesheets/pdf_fonts.scss.erb @@ -53,12 +53,13 @@ } @font-face { - font-family: 'Lato PDF'; + font-family: 'Lato PDF'; src: url("<%= ApplicationHelper.asset_data_base64('lato-bold.ttf') %>"); font-weight: bold; font-style: normal; } body, h1, h2, h3 { - font-family: Source Sans Pro PDF !important; + font-family: Lato PDF !important; + font-weight: lighter !important; } diff --git a/app/controllers/dashboard/poster_controller.rb b/app/controllers/dashboard/poster_controller.rb index be880bdac..4484dd447 100644 --- a/app/controllers/dashboard/poster_controller.rb +++ b/app/controllers/dashboard/poster_controller.rb @@ -7,6 +7,8 @@ class Dashboard::PosterController < Dashboard::BaseController format.pdf do render pdf: 'poster', page_size: 'A4', + dpi: 300, + zoom: 0.32, show_as_html: Rails.env.test? || params.key?('debug'), margin: { top: 0 } end diff --git a/app/views/dashboard/mailer/forward.html.erb b/app/views/dashboard/mailer/forward.html.erb index 3788c94aa..f64019f85 100644 --- a/app/views/dashboard/mailer/forward.html.erb +++ b/app/views/dashboard/mailer/forward.html.erb @@ -4,33 +4,36 @@
- <%= @proposal.title %>-<%= t("dashboard.mailer.forward.subtitle") %>+ |
+ <%= image_tag 'quote-before-white.png', style: 'max-width: 40px; vertical-align: top;' %>
+ <%= @proposal.title %>+ <%= image_tag 'quote-after-white.png', style: 'max-width: 40px; vertical-align: top;' %> +<%= t("dashboard.mailer.forward.subtitle").html_safe %> |
<%= t("dashboard.mailer.forward.hi")%>
-<%= t("dashboard.mailer.forward.introduction", org: setting['org_name']) %>
-<%= t("dashboard.mailer.forward.support") %>
+<%= t("dashboard.mailer.forward.hi")%>
+<%= t("dashboard.mailer.forward.introduction", org: setting['org_name']) %>
+<%= t("dashboard.mailer.forward.support") %>
| <%= link_to proposal_url(@proposal), - style: "font-family: 'Open Sans',arial,sans-serif; background: #3700fd; + style: "font-family: 'Open Sans',arial,sans-serif; background: #064c86; border-radius: 6px; color: #fff !important; font-weight: bold; padding: 17px 20px; text-align: center; text-decoration: none; - font-size: 20px; min-width: 200px; display: inline-block;", + font-size: 20px; min-width: 200px; display: inline-block; + box-shadow: -4px 18px 45px -19px rgba(0,0,0,0.75);", target: "_blank" do %> <%= t("dashboard.mailer.forward.support_button") %> <% end %> @@ -39,13 +42,13 @@ |
<%= t("dashboard.mailer.forward.share") %>
+<%= t("dashboard.mailer.forward.share") %>
- <%= t("dashboard.mailer.forward.share_in") %>+<%= t("dashboard.mailer.forward.share_in") %> |