Class: Charming::Welcome::ShowView
- Defined in:
- lib/charming/welcome/show_view.rb
Overview
The welcome screen body: a pastel Miami-deco skyline over the app name, tagline, Charming version, and project link, centered on the terminal.
Constant Summary collapse
- SKYLINE_COLORS =
{ "F" => "#f0437c", # flamingo "B" => "#f9cfd8", # blush "M" => "#bfe8dc", # mint "C" => "#f3e6c9", # cream "P" => "#fdfaf3", # plaster "G" => "#1d4b44" # palm green }.freeze
- SKYLINE =
Rows of [art, color mask] pairs; each mask letter colors the glyph above it.
[ [" ▲ ", " F "], [" █ ", " F "], [" ▄▄▄ ▄█▄ ▄▄▄ ", " BBB PFP MMM "], [" ███ ▐███▌ ███ ", " BBB PPPPP MMM "], [" █▀▀▀█ ▐███▌ █▀▀▀█ ", " BBBBB PPPPP MMMMM "], [" ▄█▄ █████ ▐█████▌ █████ ▄█▄ ", " GGG BBBBB PPPPPPP MMMMM GGG "], [" █ ▄▄▄ ██▀▀▀██ ▐█████▌ ██▀▀▀██ ▄▄▄ █ ", " G CCC BBBBBBB PPPPPPP MMMMMMM CCC G "], [" █ ███ ███████ ▐███████▌ ███████ ███ █ ", " G CCC BBBBBBB PPPPPPPPP MMMMMMM CCC G "], [" █ ███ ███████ ▐███████▌ ███████ ███ █ ", " G CCC BBBBBBB PPPPPPPPP MMMMMMM CCC G "], ["▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"] ].freeze
- SKYLINE_WIDTH =
SKYLINE.map { |art, _mask| art.length }.max
- SKYLINE_HEIGHT =
SKYLINE.length
Instance Method Summary collapse
Methods inherited from View
#focused?, #initialize, #layout_assigns
Constructor Details
This class inherits a constructor from Charming::View
Instance Method Details
#render ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/charming/welcome/show_view.rb', line 43 def render screen_layout(background: theme.background) do pane(style: centered) do welcome_content end end end |