diff --git a/app/lib/snail_mail/assets/images/ship_mail.png b/app/lib/snail_mail/assets/images/ship_mail.png new file mode 100644 index 0000000..9df2af5 Binary files /dev/null and b/app/lib/snail_mail/assets/images/ship_mail.png differ diff --git a/app/lib/snail_mail/components/templates/ship_mail_template.rb b/app/lib/snail_mail/components/templates/ship_mail_template.rb new file mode 100644 index 0000000..9295233 --- /dev/null +++ b/app/lib/snail_mail/components/templates/ship_mail_template.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module SnailMail + module Components + module Templates + class ShipMailTemplate < TemplateBase + def self.template_name + "Ship Mail" + end + + def self.show_on_single? + true + end + + def view_template + image( + image_path("ship_mail.png"), + at: [-2.5, 288], + width: 443, + ) + + render_return_address(5, bounds.top - 5, 190, 90, size: 8, font: "f25") + render_destination_address(85, bounds.top - 75, 260, 130, size: 18, valign: :center, align: :left) + + render_imb(245, 20, 170) + render_qr_code(150, 260, 35) + render_letter_id(3, 15, 8, rotate: 90) + render_postage + end + end + end + end +end \ No newline at end of file