mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 19:55:10 +00:00
add sinkening
This commit is contained in:
parent
c7a99f8ea7
commit
e890840cca
4 changed files with 61 additions and 10 deletions
BIN
app/lib/snail_mail/assets/images/som/sinkening-boat.png
Normal file
BIN
app/lib/snail_mail/assets/images/som/sinkening-boat.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
app/lib/snail_mail/assets/images/som/waves.png
Normal file
BIN
app/lib/snail_mail/assets/images/som/waves.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -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"),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue