Merge pull request #186 from hackclub/flavortown-letter-templates

This commit is contained in:
Max Wofford 2026-01-06 17:36:38 -05:00 committed by GitHub
commit 05d1e8d17e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 105 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View file

@ -0,0 +1,53 @@
# frozen_string_literal: true
module SnailMail
module Components
module Templates
class FlavortownFreeStickersFulfillmentTemplate < TemplateBase
def self.template_name
"flavortown free stickers fulfillment"
end
def self.template_description
"Flavortown Free Stickers Fulfillment"
end
def self.show_on_single?
true
end
def view_template
# Add your template content here
# Example: Add an image
image(
image_path("flavortown/domain.png"),
at: [ -2.5, 295 ],
width: 443,
)
# Render return address
render_return_address(10, 278, 260, 70, size: 10)
# Render destination address
render_destination_address(
160,
140,
220,
71,
size: 14,
valign: :bottom,
align: :left
)
# Render postal elements
render_imb(240, 24, 183)
render_qr_code(5, 115, 60)
render_letter_id(10, 65, 10, rotate: 90)
render_postage
end
end
end
end
end

View file

@ -0,0 +1,52 @@
# frozen_string_literal: true
module SnailMail
module Components
module Templates
class FlavortownFulfillmentTemplate < TemplateBase
def self.template_name
"flavortown fulfillment"
end
def self.template_description
"Flavortown Fulfillment"
end
def self.show_on_single?
true
end
def view_template
image(
image_path("flavortown/chefs.png"),
at: [46, 260],
width: 340,
)
# Render return address
render_return_address(10, 278, 260, 70, size: 10)
# Render destination address
render_destination_address(
100,
155,
230,
55,
size: 12,
valign: :center,
align: :center
)
# Render postal elements
render_imb(240, 24, 183)
render_qr_code(5, 65, 60)
render_letter_id(10, 19, 10)
render_postage
end
end
end
end
end