diff --git a/app/lib/snail_mail/components/templates/dino_waving_template.rb b/app/lib/snail_mail/components/templates/dino_waving_template.rb index 0a82c04..7d41c5e 100644 --- a/app/lib/snail_mail/components/templates/dino_waving_template.rb +++ b/app/lib/snail_mail/components/templates/dino_waving_template.rb @@ -4,13 +4,9 @@ module SnailMail module Components module Templates class DinoWavingTemplate < TemplateBase - def self.template_name - "Dino Waving" - end + def self.template_name = "Dino Waving" - def self.show_on_single? - true - end + def self.show_on_single? = true def view_template image( @@ -22,6 +18,20 @@ module SnailMail # Render return address render_return_address(10, 278, 260, 70, size: 10) + if letter.rubber_stamps.present? + font("arial") do + text_box( + letter.rubber_stamps, + at: [ 10, 220 ], + width: 230, + height: 50, + overflow: :shrink_to_fit, + disable_wrap_by_char: true, + min_size: 1 + ) + end + end + # Render destination address in speech bubble render_destination_address( 88, diff --git a/app/lib/snail_mail/components/templates/heidi_readme_template.rb b/app/lib/snail_mail/components/templates/heidi_readme_template.rb index 77a1ed0..bf05fec 100644 --- a/app/lib/snail_mail/components/templates/heidi_readme_template.rb +++ b/app/lib/snail_mail/components/templates/heidi_readme_template.rb @@ -4,20 +4,31 @@ module SnailMail module Components module Templates class HeidiReadmeTemplate < TemplateBase - def self.template_name - "Heidi Can't Readme" - end + def self.template_name = "Heidi Can't Readme" - def self.show_on_single? - true - end + def self.show_on_single? = true def view_template render_return_address(10, 278, 190, 90, size: 12, font: "f25") + if letter.rubber_stamps.present? + font("arial") do + text_box( + letter.rubber_stamps, + at: [ 10, 220 ], + width: 256, + height: 30, + overflow: :shrink_to_fit, + disable_wrap_by_char: true, + min_size: 1, + size: 10 + ) + end + end + render_destination_address( 133, - 176, + 170, 256, 107, size: 18, valign: :center, align: :left diff --git a/app/lib/snail_mail/components/templates/joyous_cat_template.rb b/app/lib/snail_mail/components/templates/joyous_cat_template.rb index e3d9d6f..6c97130 100644 --- a/app/lib/snail_mail/components/templates/joyous_cat_template.rb +++ b/app/lib/snail_mail/components/templates/joyous_cat_template.rb @@ -2,13 +2,9 @@ module SnailMail module Components module Templates class JoyousCatTemplate < TemplateBase - def self.template_name - "Joyous Cat :3" - end + def self.template_name = "Joyous Cat :3" - def self.show_on_single? - true - end + def self.show_on_single? = true def view_template self.line_width = 3 @@ -23,6 +19,20 @@ module SnailMail render_return_address(10, 270, 130, 70) + if letter.rubber_stamps.present? + font("arial") do + text_box( + letter.rubber_stamps, + at: [ 10, 50 ], + width: 180, + height: 18, + overflow: :shrink_to_fit, + disable_wrap_by_char: true, + min_size: 1 + ) + end + end + render_destination_address( 134, 173, diff --git a/app/lib/snail_mail/components/templates/kestrel_heidi_template.rb b/app/lib/snail_mail/components/templates/kestrel_heidi_template.rb index e4a8f98..a158870 100644 --- a/app/lib/snail_mail/components/templates/kestrel_heidi_template.rb +++ b/app/lib/snail_mail/components/templates/kestrel_heidi_template.rb @@ -2,13 +2,9 @@ module SnailMail module Components module Templates class KestrelHeidiTemplate < TemplateBase - def self.template_name - "kestrel's heidi template!" - end + def self.template_name = "kestrel's heidi template!" - def self.show_on_single? - true - end + def self.show_on_single? = true def view_template image( @@ -19,6 +15,20 @@ module SnailMail render_return_address(10, 278, 190, 90, size: 14) + if letter.rubber_stamps.present? + font("arial") do + text_box( + letter.rubber_stamps, + at: [ 7, 80 ], + width: 150, + height: 80, + overflow: :shrink_to_fit, + disable_wrap_by_char: true, + min_size: 1 + ) + end + end + render_destination_address( 126, 201, diff --git a/app/lib/snail_mail/components/templates/mail_orpheus_template.rb b/app/lib/snail_mail/components/templates/mail_orpheus_template.rb index 8445b67..70ddb9f 100644 --- a/app/lib/snail_mail/components/templates/mail_orpheus_template.rb +++ b/app/lib/snail_mail/components/templates/mail_orpheus_template.rb @@ -2,13 +2,9 @@ module SnailMail module Components module Templates class MailOrpheusTemplate < TemplateBase - def self.template_name - "Mail Orpheus!" - end + def self.template_name = "Mail Orpheus!" - def self.show_on_single? - true - end + def self.show_on_single? = true def view_template image( @@ -27,6 +23,22 @@ module SnailMail # Render return address render_return_address(10, 270, 130, 70) + if letter.rubber_stamps.present? + font("arial") do + text_box( + letter.rubber_stamps, + at: [ 7, 55 ], + width: 250, + height: 50, + overflow: :shrink_to_fit, + disable_wrap_by_char: true, + min_size: 1, + size: 10 + ) + end + end + + # Render destination address in speech bubble render_destination_address( 79.5,