Sha256: d01388dda4aac8f3ed890e6bdd2a2fd6c4108321c4d12fec0577370076db57bc

Contents?: true

Size: 849 Bytes

Versions: 4

Compression:

Stored size: 849 Bytes

Contents

template do
  "Hello World"
end

gadget :product_link, :floating => true

gadget :quick_buy, :floating => true do
  settings do
    meta :product_code, :label => "Product code", :type => :string
    meta :text, :label => "Text", :type => :string
    meta :kind, :label => "Kind", :type => :select_one, :collection => ['light', 'dark']
    meta :target, :label => "Target"
  end

  context do
    {:kind => 'light'}.merge(meta_settings.symbolize_keys).merge(:express_link => "/products/#{meta_settings[:product_code]}/#{meta_settings[:color_code]}?express=true")
  end

  template do
    <<-STRING
      <a href="{{express_link}}" class="item product_express_box action other {{kind}} btn1"><span>{{text}}</span></a>
    STRING
  end
end

action :google do
  desc "From Google"
  detect do |app|
    '...'
  end
end

layout :home do
  gadgets []
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
qor_dsl-0.0.4 test/layout.rb
qor_dsl-0.0.3 test/layout.rb
qor_dsl-0.0.2 test/layout.rb
qor_dsl-0.0.1 test/layout.rb