Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <h1 align="center">Listing all articles</h1>
  2.  
  3. <% @articles.each do |article| %>
  4.  
  5. <div class="row">
  6.  
  7. <div class="col-xs-8 col-xs-offset-2">
  8.  
  9. <div class="well well-lg">
  10.  
  11. <div class="article-title">
  12.  
  13. <%= link_to article.title, article_path(article) %>
  14.  
  15. </div>
  16.  
  17. <div class="article-body">
  18.  
  19. <%= truncate(article.description, length: 100) %>
  20.  
  21. </div>
  22.  
  23. <div class="article-actions">
  24.  
  25. <%= link_to "Edit this article", edit_article_path(article), class: "btn btn-xs btn-primary" %>
  26.  
  27. <%= link_to "Delete this article", article_path(article), method: :delete,
  28.  
  29. data: { confirm: "Are you sure you want to delete the article?"},
  30.  
  31. class: "btn btn-xs btn-danger" %>
  32.  
  33. </div>
  34.  
  35. </div>
  36.  
  37. </div>
  38.  
  39. </div>
  40.  
  41. <% end %>
  42.  
  43. Add the following code to the custom.css.scss page:
  44.  
  45. .article-title {
  46.  
  47. font-weight: bold;
  48.  
  49. font-size: 1.5em;
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement