class Playbook::PbOverlay::Overlay
def classname
def classname generate_classname("pb_overlay") end
def color_map
def color_map { "card_light": "#fff", "bg_light": "#F3F7FB", "card_dark": "#231E3D", "bg_dark": "#0a0527", } end
def has_subsequent_overlay
def has_subsequent_overlay position == "x".to_sym || position == "y".to_sym end
def is_size_percentage
def is_size_percentage size.include?("%") end
def position
def position layout.keys[0] end
def previous_overlay
def previous_overlay "linear-gradient(#{previous_overlay_direction}, #{color_map[color.to_sym]} 0%, transparent #{size})" end
def previous_overlay_class_name
def previous_overlay_class_name "overlay_#{color}_#{previous_overlay_direction_token}_#{size}" end
def previous_overlay_direction
def previous_overlay_direction previous_overlay_direction_map[position.to_sym] end
def previous_overlay_direction_map
def previous_overlay_direction_map { "bottom": "to top", "top": "to bottom", "left": "to right", "right": "to left", "x": "to right", "y": "to top", } end
def previous_overlay_direction_map_token
def previous_overlay_direction_map_token { "x": "left", "y": "top", } end
def previous_overlay_direction_token
def previous_overlay_direction_token has_subsequent_overlay ? previous_overlay_direction_map_token[position.to_sym] : position end
def size
def size layout.values[0] end
def subsequent_overlay
def subsequent_overlay "linear-gradient(#{subsequent_overlay_direction}, #{color_map[color.to_sym]} 0%, transparent #{size})" end
def subsequent_overlay_class_name
def subsequent_overlay_class_name "overlay_#{color}_#{subsequent_overlay_direction_token}_#{size}" end
def subsequent_overlay_direction
def subsequent_overlay_direction subsequent_overlay_direction_map[position.to_sym] end
def subsequent_overlay_direction_map
def subsequent_overlay_direction_map { "bottom": "to top", "top": "to bottom", "left": "to right", "right": "to left", "x": "to left", "y": "to bottom", } end
def subsequent_overlay_direction_map_token
def subsequent_overlay_direction_map_token { "x": "right", "y": "bottom", } end
def subsequent_overlay_direction_token
def subsequent_overlay_direction_token has_subsequent_overlay ? subsequent_overlay_direction_map_token[position.to_sym] : position end