Skip to content

Commit

Permalink
Catalog Page: Mobile view changes
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav committed Oct 19, 2023
1 parent 24a91a2 commit f973208
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
25 changes: 24 additions & 1 deletion frontend/public/scss/catalog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
width: 305px;
position: sticky;
}

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

/* Dropshadow */
box-shadow: 0px 2px 3px 0px rgba(18, 38, 49, 0.15);
Expand Down Expand Up @@ -87,7 +91,7 @@
top: 0;

@include media-breakpoint-down(sm) {
padding: 20px 0px;
padding: 10px 0px;
}
h2 {
overflow: hidden;
Expand All @@ -104,6 +108,16 @@
flex-direction: column;
justify-content: center;
margin-bottom: 0;

@include media-breakpoint-down(sm) {
font-size: 20px;
}

small {
font-size: 12px;
font-weight: 300;
font-family: Inter;
}
}

#mobile-catalog-title {
Expand All @@ -113,6 +127,8 @@
position: absolute;
left: 20px;
background: url("#{$static-path}/images/filter_list_alt.svg") no-repeat;
top: 50%;
margin-top: -12px;
}
}
}
Expand Down Expand Up @@ -203,6 +219,10 @@
height: 70px;
margin-top: 40px;
margin-left: 24px;

@include media-breakpoint-down(md) {
margin-top: 10px;
}

.catalog-page-item-count {
color: var(--blue-dark, #03152D);
Expand Down Expand Up @@ -330,6 +350,9 @@
margin-left: 24px;
gap: 24px;
margin-bottom: 24px;
@include media-breakpoint-down(sm) {
justify-content: center;
}

a {
text-decoration: none;
Expand Down
10 changes: 9 additions & 1 deletion frontend/public/src/containers/pages/CatalogPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export class CatalogPage extends React.Component<Props> {
this.state.allProgramsRetrieved
)
})
this.toggleMobileFilterWindowExpanded(false)
}

/**
Expand Down Expand Up @@ -557,7 +558,14 @@ export class CatalogPage extends React.Component<Props> {
)
}
/>
<h2>Catalog</h2>
<h2>
Catalog
<small>
{this.state.selectedDepartment === ALL_DEPARTMENTS
? ""
: this.state.selectedDepartment}
</small>
</h2>
</div>
</div>
<div className="container">
Expand Down

0 comments on commit f973208

Please sign in to comment.