1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<% provide(:description, "CakeSide is a free site to share your cake creations and ideas with other cake fanatics like yourself") -%>
<% provide(:search_path, request.env['PATH_INFO'] || cakes_path) %>
<% provide(:container_class, 'container') %>
<% unless user_signed_in? -%>
<div class="row">
<div class="col">
<%= image_tag "cakeside-logo.png", :alt => "Welcome to Cakeside", style: 'max-height:186px' %>
</div>
<div class="col">
<h1>Welcome cake enthusiast!</h1>
<p style="font-size:15px;">
<strong>Make</strong> cakes, <strong>sell</strong> cakes, or just <strong>love</strong> eating them? You've come to the right place!
<strong>CakeSide</strong> is a free site to <strong>share</strong> your cake <strong>creations</strong> and <strong>ideas</strong> with other cake fanatics like yourself!</p><br/>
<p style="text-align: center;">
Get your cakes featured on this page <%= link_to "Sign Up For Free!", login_path, class: "btn btn-primary btn-large" %> or <%= link_to "sign in", new_session_path %>
</p>
</div>
</div>
<% end -%>
<div id="bakery">
<div class="dropdown float-right">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Sort
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<%= link_to "Newest", url_for(params.merge(sort: "newest")), class: "dropdown-item" %>
<%= link_to "Oldest", url_for(params.merge(sort: "oldest")), class: "dropdown-item" %>
</div>
</div>
<ul class="nav nav-tabs">
<li class="nav-item">
<%= link_to "All", url_for(params.merge(category: nil)), class: "nav-link #{"active" if params["category"].blank?}" %>
</li>
<% @categories.each do |category| %>
<li class="nav-item ">
<%= link_to category.name.pluralize, url_for(params.merge(category: category.slug)), class: "nav-link #{"active" if params["category"] == category.slug}" %>
</li>
<% end %>
</ul>
<%= render partial: 'index' %>
</div>
<%# render "shared/paging", items: @cakes %>
|