forked from badges/shields
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
While Next.js can handle static sites, we've had a few issues with it, notably a performance hit at runtime and some bugginess around routing and SSR. Gatsby being fully intended for high-performance static sites makes it a great technical fit for the Shields frontend. The `createPages()` API should be a really nice way to add a page for each service family, for example. This migrates the frontend from Next.js to Gatsby. Gatsby is a powerful tool, which has a bit of downside as there's a lot to dig through. Overall I found configuration easier than Next.js. There are a lot of plugins and for the most part they worked out of the box. The documentation is good. Links are cleaner now: there is no #. This will break old links though perhaps we could add some redirection to help with that. The only one I’m really concerned about `/#/endpoint`. I’m not sure if folks are deep-linking to the category pages. There are a lot of enhancements we could add, in order to speed up the site even more. In particular we could think about inlining the SVGs rather than making separate requests for each one. While Gatsby recommends GraphQL, it's not required. To keep things simple and reduce the learning curve, I did not use it here. Close badges#1943 Fix badges#2837 Fix badges#2616
- Loading branch information
1 parent
cf7b76d
commit d8ce045
Showing
45 changed files
with
11,217 additions
and
5,268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/build | ||
/coverage | ||
/__snapshots__ | ||
/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
* | ||
!frontend/ | ||
!gh-badges/ | ||
!lib/ | ||
!core/ | ||
!logo/ | ||
!pages/ | ||
!public/ | ||
!templates/ | ||
!services/ | ||
!package-lock.json | ||
!/*.js | ||
!scripts/export-*.js | ||
!config/ | ||
config/local*.yml | ||
*.spec.js | ||
*~ | ||
.env | ||
.circleci | ||
.github | ||
.vscode | ||
__snapshots__ | ||
.buildpacks | ||
.eslint* | ||
.editorconfig | ||
.nycrc* | ||
.gitpod* | ||
.prettier* | ||
CONTRIBUTING.md | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
{ | ||
"reporter": ["lcov"], | ||
"all": true, | ||
"all": false, | ||
"silent": true, | ||
"clean": false, | ||
"sourceMap": false, | ||
"instrument": false, | ||
"exclude": ["**/*.spec.js"] | ||
"include": ["frontend/**/*.js"], | ||
"exclude": ["**/*.spec.js", "**/mocha-*.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ package-lock.json | |
/__snapshots__ | ||
/.next | ||
/build | ||
/public | ||
/coverage | ||
private/*.json | ||
/.nyc_output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
export default class DonateBox extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<div id="donate"> | ||
Love Shields? Please consider{' '} | ||
<a href="https://opencollective.com/shields">donating</a> to sustain | ||
our activities | ||
</div> | ||
<style jsx>{` | ||
#donate { | ||
padding: 25px 50px; | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
} | ||
} | ||
const Donate = styled.div` | ||
padding: 25px 50px; | ||
` | ||
|
||
const DonateBox = () => ( | ||
<Donate> | ||
Love Shields? Please consider{' '} | ||
<a href="https://opencollective.com/shields">donating</a> to sustain our | ||
activities | ||
</Donate> | ||
) | ||
|
||
export default DonateBox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.