Skip to content

Commit

Permalink
Merge pull request #569 from tyreer/responsive-columns
Browse files Browse the repository at this point in the history
Add responsive columns to developer champion and podcast pages
  • Loading branch information
jerelmiller authored Aug 10, 2020
2 parents 6614381 + 2f5cc23 commit 1e302b3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
15 changes: 15 additions & 0 deletions src/pages/developer-champion.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
display: grid;
grid-template-columns: repeat(2, calc(50% - 1rem));
grid-gap: 2rem;

@media (max-width: 760px) {
grid-template-columns: 1fr
}
}

.img {
Expand All @@ -18,10 +22,21 @@
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 2rem;

@media (max-width: 760px) {
display: block;
text-align: center;
}
}

.point {
text-align: center;
max-width: 400px;
margin: auto;

@media (max-width: 760px) {
margin-bottom: 40px;
}
}

.pointIcon {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/podcasts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const PodcastsPage = () => {
<PageLayout.Header title="New Relic Podcasts" />
<PageLayout.Content>
<section className={cx(styles.section, styles.twoColumn)}>
<div>
<div className={styles.bodyText}>
<p>
Sometimes we talk on the internet about some things. You
probably listen to some things on the internet sometimes. We're
Expand Down
18 changes: 17 additions & 1 deletion src/pages/podcasts.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,28 @@

.twoColumn {
display: grid;
grid-template-columns: repeat(2, calc(50% - 1rem));
grid-gap: 2rem;
grid-template-columns: repeat(2, calc(50% - 1rem));

@media (max-width: 760px) {
grid-template-columns: 1fr
}
}

.bodyText {
@media (max-width: 760px) {
order: 1;
}
}

.img {
width: 100%;
max-width: 350px;
margin: 0 auto;

@media (max-width: 760px) {
order: 0;
}
}

.player iframe {
Expand Down

0 comments on commit 1e302b3

Please sign in to comment.