Skip to content

Instantly share code, notes, and snippets.

@derekblank
Created January 14, 2015 03:56
Show Gist options
  • Save derekblank/a1ac3130382968dff4b4 to your computer and use it in GitHub Desktop.
Save derekblank/a1ac3130382968dff4b4 to your computer and use it in GitHub Desktop.
Painless syntax highlighting in Rails
<% modal_markup = capture do %>
<div class="modal">
<label for="modal-1">
<div class="btn js-btn">Open Modal</div>
</label>
<input class="modal-state" id="modal-1" type="checkbox" />
<div class="modal-window">
<div class="modal-inner">
<label class="modal-close" for="modal-1"></label>
<h1>Sign In</h1>
<form>
<fieldset>
<p><label for="email">Email</label> <input type="email" id="email" name="email"></p>
<p><label for="password">Password</label> <input type="password" id="password" name="password"><span><a href="#">Forgot Password?</a></span></p>
<p><button class"button outline">Sign In</button></p>
</fieldset>
</form>
</div>
</div>
</div>
<% end %>
<article class="styleguide-section">
<a name="modals"></a>
<h2 class="subheading">Modals</h2>
<p>Use the modal for displaying non-important information. Use lightly.</p>
<%= modal_markup %>
<pre class="prettyprint lang-html"><%= escape_once modal_markup %></pre>
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment