Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <hr class="my-7">
- <% if current_user.courses %>
- <!-- Title -->
- <div class="user-post-profil card-deck d-block d-sm-flex card-sm-gutters-3 mb-sm-7">
- <div id="reviews" class="mb-3">
- <h3 class="h4 mb-0">Cours postés par <%= current_user.username %> <span class="text-muted font-size-1"><%= @user_courses.count %></span></h3>
- </div>
- <!-- End Title -->
- <% for course in @first_user_course %>
- <div class="user-post-profil mb-3 mb-md-0">
- <!-- Blog Card -->
- <article class="card d-block border-0 transition-3d-hover mt-1">
- <div class="card-body p-5">
- <!-- Header -->
- <header class="d-flex justify-content-between align-items-center mb-4">
- <a class="btn btn-xs btn-icon btn-soft-danger rounded-circle" href="javascript:;">
- <span class="fas fa-arrow-down btn-icon__inner"></span>
- </a>
- <small class="text-muted">Posté <%= course.created_at.strftime("%B %d, %Y") %></small>
- </header>
- <!-- End Header -->
- <!-- Info -->
- <div class="mb-4">
- <% if course.image %>
- <%= cl_image_tag(course.image.path, class: "img-fluid rounded") %>
- <% else %>
- <img class="img-fluid rounded" src="../../assets/img/500x280/img1.jpg" alt="Image Description">
- <% end %>
- </div>
- <div class="media-body align-self-center">
- </h4>
- <ul class="list-inline text-warning small mb-0">
- <li class="list-inline-item mx-0">
- <span class="fas fa-star"></span>
- </li>
- <li class="list-inline-item mx-0">
- <span class="fas fa-star"></span>
- </li>
- <li class="list-inline-item mx-0">
- <span class="fas fa-star"></span>
- </li>
- <li class="list-inline-item mx-0">
- <span class="fas fa-star"></span>
- </li>
- <li class="list-inline-item mx-0">
- <span class="fas fa-star text-warning"></span>
- </li>
- </ul>
- </div>
- <h2 class="h5">
- <a href="#"><%= course.name %></a>
- </h2>
- <li class="list-inline-item ml-auto">
- <p class="mb-0"><%= course.content.to_s.html_safe %></p>
- <a href="#" class="badge badge-primary">HTML</a>
- <a href="#" class="badge badge-secondary">CSS</a>
- <a href="#" class="badge badge-success">Bootcamp</a>
- <a href="#" class="badge badge-danger">AJAX</a>
- </li><br>
- <li class="list-inline-item ml-auto">
- <a class="text-secondary" href="#">
- <span class="far fa-comments mr-1"></span>
- <%= course.comments.count %> commentaires
- </a>
- </li>
- <!-- End Info -->
- </div>
- <!-- Footer -->
- <footer class="card-footer p-5">
- <div class="media align-items-center">
- <% if course.user.avatar %>
- <%= cl_image_tag(course.user.avatar.path, class: 'u-avatar rounded-circle mr-3') %>
- <% else %>
- <a class="u-sm-avatar position-relative mr-3" href="#">
- <img class="img-fluid rounded-circle" src="../../assets/img/100x100/img1.jpg" alt="Image Description">
- <span class="badge badge-md badge-outline-primary badge-pos badge-pos--bottom-right rounded-circle">+</span>
- </a>
- <% end %>
- <div class="media-body">
- <h3 class="h6 mb-0">
- <%= link_to course.user.username, "/profil" %>
- </h3>
- <small class="d-block">Auteur</small>
- </div>
- </div>
- </footer>
- <!-- End Footer -->
- </article>
- <!-- End Blog Card -->
- </div>
- <% end %>
- <%= paginate @first_user_course %>
- </div>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement