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

upgraded next / SASS support #803

Merged
merged 31 commits into from
Apr 13, 2018
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1c3a161
:space_invader: hello world postcss + sass \o/
mgiraldo Apr 6, 2018
7db1a2b
:space_invader: header and footer in scss
mgiraldo Apr 6, 2018
305b024
:space_invader: added scss folder
mgiraldo Apr 6, 2018
fa521cf
:space_invader: removed comments
mgiraldo Apr 6, 2018
b220bfb
:space_invader: object.entries polyfill for ie11
mgiraldo Apr 7, 2018
6c38f5b
:space_invader: remove onAppUpdated since it is deprecated in next5
mgiraldo Apr 7, 2018
00901da
Merge branch 'master' into next5
mgiraldo Apr 9, 2018
fcd2842
Merge branch 'master' into next5
mgiraldo Apr 10, 2018
7cff4db
:space_invader: refactored error, pages, some components
mgiraldo Apr 10, 2018
35f469b
:space_invader: done with utils.css
mgiraldo Apr 10, 2018
0d4c9d5
:space_invader: a whole new batch of migrated css
mgiraldo Apr 11, 2018
030a49e
:space_invader: another batch of migrations
mgiraldo Apr 12, 2018
ac067d6
:space_invader: refresh?
mgiraldo Apr 12, 2018
64f2b56
:space_invader: back with lint
mgiraldo Apr 12, 2018
e45fb30
:space_invader: utilfunctions is back
mgiraldo Apr 12, 2018
5d5c4ef
:space_invader: removed titlecase (unused)
mgiraldo Apr 12, 2018
6526491
:space_invader: test is back
mgiraldo Apr 12, 2018
0e03c51
:space_invader: selenium lib is back
mgiraldo Apr 12, 2018
f7d5cd6
:space_invader: with source maps / minor fixes / no extra packages
mgiraldo Apr 12, 2018
99482ef
:space_invader: upgraded react-slick / minor fixes
mgiraldo Apr 12, 2018
2082159
Merge branch 'master' into next5
mgiraldo Apr 12, 2018
3e2ebdb
:space_invader: added scss linter
mgiraldo Apr 12, 2018
a8f9cd1
:space_invader: fixed precommit hook
mgiraldo Apr 12, 2018
2344b51
:space_invader: fixed precommit hook
mgiraldo Apr 12, 2018
ea0329a
:space_invader: linted all scss
mgiraldo Apr 12, 2018
a8b5739
:space_invader: removed stylelint-config-standard because https://git…
mgiraldo Apr 12, 2018
be81f82
:space_invader: conflict resolution
mgiraldo Apr 12, 2018
ee8523e
:space_invader: fixed remnant css var / fixed breadcrumb alignment
mgiraldo Apr 12, 2018
c716a09
:space_invader: version bump
mgiraldo Apr 13, 2018
36cbe4e
:space_invader: added yarn step to analyzer
mgiraldo Apr 13, 2018
b3c8e7c
:space_invader: with next bundle analyzer
mgiraldo Apr 13, 2018
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
2 changes: 1 addition & 1 deletion components/DPLAHead/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const DPLAHead = ({ additionalLinks, pageTitle, seoType }) =>
<style>{reset}</style>
<style>{utilStylesheet}</style>
<style>{accessibility}</style>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default,es6,EventSource,Array.prototype.includes,Intl.~locale.en" />
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default,es6,EventSource,Object.entries,Array.prototype.includes,Intl.~locale.en" />
</Head>
</div>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@value minuitBlue, ebonyClayBlue, linkColor, gray75 from "../../../../css/colors.css";
@value smallRem, mediumRem, largeRem from "../../../../css/breakpoints.css";
@value sansFont from "../../../../css/typography.css";
@import "../../../../scss/colors";
@import "../../../../scss/breakpoints";
@import "../../../../scss/typography";

