diff --git a/app/lib/snail_mail/assets/images/som/sinkening-boat.png b/app/lib/snail_mail/assets/images/som/sinkening-boat.png new file mode 100644 index 0000000..3f37964 Binary files /dev/null and b/app/lib/snail_mail/assets/images/som/sinkening-boat.png differ diff --git a/app/lib/snail_mail/assets/images/som/waves.png b/app/lib/snail_mail/assets/images/som/waves.png new file mode 100644 index 0000000..ce82093 Binary files /dev/null and b/app/lib/snail_mail/assets/images/som/waves.png differ 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 1c4e7d4..e3d9d6f 100644 --- a/app/lib/snail_mail/components/templates/joyous_cat_template.rb +++ b/app/lib/snail_mail/components/templates/joyous_cat_template.rb @@ -11,16 +11,9 @@ module SnailMail end def view_template - render_speech_bubble( - bubble_position: [111, 189], - bubble_width: 306, - bubble_height: 122, - bubble_radius: 10, - tail_x: 208, - tail_y: 74, - tail_width: 106.4, - line_width: 3 - ) + self.line_width = 3 + stroke { rounded_rectangle([111, 189], 306, 122, 10) } + image( image_path("acon-joyous-cat.png"), diff --git a/app/lib/snail_mail/components/templates/sinkening_template.rb b/app/lib/snail_mail/components/templates/sinkening_template.rb new file mode 100644 index 0000000..b683bd9 --- /dev/null +++ b/app/lib/snail_mail/components/templates/sinkening_template.rb @@ -0,0 +1,58 @@ +module SnailMail + module Components + module Templates + class SinkeningTemplate < TemplateBase + def self.template_name + "Sinkening balloons" + end + + def self.show_on_single? + true + end + + def view_template + # render_speech_bubble( + # bubble_position: [111, 189], + # bubble_width: 306, + # bubble_height: 122, + # bubble_radius: 10, + # tail_x: 208, + # tail_y: 74, + # tail_width: 106.4, + # line_width: 3 + # ) + self.line_width = 3 + stroke { rounded_rectangle([111, 189], 306, 122, 10) } + + + image( + image_path("som/sinkening-boat.png"), + at: [20, 90], + width: 106.4, + ) + image( + image_path("som/waves.png"), + at: [0, 21], + width: 6 * 72, + ) + + render_return_address(10, 270, 130, 70) + + render_destination_address( + 134, + 173, + 266, + 67, + size: 16, + valign: :center, + align: :left + ) + + render_imb(131, 100, 266) + render_qr_code(7, 72 + 7, 72) + render_postage + end + end + end + end +end