From ffd196ca2f4c833cd75f6ba089458b76b80685d0 Mon Sep 17 00:00:00 2001 From: JJ <34042537+jhan217@users.noreply.github.com> Date: Thu, 8 Apr 2021 10:41:33 -0400 Subject: [PATCH] refactor: move social media icons on course dashboard for mobile [REV-2128] (#27107) Move the social media icons around the course dashboard; particularly for the mobile view. --- lms/static/sass/multicourse/_dashboard.scss | 69 +++- .../dashboard/_dashboard_course_listing.html | 371 +++++++++--------- 2 files changed, 246 insertions(+), 194 deletions(-) diff --git a/lms/static/sass/multicourse/_dashboard.scss b/lms/static/sass/multicourse/_dashboard.scss index 7eb5384443..7d2161d196 100644 --- a/lms/static/sass/multicourse/_dashboard.scss +++ b/lms/static/sass/multicourse/_dashboard.scss @@ -64,10 +64,11 @@ .details { @include clearfix(); + @include padding-right($baseline); .wrapper-course-image { @include float(left); - @include margin-right(flex-gutter()); + @include margin-right($baseline); width: flex-grid(3); max-height: 150px; @@ -83,6 +84,7 @@ .course-image { width: 100%; + padding: 2px; } } @@ -128,7 +130,7 @@ .wrapper-course-details { display: flex; - flex-flow: row wrap; + flex-flow: column wrap; padding: 0; margin-bottom: $baseline/2; justify-content: space-between; @@ -156,6 +158,10 @@ } .course-info { + flex-grow: 1; + flex-shrink: 0; + min-width: 15em; + [class*="info-"] { font: -apple-system-short-subheadline !important; color: $gray-d1; @@ -196,20 +202,36 @@ } } - .wrapper-course-actions { - @include margin-right($baseline); + .wrapper-course-info-actions { + display: flex; - margin-top: $baseline; - align-self: flex-end; + .wrapper-course-info-row { + width: 100%; + display: inline-flex; + flex-wrap: wrap; + + .course-info { + flex-shrink: 0; + min-width: 10em; + } + + .wrapper-course-actions { + margin-top: $baseline; + + flex-grow: 1; + flex-shrink: 0; + } + } + + .continue-button { + flex-shrink: 0; + flex-grow: 1; + align-self: flex-end; + } } - // Responsive behavior @include media-breakpoint-down(sm) { - width: 100%; - display: flex; - flex-direction: column; - .course-info, .wrapper-course-actions { flex-grow: 1; @@ -223,6 +245,30 @@ } } } + + @include media-breakpoint-down(xs) { + margin-bottom: $baseline; + @include padding-left($baseline/2); + + .wrapper-course-info-actions { + flex-wrap: wrap; + flex-flow: row wrap; + + .wrapper-course-info-row { + .wrapper-course-actions { + margin-top: 0px; + } + } + } + + .continue-button { + .enter-course { + flex: 2 100%; + width: 100%; + margin-top: $baseline; + } + } + } } .course-actions { @@ -414,6 +460,7 @@ @extend %btn-pl-white-base; @include float(right); + margin-top: $baseline; &.archived { @extend %btn-pl-default-base; diff --git a/lms/templates/dashboard/_dashboard_course_listing.html b/lms/templates/dashboard/_dashboard_course_listing.html index 897f9fbbdb..6e97c65616 100644 --- a/lms/templates/dashboard/_dashboard_course_listing.html +++ b/lms/templates/dashboard/_dashboard_course_listing.html @@ -107,196 +107,201 @@ from lms.djangoapps.experiments.utils import UPSELL_TRACKING_FLAG ${course_overview.display_name_with_default} % endif -