From e241e5b961c4ec299a09a14aed345e2bbb61f4a9 Mon Sep 17 00:00:00 2001 From: taitus Date: Wed, 21 May 2025 16:37:40 +0200 Subject: [PATCH] Unify poster preview with poster PDF styles Since commit c5103d30250, the styles from application.scss no longer apply to app/views/dashboard/poster/index.pdf.erb. To recover the text-center alignment, we add the rule in dashboard.scss. Note that we also remove text-center from the h2, since it wasn't applied and there's no need to recover it because it doesn't exist in the preview either. --- app/assets/stylesheets/dashboard.scss | 4 ++++ app/views/dashboard/poster/index.html.erb | 2 +- app/views/dashboard/poster/index.pdf.erb | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index 4c819c306..3233d17a8 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -545,6 +545,10 @@ } } + .proposal-code { + text-align: center; + } + .poster-content { margin: 0 auto; max-width: 90%; diff --git a/app/views/dashboard/poster/index.html.erb b/app/views/dashboard/poster/index.html.erb index 3abc66590..e6d557a5c 100644 --- a/app/views/dashboard/poster/index.html.erb +++ b/app/views/dashboard/poster/index.html.erb @@ -13,7 +13,7 @@ <%= sanitize(t("dashboard.poster.index.intro_text", org: Setting["org_name"])) %>

-

+

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

diff --git a/app/views/dashboard/poster/index.pdf.erb b/app/views/dashboard/poster/index.pdf.erb index 9a8b0e383..18788d538 100644 --- a/app/views/dashboard/poster/index.pdf.erb +++ b/app/views/dashboard/poster/index.pdf.erb @@ -18,7 +18,7 @@

<%= sanitize(t("dashboard.poster.index.intro_text", org: Setting["org_name"])) %>

-

+

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

@@ -29,7 +29,7 @@ <% end %>
-

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

+

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

<%= wicked_pdf_image_tag "quote_before_blue.png", alt: "" %>

<%= proposal.title %>

<%= wicked_pdf_image_tag "quote_after_blue.png", alt: "" %>