Socket
Book a DemoInstallSign in
Socket

acts-as-layoutable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acts-as-layoutable

0.0.1.7
bundlerRubygems
Version published
Maintainers
1
Created
Source

ActsAsLayoutable

Usage

Install

sudo gem install acts-as-layoutable

Usage

Layoutable do
  # defines valid areas
  areas :top, :bottom, :left, :right, :header, :footer, :center
  
  grids do
    full :top, :bottom, :left, :right, :center
    left :top, :bottom, :right
    portfolio :top, :bottom, :center
    blog do
      right :text, :social
    end
  end
  
  widgets do
    text do
      title :string, :label => "Sample text"
      body :text
    end
    
    social do
      links :as => Link
    end
  end
end

That creates cells, areas, and layouts.

Api

Layoutable.widgets #=> [text, social]
Layoutable.areas #=> [:top, :bottom, :left, :right, :header, :footer, :center]
Layoutable.layouts #=> [:full, :left, :portfolio]
layout = Layout.first
layout.widgets
layout.top_widgets
layout.bottom_widgets
  • Each Post has a different Layout via clone.
  • New layouts cannot be constructed outside of this dsl. Only the order and presence of cells within areas can be customized.
  • area is the "context" for the join of Layout to Widget.

FAQs

Package last updated on 02 Jul 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.