index.html.erb 974 B

12345678910111213141516171819202122232425262728
  1. <h1>What's New</h1>
  2. <div class="card">
  3. <div class="card-body">
  4. <% @announcements.each_with_index do |announcement, index| %>
  5. <% if index != 0 %>
  6. <div class="row"><div class="col"><hr /></div></div>
  7. <% end %>
  8. <div class="row announcement" id="<%= dom_id(announcement) %>">
  9. <div class="col-sm-1 text-center">
  10. <%= link_to announcements_path(anchor: dom_id(announcement)) do %>
  11. <strong><%= announcement.published_at.strftime("%b %d") %></strong>
  12. <% end %>
  13. </div>
  14. <div class="col">
  15. <strong class="<%= announcement_class(announcement.announcement_type) %>"><%= announcement.announcement_type.titleize %>:</strong>
  16. <strong><%= announcement.name %></strong>
  17. <%= simple_format announcement.description %>
  18. </div>
  19. </div>
  20. <% end %>
  21. <% if @announcements.empty? %>
  22. <div>Exciting stuff coming very soon!</div>
  23. <% end %>
  24. </div>
  25. </div>