Sha256: 909742cd795d7cf88bce12e51ace66b9f43342255521f4839e371d38aaf50cc6
Contents?: true
Size: 1.42 KB
Versions: 6
Compression:
Stored size: 1.42 KB
Contents
# -*- encoding : utf-8 -*- class Card; module Set; class Abstract # Set: Abstract (SkinBox) # module SkinBox; extend Card::Set def self.source_location; "/Users/ethan/dev/decko/gem/card-mod-style/set/abstract/skin_box.rb"; end module HtmlFormat; module_parent.send :register_set_format, Card::Format::HtmlFormat, self; extend Card::Set::AbstractFormat view :box do class_up "box-middle", "p-0" voo.hide :customize_button, :box_middle super() end view :box_bottom, template: :haml view :customize_button, cache: :never do customize_button end def customize_button target: parent&.card, text: "Apply and customize" return "" unless card.codename.present? theme = card.codename.match(/^(?<theme_name>.+)_skin$/).capture(:theme_name) link_to_card target, text, path: { action: :update, card: { content: "[[#{card.name}]]" }, customize: true, theme: theme }, class: "btn btn-sm btn-outline-primary mr-2" end view :box_middle do return unless card.field(:image) field_nest(:image, view: :full_width, size: :large) end def select_button target=parent.card link_to_card target, "Apply", path: { action: :update, card: { content: "[[#{card.name}]]" } }, class: "btn btn-sm btn-primary" end end end;end;end;end; # ~~ generated from /Users/ethan/dev/decko/gem/card-mod-style/set/abstract/skin_box.rb ~~
Version data entries
6 entries across 6 versions & 1 rubygems