Sha256: 4b34252ed2e5c44a53adb924ed18b1d4a33cd1a103faa9eb4ef4f3725d935d7d

Contents?: true

Size: 864 Bytes

Versions: 33

Compression:

Stored size: 864 Bytes

Contents

<!-- A proposed HTML 5 tag for representing a generic document or application section. Slightly more semantic than `<div>` for indicating document structure. For the time being, `<section>` is output as `<div class="section">`. In Hobo, `<section>` also has one other important behaviour which is different to using `<div>` directly, when the content of the section is empty, the wrapper tag will disappear. e.g.

    <section>My Section</section> -> <div class="section">My Section</div>
    <section><%# empty %></section> -> (nothing is generated)
-->
<def tag="section" attrs="empty, with-flash-messages">
  <set body="&parameters.default" flash="&with_flash_messages && !scope.flash_rendered"/>
  <div class="section #{'with-flash' if flash}" merge-attrs if="&!body.blank? || empty || flash">
    <flash-messages if="&flash"/>
    <%= body %>
  </div>
</def>

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hobo_rapid-2.2.6 taglibs/html/section.dryml
hobo_rapid-2.2.5 taglibs/html/section.dryml
hobo_rapid-2.2.4 taglibs/html/section.dryml
hobo_rapid-2.2.3 taglibs/html/section.dryml
hobo_rapid-2.2.2 taglibs/html/section.dryml
hobo_rapid-2.2.1 taglibs/html/section.dryml
hobo_rapid-2.2.0 taglibs/html/section.dryml
hobo_rapid-2.1.2 taglibs/html/section.dryml
hobo_rapid-2.1.1 taglibs/html/section.dryml
hobo_rapid-2.1.0 taglibs/html/section.dryml
hobo_rapid-2.1.0.pre4 taglibs/html/section.dryml
hobo_rapid-2.1.0.pre3 taglibs/html/section.dryml
hobo_rapid-2.1.0.pre2 taglibs/html/section.dryml
hobo_rapid-2.1.0.pre1 taglibs/html/section.dryml
hobo_rapid-2.0.1 taglibs/html/section.dryml
hobo_rapid-2.0.0 taglibs/html/section.dryml
hobo_rapid-2.0.0.pre10 taglibs/html/section.dryml
hobo_rapid-2.0.0.pre9 taglibs/html/section.dryml
hobo_rapid-2.0.0.pre8 taglibs/html/section.dryml
hobo_rapid-2.0.0.pre7 taglibs/html/section.dryml