From 520a2aa56621cacbfd469eb0f15b0375ef89a3ed Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 15 Apr 2022 16:46:30 -0700 Subject: [PATCH] add empty state styling for content#index --- app/views/content/index.html.erb | 58 ++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/app/views/content/index.html.erb b/app/views/content/index.html.erb index 858c68e2..e8425c30 100644 --- a/app/views/content/index.html.erb +++ b/app/views/content/index.html.erb @@ -324,25 +324,49 @@ <%# render partial: 'content/components/list_filter_bar', locals: { content_type: @content_type_class } %> <%# to be made into new card list partial? %> -
- <% @content.each do |content| %> -
- <%= link_to content.view_path do %> -
- <%= image_tag content.random_image_including_private(format: :small), class: 'h-64 rounded-t w-full object-cover object-center mb-6' %> -
- star_outline -

- <%= content.page_type %> -

-

- <%= content.name %> -

+<% if @content.any? %> +
+ <% @content.each do |content| %> +
+ <%= link_to content.view_path do %> +
+ <%= image_tag content.random_image_including_private(format: :small), class: 'h-64 rounded-t w-full object-cover object-center mb-6' %> +
+ star_outline +

+ <%= content.page_type %> +

+

+ <%= content.name %> +

+
+ <% end %> +
+ <% end %> +
+<% end %> + +<% if @content.empty? %> +
+
+
- <% end %> -
+
+ +
+
+<% end %> <%= render partial: 'javascripts/content_linking' %> \ No newline at end of file