| 1 | <% content_for :meta_head do %> |
| 2 | <title><%= @meta_title %></title> |
| 3 | <meta name="description" content="<%= @meta_description %>"> |
| 4 | <meta property="og:title" content="<%= @meta_title %>" /> |
| 5 | <meta property="og:description" content="<%= @meta_description %>" /> |
| 6 | <meta property="og:url" content="<%= community_url %>" /> |
| 7 | <% end %> |
| 8 | <% content_for :breadcrumb do %> |
| 9 | <script type="application/ld+json"> |
| 10 | { |
| 11 | "@context": "http://schema.org", |
| 12 | "@type": "BreadcrumbList", |
| 13 | "itemListElement": [{ |
| 14 | "@type": "ListItem", |
| 15 | "position": 1, |
| 16 | "item": { |
| 17 | "@id": "<%= root_url %>", |
| 18 | "name": "<%= t("site_name") %>" |
| 19 | } |
| 20 | },{ |
| 21 | "@type": "ListItem", |
| 22 | "position": 2, |
| 23 | "item": { |
| 24 | "@id": "<%= users_url %>", |
| 25 | "name": "<%= t("our_community") %>" |
| 26 | } |
| 27 | }] |
| 28 | } |
| 29 | </script> |
| 30 | <% end %> |
| 31 | <main> |
| 32 | <div class="row g-5"> |
| 33 | <div class="col-md-12"> |
| 34 | <h1><%= @page_title %></h1> |
| 35 | </div> |
| 36 | </div> |
| 37 | <div class="row g-5"> |
| 38 | <div class="col-sm-3"> |
| 39 | <div class="position-sticky" style="top: 1rem;"> |
| 40 | <h2 class="mb-3 mt-3">Songs</h2> |
| 41 | <span class="badge bg-warning rounded-pill text-dark"><%= Song.all.size %></span> |
| 42 | <i class="bi bi-graph-up-arrow"></i> |
| 43 | <h2 class="mb-3 mt-3">Lyrics</h2> |
| 44 | <span class="badge bg-warning rounded-pill text-dark"><%= Lyric.all.size %></span> |
| 45 | <i class="bi bi-graph-up-arrow"></i> |
| 46 | <h2 class="mb-3 mt-3">Chords</h2> |
| 47 | <span class="badge bg-warning rounded-pill text-dark"><%= Chord.all.size %></span> |
| 48 | <i class="bi bi-graph-up-arrow"></i> |
| 49 | <h2 class="mb-3 mt-3">Artists</h2> |
| 50 | <span class="badge bg-warning rounded-pill text-dark"><%= Artist.all.size %></span> |
| 51 | <i class="bi bi-graph-up-arrow"></i> |
| 52 | <h2 class="mb-3 mt-3">Albums</h2> |
| 53 | <span class="badge bg-warning rounded-pill text-dark"><%= Album.all.size %></span> |
| 54 | <i class="bi bi-graph-up-arrow"></i> |
| 55 | </div> |
| 56 | </div> |
| 57 | <div class="col-sm-9"> |
| 58 | <% @users.each_with_index do |user, index| %> |
| 59 | <% if (index == 0 || index % 3 == 0) %> |
| 60 | <!-- 3 items per row --> |
| 61 | <!-- Begin new row --> |
| 62 | <div class="row mb-3"> |
| 63 | <% end %> |
| 64 | <div class="col-4"> |
| 65 | <div class="card p-2"> |
| 66 | <%= gravatar_for user %> |
| 67 | <div class="card-body"> |
| 68 | <h5 class="card-title"><%= user.name %></h5> |
| 69 | <ul class="list-unstyled"> |
| 70 | <li> |
| 71 | <%= link_to( |
| 72 | "@#{user.username_or_id}", |
| 73 | profile_path(user.username_or_id), |
| 74 | title: "Author: @#{user.username_or_id}" |
| 75 | ) %> |
| 76 | </li> |
| 77 | </ul> |
| 78 | </div> |
| 79 | </div> |
| 80 | </div> |
| 81 | <% if (index == @users.size - 1 || (index != 0 && (index + 1) % 3 == 0)) %> |
| 82 | <!-- End row --> |
| 83 | </div> |
| 84 | <% end %> |
| 85 | <% end %> |
| 86 | <%= will_paginate(@users, class: 'flickr_pagination') %> |
| 87 | </div> |
| 88 | </div> |
| 89 | <%= render "shared/partial_breadcrumbs" do %> |
| 90 | <li class="breadcrumb-item"><%= link_to t("our_community"), users_path %></li> |
| 91 | <% end %> |
| 92 | </main> |