Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change OCW News mobile(xs) display to horizontal #1184

Merged
merged 5 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions base-theme/assets/css/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ $panel-course-info-text-color: #464646;
// OCW news in homepage
$featured-news-heading-font-lg: 1.875rem;
$featured-news-line-height-lg: 2.325rem;
$featured-news-heading-font-sm: 1.25rem;
$featured-news-line-height-sm: 1.56rem;
$featured-news-heading-font-md: 1.4rem;
$featured-news-line-height-md: 1.8rem;
$featured-news-heading-font-sm: 1.25rem;
$featured-news-line-height-sm: 1.56rem;
$featured-news-heading-font-xs: 1rem;
$featured-news-line-height-xs: 1.3rem;
$featured-news-font-weight-xs: 400;
$featured-news-date-font: 0.875rem;
$featured-news-date-line-height: 1rem;
$news-card-content-color: rgba(255, 255, 255, 0.6);
Expand Down
26 changes: 24 additions & 2 deletions www/assets/css/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,15 @@ $promo-carousel-height: 200px;
}
}

.news-container:not(.mobile) {
height: 500px;
}

.news-container {
font-family: "Arial", sans-serif;
display: flex;
border-radius: 8px;
overflow: hidden;
height: 500px;

@include breakpoint(ipad) {
display: none;
Expand All @@ -544,11 +547,15 @@ $promo-carousel-height: 200px;
width: 100%;
height: 100%;
object-fit: cover;
background-size: cover;

@include breakpoint(ipad) {
height: 500px;
height: 450px;
width: 100%;
}
@include media-breakpoint-down(xs) {
height: 215px;
}
}

.news-overlay {
Expand Down Expand Up @@ -579,11 +586,23 @@ $promo-carousel-height: 200px;
}
}

.featured-news-heading.mobile {
@include media-breakpoint-down(xs) {
font-size: $featured-news-heading-font-xs;
line-height: $featured-news-line-height-xs;
font-weight: $featured-news-font-weight-xs;
}
}

.featured-news-date {
color: $white;
font-size: $featured-news-date-font;
line-height: $featured-news-date-line-height;
padding-bottom: 7px;

@include media-breakpoint-down(xs) {
padding-bottom: 5px;
}
}

.featured-news-content {
Expand All @@ -603,6 +622,9 @@ $promo-carousel-height: 200px;
@include breakpoint(ipad) {
padding: 20px;
}
@include media-breakpoint-down(xs) {
padding: 10px 15px;
}
}
}
.news-card:hover {
Expand Down