Add Haxmas template (#190)

This commit is contained in:
Oliver 2026-01-24 10:53:59 +11:00 committed by GitHub
parent 33b2223392
commit 888b119d51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View file

@ -0,0 +1,53 @@
# frozen_string_literal: true
module SnailMail
module Components
module Templates
class HaxmasTemplate < TemplateBase
def self.template_name
"Haxmas"
end
def self.show_on_single?
true
end
def view_template
image(
image_path("haxmas.png"),
at: [ -2.5, 295 ],
width: 443,
)
render_return_address(10, 278, 260, 70, size: 8, font: "f25")
render_destination_address(
100,
200,
260,
120,
size: 14,
valign: :center,
align: :left
)
bounding_box [ 7, 165 ],
width: 65,
height: 67,
valign: :bottom do
font_size 8
text letter.rubber_stamps || ""
end
render_imb(140, 70, 183)
render_qr_code(310, 262, 42)
render_letter_id(2, 5, 6)
render_postage
end
end
end
end
end