diff --git a/app/assets/stylesheets/dashboard.css.scss b/app/assets/stylesheets/dashboard.css.scss new file mode 100644 index 00000000..45e89e24 --- /dev/null +++ b/app/assets/stylesheets/dashboard.css.scss @@ -0,0 +1,5 @@ +.dashboard-row { + .card-image { + max-height: 200px; + } +} \ No newline at end of file diff --git a/app/models/user.rb b/app/models/user.rb index be8da4c6..13855a74 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -84,7 +84,7 @@ class User < ActiveRecord::Base scenes, groups ].flatten .sort_by(&:updated_at) - .last(5) + .last(7) .reverse end diff --git a/app/views/content/cards/_in_universe_content_list.html.erb b/app/views/content/cards/_in_universe_content_list.html.erb index b84cb98b..6c3801e6 100644 --- a/app/views/content/cards/_in_universe_content_list.html.erb +++ b/app/views/content/cards/_in_universe_content_list.html.erb @@ -60,7 +60,7 @@
<% button_text = content_list.any? ? "Create another #{content_type}" : "Create your first #{content_type}" %> - <%= link_to button_text, new_polymorphic_path(content_type), class: 'btn' if current_user %> + <%= link_to button_text, new_polymorphic_path(content_type), class: "btn #{content_type_class.color}" if current_user %>
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f7814f49..a2728d5e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -35,10 +35,10 @@
-
+
<%= yield %>
-
+
<%= render 'layouts/sidebar' %>
diff --git a/app/views/main/dashboard.html.erb b/app/views/main/dashboard.html.erb index 73ef23f3..f16986cd 100644 --- a/app/views/main/dashboard.html.erb +++ b/app/views/main/dashboard.html.erb @@ -14,47 +14,47 @@ %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :universe, content_list: current_user.universes } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :character, content_list: current_user.characters } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :location, content_list: current_user.locations } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :item, content_list: current_user.items } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :creature, content_list: current_user.creatures } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :race, content_list: current_user.races } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :religion, content_list: current_user.religions } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :group, content_list: current_user.groups } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :magic, content_list: current_user.magics } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :language, content_list: current_user.languages } %>
-
"> +
"> <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :scene, content_list: current_user.scenes } %>