crowdAI/crowdai

View on GitHub
app/views/landing_page/index.html.erb

Summary

Maintainability
Test Coverage
<div class="content">
  <div class="row">
    <h1>Crowdsourcing AI<br/> to solve real-world problems</h1>
    <p class="large">crowdAI enables data science experts and enthusiasts to collaboratively solve real-world problems, through challenges.</p>
  </div>

  <div class="row button-group">
    <% if current_participant %>
      <%= link_to "Host a Challenge",
            landing_page_host_path,
            class: 'btn btn-primary btn-large' %>
    <% else %>
      <%= link_to "Sign up",
            new_participant_registration_path,
            class: "btn btn-primary btn-large" %>
      <%= link_to "Host a Challenge",
            landing_page_host_path,
            class: 'btn btn-secondary btn-large' %>
    <% end %>
  </div>

  <% if @partners.present? %>
    <div class="row">
      <div class="section-header">
        <h6>Some of our users</h6>
        <%#= link_to 'See all', '#', class: 'btn btn-secondary' %>
      </div>

      <div class="grid-users">
        <% @partners.each_with_index do |partner,index| %>
          <%= image_tag partner.image_file.url, class: users_group(index) %>
        <% end %>
      </div>
    </div>
  <% end %>

  <% if @blog_posts.present? %>
    <div class="row">
      <div class="section-header">
        <h6>Blog</h6>
        <%= link_to 'See all', blogs_path, class: 'btn btn-secondary' %>
      </div>

      <div class="grid-blog-previews">
        <% @blog_posts.each do |post| %>
          <%= render partial: 'blog_post', locals: { post: post } %>
        <% end %>
      </div>
    </div>
  <% end %>

  <div class="row">
    <div class="section-header">
      <h6>Featured Challenges</h6>
      <%= link_to 'See all',
            challenges_path,
            class: "btn btn-secondary" %>
    </div>

    <ul class="list-challenges">
      <%= concept(Challenge::Cell::ListDetail, collection: @challenges, current_participant: current_participant) %>
    </ul>
  </div>
</div>