From be48fe4d0e734bcb8c1043b592a88aafab611c44 Mon Sep 17 00:00:00 2001 From: joanna ge <45646252+jlge@users.noreply.github.com> Date: Sun, 22 Sep 2024 12:42:22 -0400 Subject: [PATCH] Assessment display changes (#2205) * Display two cards per row max * make category headers smaller * change responsive screen in course index --- app/models/assessment.rb | 2 +- app/views/assessments/index.html.erb | 12 +++++++----- app/views/courses/index.html.erb | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/models/assessment.rb b/app/models/assessment.rb index 32dc35e3f..472d804ff 100755 --- a/app/models/assessment.rb +++ b/app/models/assessment.rb @@ -461,7 +461,7 @@ def source_config_file_backup_path end def date_to_s(date) - date.strftime("%b %e at %l:%M%P") + date.strftime("%a, %b %e at %l:%M%P") end def load_dir_to_tar(dir_path, asmt_dir, tar, filters = [], export_dir = "") diff --git a/app/views/assessments/index.html.erb b/app/views/assessments/index.html.erb index 3599addab..775cc3db8 100644 --- a/app/views/assessments/index.html.erb +++ b/app/views/assessments/index.html.erb @@ -11,9 +11,7 @@ function addClearFix() { let num_columns; const cards = document.querySelectorAll('.assessments'); - if (window.innerWidth >= 1200) { - num_columns = 3; - } else if (window.innerWidth >= 992) { + if (window.innerWidth >= 992) { num_columns = 2; } else { num_columns = 1; @@ -74,6 +72,10 @@ .collection-item { overflow: auto; } + + .card-content.category-card { + padding: 15px 24px; + } <%= stylesheet_link_tag "assessments" %> <%= stylesheet_link_tag "assessment_date" %> @@ -144,9 +146,9 @@ <% @course.assessment_categories.each do |cat| %> <% asmts = @course.assessments_with_category(cat, @cud.student?) %> <% if asmts.any? %> -