Skip to content

Instantly share code, notes, and snippets.

@ahukkanen
Created August 22, 2018 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahukkanen/17c6c8aebde176cfa8b8805f349dfdf0 to your computer and use it in GitHub Desktop.
Save ahukkanen/17c6c8aebde176cfa8b8805f349dfdf0 to your computer and use it in GitHub Desktop.
Example of extracting the UI framework specific markup to components
<%
cls = "button"
cls += " expanded" if is_expanded
%>
<button type="<%=type %>" class="<%= cls %>">
<%= yield %>
</button>
<%= render partial: 'components/grid/row' do %>
<div class="columns mediumlarge-4 large-3">
<%= yield :sidebar %>
</div>
<div class="columns mediumlarge-8 large-9">
<%= yield %>
</div>
<% end %>
<%= render partial: 'components/grid/row' do %>
<div class="columns section view-side mediumlarge-4 mediumlarge-push-8 large-3 large-push-9">
<%= yield :sidebar %>
</div>
<div class="columns mediumlarge-8 mediumlarge-pull-4">
<%= yield %>
</div>
<% end %>
<div class="row">
<%= yield %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment