summaryrefslogtreecommitdiff
path: root/app/views/profiles/show.html.erb
blob: 8519f38dbe0270a07f6f9c97e6402c9489d09353 (plain)
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
<% provide(:title, @user.name) -%>
<% provide(:search_path, profiles_path) %>
<div class="row">
  <div class="col-3">
    <%= avatar_for(@user, clazz: 'img-thumbnail') %>
  </div>
  <div class="col-9">
    <h1><%= @user.name %> <small>A member since <%= @user.created_at.to_s :foomat %>, with <%= @user.creations.length %> creations.</small> </h1>
    <h5><%= @user.city %></h5>
    <hr>
    <% unless @user.website.blank? %>
      <p><a href="<%= @user.website %>" target="_blank">Website</a></p>
    <% end %>
    <% unless @user.twitter.blank? %>
      <p><a href="https://twitter.com/<%= @user.twitter %>" target="_blank" class="twitter-follow-button" data-show-count="false">Follow @<%= @user.twitter %></a></p>
      <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
    <% end %>
    <% if @user.facebook.present? %>
      <p><a href="<%= @user.facebook %>" target="_blank"><%= image_tag "f_logo_16x16x32.png", :alt => "Like us on Facebook" %> Like on Facebook</a></p>
    <% end %>
  </div>
</div>
<hr />
<div class="card-columns">
  <% @creations.each do |creation| %>
    <div class="card">
      <%= link_to cake_path(creation) do %>
        <%= image_tag creation.primary_image.url_for(:thumb), class: 'card-img-top' %>
      <% end %>
    </div>
  <% end %>
</div>