Skip to content

Commit

Permalink
4545 mitx online program drawercourse upgrade formatting (#2256)
Browse files Browse the repository at this point in the history
* fix

* fix

* Code review comments

* Update for medium screens

* commit

* commit

* hold

* commit

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* changes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
collinpreston and pre-commit-ci[bot] authored Jun 28, 2024
1 parent 75c7b16 commit 56734ea
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 30 deletions.
2 changes: 1 addition & 1 deletion frontend/public/scss/cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ div.std-page-header {
}

div.std-page-header + div.std-page-body {
padding-top: 40px !important;
padding-top: 40px;
}

div.std-card {
Expand Down
84 changes: 60 additions & 24 deletions frontend/public/scss/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,23 @@ $enrolled-passed-fg: #ffffff;
div.row {
margin: 0 !important;
padding: 20px;
height: 100%;
}

@include media-breakpoint-down(sm) {
div.row.enrolled-item-info {
padding: 0 !important;

div.enrollment-details-container {
padding: 16px !important;
}
}
}

@include media-breakpoint-up(md) {
.row {
height: auto;

> * {
height: 100%;
}
padding: 15px;
}
}

.img-container {
@include media-breakpoint-down(sm) {
width: 100%;
height: $featureImgMobileHeight;
border-radius: 0;

img {
border-radius: 5px 5px 0px 0px;
}
}

width: $featureImgWidth;
Expand All @@ -117,16 +107,33 @@ $enrolled-passed-fg: #ffffff;
}
}

.detail {
color: $gray;
.course-card-text-details {

strong {
color: $primary;
@include media-breakpoint-down(sm) {
padding: 15px 0px 15px 0px;
gap: 15px;

h2 {
margin: 0;
}
}

.detail {
color: $gray;

strong {
color: $primary;
}
}
}

div.row.certificate-row {
padding: 0;

@include media-breakpoint-down(sm) {
gap: 20px;
border: 1px 0px 0px 0px;
}
}
}

Expand Down Expand Up @@ -192,18 +199,25 @@ $enrolled-passed-fg: #ffffff;

.upgrade-item-description {
width: 100%;
flex-direction: row;
padding: 25px 30px ;
flex-direction: row !important;
padding: 25px 30px;
border-top: $home-page-border-grey;
background: $home-page-grey-lite;

@include media-breakpoint-down(sm) {
padding: 20px 15px;
}

div.certificate-upgrade-message {
width: 80%;
height: 30px;

font-size: 16px;
line-height: 30px;

@include media-breakpoint-down(md) {
height: auto;
width: auto;
}

strong {
color: $brand-darker-bg;
}
Expand All @@ -213,6 +227,10 @@ $enrolled-passed-fg: #ffffff;
.enrollment-extra-links {
margin-top: 20px;

@include media-breakpoint-down(sm) {
margin-top: 15px;
}

a {
text-decoration: underline;
margin: auto 0;
Expand Down Expand Up @@ -255,6 +273,10 @@ $enrolled-passed-fg: #ffffff;

.get-cert-button-container button, .finaid-link-container {
font-size: 14px !important;

@include media-breakpoint-down(sm) {
width: 100%;
}
}

.finaid-link-container {
Expand All @@ -270,6 +292,9 @@ $enrolled-passed-fg: #ffffff;

.dashboard {
font-family: "Inter", sans-serif;
@include media-breakpoint-down(md) {
padding-top: 0 !important;
}
}

.dashboard .tabs {
Expand All @@ -279,6 +304,8 @@ $enrolled-passed-fg: #ffffff;

@include media-breakpoint-down(md) {
margin-bottom: 30px;
gap: 0px;
justify-content: space-between;
}
}

Expand All @@ -292,6 +319,15 @@ $enrolled-passed-fg: #ffffff;

@include media-breakpoint-down(sm) {
margin-right: 1em;
padding: 20px 10px 20px 10px;
gap: 0px;
font-family: Inter;
font-size: 16px;
font-weight: 700;
line-height: 19.36px;
text-align: left;
width: 100%;
text-align: center;
}
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/public/src/components/CartItemCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class CartItemCard extends React.Component<Props> {
<div className="img-container">{courseImage}</div>
</div>

<div className="col-12 col-md enrollment-details-container">
<div className="col-12 col-md">
<h2 className="">{title}</h2>
<div className="detail">
{readableId}
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/src/components/EnrolledItemCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ export class EnrolledItemCard extends React.Component<
</div>
)}

<div className="col-12 col-md enrollment-details-container">
<div className="col-12 col-md course-card-text-details d-grid">
<div className="d-flex justify-content-between align-content-start flex-nowrap w-100">
<div className="d-flex flex-column">
<div className="align-content-start d-flex enrollment-mode-container flex-wrap pb-1">
Expand Down Expand Up @@ -626,7 +626,7 @@ export class EnrolledItemCard extends React.Component<
</div>
</div>

<div className="col-12 col-md enrollment-details-container">
<div className="col-12 col-md">
<div className="d-flex justify-content-between align-content-start flex-nowrap w-100 enrollment-mode-container">
<div className="d-flex flex-column">
<div className="align-content-start d-flex enrollment-mode-container flex-wrap pb-1">
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/src/containers/pages/DashboardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ export class DashboardPage extends React.Component<
<div role="banner" className="std-page-header">
<h1>{DASHBOARD_PAGE_TITLE}</h1>
</div>
<div className="std-page-body dashboard container">
<div className="dashboard std-page-body container">
<Loader isLoading={isLoading}>
<nav className="tabs" aria-controls="enrollment-items">
<nav className="tabs d-flex" aria-controls="enrollment-items">
{programEnrollmentsLength === 0 ? (
<>
<button
Expand Down

0 comments on commit 56734ea

Please sign in to comment.