Skip to content

Commit

Permalink
make pdf titles single blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
willc-work committed Jul 7, 2023
1 parent 3da96e9 commit 6653ff3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/services/pdf_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class PdfService
emulate_media: "screen",
launch_args: ["--font-render-hinting=medium", "--no-sandbox"],
execute_script: "document.querySelectorAll('button').forEach(el => el.style.display = 'none')",
media_features: [{ name: "prefers-color-scheme", value: "dark" }],
scale: 0.8 / 1,
}.freeze

class << self
Expand Down
3 changes: 2 additions & 1 deletion app/views/estimates/print.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
= render "evidence"

- if @model.calculated?(:gross_income) || @model.calculated?(:disposable_income) || @model.calculated?(:capital)
h2.govuk-heading-m = t("estimates.show.#{@model.level_of_help}_how_calculated")
h2.govuk-heading-m style="white-space: nowrap;"
= t("estimates.show.#{@model.level_of_help}_how_calculated")

- if @model.calculated?(:gross_income)
h2.govuk-heading-m = t("estimates.show.income_calculation")
Expand Down

0 comments on commit 6653ff3

Please sign in to comment.