From 5fd9b2b633d249ca837a350531a432cd8f7b5c37 Mon Sep 17 00:00:00 2001 From: Alessandro Cuoghi Date: Tue, 8 Jan 2019 19:40:44 +0100 Subject: [PATCH] Change quote and fix font - Created new quotation marks without svg - Greater flexibility - Fix font Lato in PDF - change font family in pdf_font --- app/assets/stylesheets/dashboard.scss | 56 ++++++++++++++++++++--- app/assets/stylesheets/pdf_fonts.scss.erb | 5 +- app/views/dashboard/poster/index.html.erb | 13 ++---- app/views/dashboard/poster/index.pdf.erb | 12 ++--- 4 files changed, 62 insertions(+), 24 deletions(-) diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index efc328b40..c52c2fc32 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -498,6 +498,37 @@ text-align: left; } + .quote { + font-family: Georgia, serif; + font-size: 14px; + + blockquote { + border: 0; + } + + .curly-quotes:before, + .curly-quotes:after { + color: #0300ff; + display: inline-block; + vertical-align: top; + height: rem-calc(18); + line-height: rem-calc(70); + font-size: rem-calc(60); + } + + .curly-quotes:before { + content: '\201C'; + margin-right: 4px; + margin-left: -8px; + } + + .curly-quotes:after { + content: '\201D'; + margin-left: 4px; + margin-right: -8px; + } + } + h3 { color: #0300ff; display: inline; @@ -510,6 +541,8 @@ .poster-footer { color: $text-medium; border-left: 2px solid $border; + padding-left: rem-calc(40); + margin: 0 auto; } } } @@ -593,8 +626,6 @@ .poster-footer { font-size: rem-calc(19); - margin: 0 auto; - padding-left: $line-height / 2; width: 50%; margin-top: rem-calc(50); } @@ -609,10 +640,12 @@ .poster-header { padding: 5cm; height: 60cm; + font-weight: normal; h1 { font-size: 6cm; line-height: rem-calc(250); + font-weight: bold; img { width: 4cm; @@ -622,12 +655,13 @@ p { font-size: rem-calc(80); - line-height: rem-calc(80); + line-height: rem-calc(100); color: #fff; + &.intro { margin: rem-calc(160) auto; - max-width: 80%; + max-width: 70%; text-align: justify; } @@ -660,6 +694,15 @@ .poster-content { + .quote { + .curly-quotes:before, + .curly-quotes:after { + font-size: rem-calc(200); + height: rem-calc(18); + line-height: rem-calc(150); + } + } + h2 { font-size: 3cm; margin: $line-height 0; @@ -669,6 +712,7 @@ font-size: 4.7cm; margin-top: $line-height; max-width: 80%; + line-height: 5cm; } img{ @@ -678,10 +722,8 @@ } .poster-footer { - margin: 0 auto; - margin-top: 2cm; + margin-top: 3cm; max-width: 60%; - padding-left: rem-calc(40); width: 100%; } } 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/views/dashboard/poster/index.html.erb b/app/views/dashboard/poster/index.html.erb index 0a2ac21f1..0e12f97b3 100644 --- a/app/views/dashboard/poster/index.html.erb +++ b/app/views/dashboard/poster/index.html.erb @@ -17,26 +17,23 @@
<% if proposal.image.present? %>
- <%#= image_tag proposal.image.attachment.url(:large) %> <% else %>
);">
- <%#= image_tag "default_mailing.jpg" %> <% end %>

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

-

- - <%= proposal.title %> - -

+
+
+

<%= proposal.title %>

+
+
- diff --git a/app/views/dashboard/poster/index.pdf.erb b/app/views/dashboard/poster/index.pdf.erb index 6c2bdc237..7764fb055 100644 --- a/app/views/dashboard/poster/index.pdf.erb +++ b/app/views/dashboard/poster/index.pdf.erb @@ -34,15 +34,13 @@

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

-

- <%= wicked_pdf_image_tag 'quote-before.svg' %> - <%= proposal.title %> - <%= wicked_pdf_image_tag 'quote-after.svg' %> -

+
+
+

<%= proposal.title %>

+
+
- -