.wrapper {
color: white;
background-color: ebonyClayBlue;
background-color: $footerLightColor;
position: relative;

@media print {
Expand All @@ -15,14 +15,14 @@
.footer {
padding: 2rem 1rem;
line-height: 1.5;
color: gray75;
color: $gray75;
margin: 0 auto;

@media (min-width: mediumRem) {
@media (min-width: $mediumRem) {
padding: 3rem 1rem;
}

@media (min-width: largeRem) {
@media (min-width: $largeRem) {
padding: 3rem 0;
}

Expand All @@ -34,7 +34,7 @@
text-decoration: underline;
}

@media (min-width: largeRem) {
@media (min-width: $largeRem) {
font-size: 1.15rem;
}
}
Expand All @@ -45,7 +45,7 @@
&:nth-of-type(n + 3) {
margin-top: 1rem;

@media (min-width: smallRem) {
@media (min-width: $smallRem) {
margin-top: 0;
}
}
Expand All @@ -57,7 +57,7 @@
color: white;
margin-bottom: 1rem;

@media (min-width: largeRem) {
@media (min-width: $largeRem) {
font-size: 1.25rem;
}
}
Expand All @@ -71,31 +71,31 @@
text-decoration: none;
}

@media (min-width: mediumRem) {
@media (min-width: $mediumRem) {
margin-top: 0;
}

@media (min-width: largeRem) {
@media (min-width: $largeRem) {
float: right;
width: auto;
}
}

.smallFooterWrapper {
background-color: minuitBlue;
background-color: $footerDarkColor;
}

.smallFooter {
padding: 2rem 1rem;
margin: 0 auto;

@media (min-width: mediumRem) {
@media (min-width: $mediumRem) {
display: flex;
align-items: center;
justify-content: space-between;
}

@media (min-width: largeRem) {
@media (min-width: $largeRem) {
padding: 2rem 0;
}
}
Expand All @@ -105,7 +105,7 @@
margin: 0 auto;
width: 15rem;

@media (min-width: mediumRem) {
@media (min-width: $mediumRem) {
margin: 0;
width: 18rem;
}
Expand All @@ -115,7 +115,7 @@
text-align: center;
margin-top: 2rem;

@media (min-width: mediumRem) {
@media (min-width: $mediumRem) {
margin-top: 0;
}
}
Expand All @@ -129,7 +129,7 @@
padding: none;
}

@media (min-width: mediumRem) {
@media (min-width: $mediumRem) {
width: 1.5rem;
height: 1.5rem;
}
Expand Down
18 changes: 9 additions & 9 deletions components/MainLayout/components/Footer/FooterPro.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import Button from "components/shared/Button";

import { USER_BASE_URL } from "constants/env";

import { classNames, stylesheet } from "./Footer.css";
import css from "./Footer.scss";

const FooterPro = () =>
<div className={`${classNames.footer} site-max-width`}>
<div className={`${css.footer} site-max-width`}>
<div className="row">
<div className={`${classNames.linkGroup} col-xs-12 col-sm-6 col-md-3`}>
<h2 className={classNames.linkHeader}>About Us</h2>
<div className={`${css.linkGroup} col-xs-12 col-sm-6 col-md-3`}>
<h2 className={css.linkHeader}>About Us</h2>
<ul>
<li>
<Link as="/about" href="/pro/wp?section=about-dpla-pro">
Expand All @@ -35,8 +35,8 @@ const FooterPro = () =>
</li>
</ul>
</div>
<div className={`${classNames.linkGroup} col-xs-12 col-sm-6 col-md-3`}>
<h2 className={classNames.linkHeader}>Communities</h2>
<div className={`${css.linkGroup} col-xs-12 col-sm-6 col-md-3`}>
<h2 className={css.linkHeader}>Communities</h2>
<ul>
<li>
<Link as="/hubs" href="/pro/wp/hubs?section=hubs">
Expand Down Expand Up @@ -73,8 +73,8 @@ const FooterPro = () =>
</li>
</ul>
</div>
<div className={`${classNames.linkGroup} col-xs-6 col-sm-6 col-md-3`}>
<h2 className={classNames.linkHeader}>DPLA</h2>
<div className={`${css.linkGroup} col-xs-6 col-sm-6 col-md-3`}>
<h2 className={css.linkHeader}>DPLA</h2>
<ul>
<li>
<Link href={USER_BASE_URL}>
Expand Down Expand Up @@ -112,7 +112,7 @@ const FooterPro = () =>
<Button
type="primary"
size="large"
className={classNames.donateButton}
className={css.donateButton}
url="/donate"
>
Donate
Expand Down
18 changes: 9 additions & 9 deletions components/MainLayout/components/Footer/FooterUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import Button from "components/shared/Button";

import { PRO_BASE_URL } from "constants/env";

import { classNames, stylesheet } from "./Footer.css";
import css from "./Footer.scss";

const FooterUser = () =>
<div className={`${classNames.footer} site-max-width`}>
<div className={`${css.footer} site-max-width`}>
<div className="row">
<div className={`${classNames.linkGroup} col-xs-6 col-sm-4 col-md-3`}>
<h2 className={classNames.linkHeader}>DPLA</h2>
<div className={`${css.linkGroup} col-xs-6 col-sm-4 col-md-3`}>
<h2 className={css.linkHeader}>DPLA</h2>
<ul>
<li>
<Link
Expand Down Expand Up @@ -51,8 +51,8 @@ const FooterUser = () =>
</li>
</ul>
</div>
<div className={`${classNames.linkGroup} col-xs-6 col-sm-4 col-md-3`}>
<h2 className={classNames.linkHeader}>Tools</h2>
<div className={`${css.linkGroup} col-xs-6 col-sm-4 col-md-3`}>
<h2 className={css.linkHeader}>Tools</h2>
<ul>
<li>
<Link href="/primary-source-sets">
Expand Down Expand Up @@ -81,8 +81,8 @@ const FooterUser = () =>
</li>
</ul>
</div>
<div className={`${classNames.linkGroup} col-xs-6 col-sm-4 col-md-3`}>
<h2 className={classNames.linkHeader}>DPLA Pro</h2>
<div className={`${css.linkGroup} col-xs-6 col-sm-4 col-md-3`}>
<h2 className={css.linkHeader}>DPLA Pro</h2>
<ul>
<li>
<Link href={PRO_BASE_URL}>
Expand Down Expand Up @@ -135,7 +135,7 @@ const FooterUser = () =>
<Button
type="primary"
size="large"
className={classNames.donateButton}
className={css.donateButton}
url="/donate"
>
Donate
Expand Down
43 changes: 11 additions & 32 deletions components/MainLayout/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import FooterUser from "./FooterUser";

import { SITE_ENV } from "constants/env";

import { classNames, stylesheet } from "./Footer.css";
import css from "./Footer.scss";

const logo = "/static/images/dpla-logo.svg";
const fbIcon = "/static/images/facebook.svg";
Expand All @@ -16,78 +16,57 @@ const tumblrIcon = "/static/images/tumblr.svg";
const twitterIcon = "/static/images/twitter.svg";

const Footer = () =>
<footer className={classNames.wrapper}>
<footer className={css.wrapper}>
{SITE_ENV === "user" && <FooterUser />}
{SITE_ENV === "pro" && <FooterPro />}
<div className={classNames.smallFooterWrapper}>
<div className={`${classNames.smallFooter} site-max-width`}>
<div className={css.smallFooterWrapper}>
<div className={`${css.smallFooter} site-max-width`}>
<Link href="/">
<a><img className={classNames.logo} alt="DPLA Home" src={logo} /></a>
<a><img className={css.logo} alt="DPLA Home" src={logo} /></a>
</Link>
<div className={classNames.socialIcons}>
<div className={css.socialIcons}>
<a
href="https://www.facebook.com/digitalpubliclibraryofamerica"
title="Facebook"
rel="noopener noreferrer"
target="_blank"
>
<img
className={classNames.socialButton}
alt="Facebook"
src={fbIcon}
/>
<img className={css.socialButton} alt="Facebook" src={fbIcon} />
</a>
<a
href="https://www.instagram.com/digpublib/"
title="Instagram"
rel="noopener noreferrer"
target="_blank"
>
<img
className={classNames.socialButton}
alt="Instagram"
src={igIcon}
/>
<img className={css.socialButton} alt="Instagram" src={igIcon} />
</a>
<a
href="https://dp.la/info/feed/"
title="RSS Feed"
rel="noopener noreferrer"
target="_blank"
>
<img
className={classNames.socialButton}
alt="RSS Feed"
src={rssIcon}
/>
<img className={css.socialButton} alt="RSS Feed" src={rssIcon} />
</a>
<a
href="http://digitalpubliclibraryofamerica.tumblr.com/"
title="Tumblr"
rel="noopener noreferrer"
target="_blank"
>
<img
className={classNames.socialButton}
alt="Tumblr"
src={tumblrIcon}
/>
<img className={css.socialButton} alt="Tumblr" src={tumblrIcon} />
</a>
<a
href="https://twitter.com/dpla"
title="Twitter"
rel="noopener noreferrer"
target="_blank"
>
<img
className={classNames.socialButton}
alt="Twitter"
src={twitterIcon}
/>
<img className={css.socialButton} alt="Twitter" src={twitterIcon} />
</a>
</div>
</div>
</div>
<style dangerouslySetInnerHTML={{ __html: stylesheet }} />
</footer>;
export default Footer;
16 changes: 6 additions & 10 deletions components/MainLayout/components/GlobalHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ import Link from "next/link";
import NavigationUser from "../shared/NavigationUser";
import NavigationPro from "../shared/NavigationPro";

import {
stylesheet as desktopStylesheet,
classNames as desktopClassNames
} from "../shared/DesktopStyles.css";
import css from "../shared/DesktopStyles.scss";

import { SITE_ENV } from "constants/env";

const GlobalHeader = ({ isHome }) =>
<div className={desktopClassNames.header}>
<div className={css.header}>
{SITE_ENV !== "pro" &&
<NavigationUser
className={`${desktopClassNames.linksContainer} site-max-width`}
classNames={desktopClassNames}
className={`${css.linksContainer} site-max-width`}
css={css}
isHome={isHome}
/>}
{SITE_ENV === "pro" &&
<NavigationPro
className={`${desktopClassNames.linksContainer} site-max-width`}
classNames={desktopClassNames}
className={`${css.linksContainer} site-max-width`}
css={css}
isHome={isHome}
/>}
<style dangerouslySetInnerHTML={{ __html: desktopStylesheet }} />
</div>;

export default GlobalHeader;
Loading