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

feat:implement responsive learn-more section #34

Merged
merged 3 commits into from
Jul 4, 2020
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
8 changes: 8 additions & 0 deletions blocks/additional-info/__link/additional-info__link.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
.additional-info__link {
font-size: 19px;
line-height: 19px;
font-weight: 500;
}

@media only screen and (max-width: 320px) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have where to write it but, the additional title in 320px screen is 28px and should be 20px.
Also, why in additional info the title block is unique to additional info? why not use content title?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switched

.additional-info__link {
font-size: 14px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should specify font-weight everywhere. font-weight 500 looks different the the normal one.

line-height: 22px;
}
}

@media only screen and (min-width: 769px) and (max-width: 1024px) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the and (max-width: ... ) in my opinion

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know

Expand Down
19 changes: 16 additions & 3 deletions blocks/additional-info/__list-item/additional-info__list-item.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
.additional-info__list-item {
margin-bottom: 20px;
margin-bottom: 16px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add "last-of-type", you have extra margin on the second list item

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

margin bottom should be 18px for 320px

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

display: flex;
justify-content: space-between;
align-items: center;

}

.additional-info__list-item:last-of-type {
margin-bottom: 0;
}

@media only screen and (min-width: 769px) {
@media only screen and (min-width: 425px) and (max-width: 768px) {
.additional-info__list-item {
margin-bottom: 16px;
margin-bottom: 20px;
}
}

@media only screen and (max-width: 424px) {
.additional-info__list-item {
margin-bottom: 18px;
align-items: flex-end;
}
}
13 changes: 8 additions & 5 deletions blocks/additional-info/__list/additional-info__list.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
.additional-info__list {
margin: 49px 0 0 0;
margin: 0;
list-style-type: none;
padding: 0;
}

@media only screen and (min-width: 769px) and (max-width: 1024px) {
@media only screen and (max-width: 320px) {
.additional-info__list {
margin: 40px 0 0 0;
margin: 0;
padding-top:10px;
}
}

@media only screen and (min-width: 1025px) {
@media only screen and (min-width: 769px) and (max-width: 1024px) {
.additional-info__list {
margin: 45px 0 0 0;
margin: 0;
padding-top: 4px;
}
}

19 changes: 0 additions & 19 deletions blocks/additional-info/__subtitle/additional-info__subtitle.css

This file was deleted.

20 changes: 0 additions & 20 deletions blocks/additional-info/__title/additional-info__title.css

This file was deleted.

31 changes: 23 additions & 8 deletions blocks/additional-info/additional-info.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
@import url(./__title/additional-info__title.css);
@import url(./__subtitle/additional-info__subtitle.css);
@import url(./__list/additional-info__list.css);
@import url(./__list-item/additional-info__list-item.css);
@import url(./__link/additional-info__link.css);

.additional-info {
margin: 68px 30px 0;
border-bottom: 1.7px solid #223d46;
padding-bottom: 40px;
padding: 68px 0 40px;
margin: 0 30px;
}

@media only screen and (max-width: 320px) {
.additional-info {
margin: 0 16px 0;
padding: 50px 0 30px;
}
}

@media only screen and (min-width: 769px) and (max-width: 1024px) {
.additional-info {
margin-top: 84px;
padding-bottom: 50px;
padding: 84px 0 50px;
margin: 0 40px;
}
}

@media only screen and (min-width: 1025px) {
.additional-info {
margin-top: 100px;
padding-bottom: 60px;
padding: 100px 0 60px;
max-width: 1200px;
margin: 0 40px;
}
}

@media only screen and (min-width: 1280px) {
.additional-info {
margin: 0 auto;
}
}



40 changes: 35 additions & 5 deletions blocks/arrow-icon/arrow-icon.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,40 @@
.arrow-icon {
font-size: 19px;
width: 34px;
height: 34px;
background: url("./blue-arrow.png") center center no-repeat;
width: 43px;
height: 19px;
background: url("./blue-arrow.png") center right no-repeat;
background-size: 11px 11px;
}

.arrow-icon:hover {
background: url("./yellow-arrow.png") center center no-repeat;
background: url("./yellow-arrow.png") center right no-repeat;
background-size: 11px 11px;
}

@media only screen and (max-width: 320px) {
.arrow-icon {
width: 26px;
height: 22px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arrow is too big compared to the figma design

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

background-size: 8px 8px;
}

.arrow-icon:hover {
width: 26px;
height: 22px;
background-size: 8px 8px;
}
}

@media only screen and (min-width: 1280px) {
.arrow-icon {
width: 61px;
height: 39px;
background-size: 16px 16px;
}

.arrow-icon:hover {
width: 61px;
height: 39px;
background-size: 16px 16px;
}
}

12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,22 +232,22 @@ <h2 class="content-title">hello there</h2>
</p>
</section>
<section class="additional-info">
<h2 class="additional-info__title">We know a lot</h2>
<p class="additional-info__subtitle">If you want to, read this.</p>
<h2 class="content-title">we know a lot</h2>
<p class="content-subtitle">If you want to, read this.</p>

<ul class="additional-info__list">
<li class="additional-info__list-item">
<a
class="link additional-info__link"
href="https://www.ncjrs.gov/pdffiles1/nij/250349.pdf?fbclid=IwAR2nscfCxNjtE6amLFRblq2Zum1RtGViz1pVVUt-MsrcI616YmxOWxz1ILw"
href="https://nrccfi.camden.rutgers.edu/files/nrccfi-fact-sheet-2014.pdf?fbclid=IwAR3CXF7swyM7VQjr7qcnMJ59I0BKTyapSVuHJ5GH9KYWxYv63t4fnZhgYsk"
target="_blank"
>
Children and Families of The Incarcerated Fact Sheet,
<cite>NCJRS, 2017</cite>
</a>
<a
class="link additional-info__link"
href="https://www.ncjrs.gov/pdffiles1/nij/250349.pdf?fbclid=IwAR2nscfCxNjtE6amLFRblq2Zum1RtGViz1pVVUt-MsrcI616YmxOWxz1ILw"
href="https://nrccfi.camden.rutgers.edu/files/nrccfi-fact-sheet-2014.pdf?fbclid=IwAR3CXF7swyM7VQjr7qcnMJ59I0BKTyapSVuHJ5GH9KYWxYv63t4fnZhgYsk"
target="_blank"
>
<div class="arrow-icon"></div>
Expand All @@ -256,15 +256,15 @@ <h2 class="additional-info__title">We know a lot</h2>
<li class="additional-info__list-item">
<a
class="link additional-info__link"
href="https://nrccfi.camden.rutgers.edu/files/nrccfi-fact-sheet-2014.pdf?fbclid=IwAR3CXF7swyM7VQjr7qcnMJ59I0BKTyapSVuHJ5GH9KYWxYv63t4fnZhgYsk"
href="https://www.ncjrs.gov/pdffiles1/nij/250349.pdf?fbclid=IwAR2nscfCxNjtE6amLFRblq2Zum1RtGViz1pVVUt-MsrcI616YmxOWxz1ILw"
target="_blank"
>
The Impact of Incarceration on Dependent Children,
<cite>NRCCFI, 2014</cite></a
>
<a
class="link additional-info__link"
href="https://nrccfi.camden.rutgers.edu/files/nrccfi-fact-sheet-2014.pdf?fbclid=IwAR3CXF7swyM7VQjr7qcnMJ59I0BKTyapSVuHJ5GH9KYWxYv63t4fnZhgYsk"
href="https://www.ncjrs.gov/pdffiles1/nij/250349.pdf?fbclid=IwAR2nscfCxNjtE6amLFRblq2Zum1RtGViz1pVVUt-MsrcI616YmxOWxz1ILw"
target="_blank"
>
<div class="arrow-icon"></div>
Expand Down