Skip to content

Instantly share code, notes, and snippets.

@Arcolye
Last active January 26, 2017 21:43
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 Arcolye/7b94b96286c9053605ee7b5bba6538b2 to your computer and use it in GitHub Desktop.
Save Arcolye/7b94b96286c9053605ee7b5bba6538b2 to your computer and use it in GitHub Desktop.
A Ruby on Rails view. Bootstrap is used semantically, with Bootstrap classes included only in the .scss
<%= pgtitle @lesson %>
<%= description @lesson.meta_description.presence || @lesson.description.presence %>
<div class="lesson">
<%= section class: "lesson-header" do %>
<div class="lesson-icon-wrapper">
<div class="lesson-icon">
<%= image_tag @lesson.icon %>
</div>
</div>
<div class="lesson-title">
<h1><%= @lesson %></h1>
</div>
<% end %>
<%= section class: "lesson-video" do %>
<%= render "video", video: @lesson.video unless @lesson.video.blank? %>
<% end %>
<%= section class: "lesson-questions" do %>
<div class="lesson-questions-container">
<% if user_signed_in? %>
<%= render "workbook_downloads" %>
<%= render "questions" if @lesson.questions.any? %>
<% else %>
<div id="lesson-slides-container">
<h3 style="text-align: center;">Join Edify to experience this lesson!</h3>
<div class="row">
<%= render "devise/registrations/registration_form", resource: User.new, resource_name: "user" %>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment