Sha256: 6345e040ecd1e2156ff5b49356dc7fe7803e9cfc27e328575432049ab9b0ca2a
Contents?: true
Size: 1.39 KB
Versions: 4
Compression:
Stored size: 1.39 KB
Contents
<% warn "[DEPRECATION] `headmin/card` is deprecated. Please use plain Bootstrap markup." %> <% # DEPRECATED in 0.3 # headmin/card # # ==== Options # * +title</tt> - Title for card # * +description</tt> - Description for card # * +id</tt> - HTML Id Attribute # * +padded</tt> - Set to true if you want to render the block content inside the card-body element # # ==== Examples # Basic version. # <%= render 'headmin/card' do %#> # Your content # <% end %#> # # Title and description # <%= render 'headmin/card', title: 'Title', description: 'Description' do %#> # Your content # <% end %#> id = local_assigns.has_key?(:id) ? id : nil title = local_assigns.has_key?(:title) ? title : nil description = local_assigns.has_key?(:description) ? description : nil padded = local_assigns.has_key?(:padded) ? padded : true %> <div class="card mb-3 shadow-sm" id="<%= id %>"> <% if padded || title || description %> <div class="card-body"> <% if title.present? %> <h5 class="card-title"><%= title %></h5> <% end %> <% if description.present? %> <p class="card-text text-secondary"><%= description %></p> <% end %> <!-- Render inside body--> <% if padded %> <%= yield %> <% end %> </div> <% end %> <!-- Render outside body--> <% unless padded %> <%= yield %> <% end %> </div>
Version data entries
4 entries across 4 versions & 1 rubygems