Advertisement
Omegad

Untitled

Feb 7th, 2019
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.10 KB | None | 0 0
  1. <hr class="my-7">
  2. <% if current_user.courses %>
  3. <!-- Title -->
  4. <div class="user-post-profil card-deck d-block d-sm-flex card-sm-gutters-3 mb-sm-7">
  5. <div id="reviews" class="mb-3">
  6. <h3 class="h4 mb-0">Cours postés par <%= current_user.username %> <span class="text-muted font-size-1"><%= @user_courses.count %></span></h3>
  7. </div>
  8. <!-- End Title -->
  9. <% for course in @first_user_course %>
  10. <div class="user-post-profil mb-3 mb-md-0">
  11. <!-- Blog Card -->
  12. <article class="card d-block border-0 transition-3d-hover mt-1">
  13. <div class="card-body p-5">
  14. <!-- Header -->
  15. <header class="d-flex justify-content-between align-items-center mb-4">
  16. <a class="btn btn-xs btn-icon btn-soft-danger rounded-circle" href="javascript:;">
  17. <span class="fas fa-arrow-down btn-icon__inner"></span>
  18. </a>
  19. <small class="text-muted">Posté <%= course.created_at.strftime("%B %d, %Y") %></small>
  20. </header>
  21. <!-- End Header -->
  22.  
  23. <!-- Info -->
  24. <div class="mb-4">
  25. <% if course.image %>
  26. <%= cl_image_tag(course.image.path, class: "img-fluid rounded") %>
  27. <% else %>
  28. <img class="img-fluid rounded" src="../../assets/img/500x280/img1.jpg" alt="Image Description">
  29. <% end %>
  30. </div>
  31. <div class="media-body align-self-center">
  32. </h4>
  33. <ul class="list-inline text-warning small mb-0">
  34. <li class="list-inline-item mx-0">
  35. <span class="fas fa-star"></span>
  36. </li>
  37. <li class="list-inline-item mx-0">
  38. <span class="fas fa-star"></span>
  39. </li>
  40. <li class="list-inline-item mx-0">
  41. <span class="fas fa-star"></span>
  42. </li>
  43. <li class="list-inline-item mx-0">
  44. <span class="fas fa-star"></span>
  45. </li>
  46. <li class="list-inline-item mx-0">
  47. <span class="fas fa-star text-warning"></span>
  48. </li>
  49. </ul>
  50. </div>
  51. <h2 class="h5">
  52. <a href="#"><%= course.name %></a>
  53. </h2>
  54. <li class="list-inline-item ml-auto">
  55. <p class="mb-0"><%= course.content.to_s.html_safe %></p>
  56. <a href="#" class="badge badge-primary">HTML</a>
  57. <a href="#" class="badge badge-secondary">CSS</a>
  58. <a href="#" class="badge badge-success">Bootcamp</a>
  59. <a href="#" class="badge badge-danger">AJAX</a>
  60. </li><br>
  61. <li class="list-inline-item ml-auto">
  62. <a class="text-secondary" href="#">
  63. <span class="far fa-comments mr-1"></span>
  64. <%= course.comments.count %> commentaires
  65. </a>
  66. </li>
  67. <!-- End Info -->
  68. </div>
  69.  
  70. <!-- Footer -->
  71. <footer class="card-footer p-5">
  72. <div class="media align-items-center">
  73. <% if course.user.avatar %>
  74. <%= cl_image_tag(course.user.avatar.path, class: 'u-avatar rounded-circle mr-3') %>
  75. <% else %>
  76. <a class="u-sm-avatar position-relative mr-3" href="#">
  77. <img class="img-fluid rounded-circle" src="../../assets/img/100x100/img1.jpg" alt="Image Description">
  78. <span class="badge badge-md badge-outline-primary badge-pos badge-pos--bottom-right rounded-circle">+</span>
  79. </a>
  80. <% end %>
  81. <div class="media-body">
  82. <h3 class="h6 mb-0">
  83. <%= link_to course.user.username, "/profil" %>
  84. </h3>
  85. <small class="d-block">Auteur</small>
  86. </div>
  87. </div>
  88. </footer>
  89. <!-- End Footer -->
  90. </article>
  91. <!-- End Blog Card -->
  92. </div>
  93. <% end %>
  94. <%= paginate @first_user_course %>
  95. </div>
  96. <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement