-
Notifications
You must be signed in to change notification settings - Fork 2
f7_content_block
Terry Wilson edited this page Sep 17, 2014
·
1 revision
This renders a single content block.
f7_content_block title, options, &block
f7_content_block options, &block
As well as all the usual HTML options, you have these extra, helper specific options:
-
:title
- Optional, some text to be displayed before the block. -
:format
- Configure the appearance. Take a single value or array:-
:inner
- The content is wrapped in an extra.content-block-inner
(on iOS this is typical a white background). -
:inset
- An inset content block. -
:tablet_inset
- Inset on tablets only. Ignored if:inset
is also specified.
-
-
:layout
- Optional, allows you specify a layout to render a page partial within. Ignored when used with a block.
<%= f7_content_block do %>
Some content.
<% end %>
<div class="content-block">
Some content.
</div>
<%= f7_content_block 'The Title' do %>
Some more content
<% end %>
or
<%= f7_content_block :title => 'The Title' do %>
Some more content
<% end %>
<div class="content-block-title">The Title</div>
<div class="content-block">
Some more content
</div>
<%= f7_content_block :format => :inset do %>
Inset content
<% end %>
<div class="content-block inset">
Inset content
</div>
<%= f7_content_block :format => :inner do %>
Very in content
<% end %>
<div class="content-block tablet-inset">
</div>