Rewrite frontend in React (#1273)

I rewrote the frontend in React using a module bundler. It's matched feature-for-feature with the current frontend, with only slight changes in the styling. I did not fuss about making the styling identical; the badge popup looks particularly different.

This makes the front end much easier to develop. I'm really looking forward to implementing #701, to which this paves the way.

This makes light use of Next.js, which provides webpack config and dev/build tooling. We’ll probably replace it with create-react-app or our own webpack setup because unfortunately it comes with a lot of runtime overhead (the build is 400k).

Let’s open new issues for bugs and features, and track other follow-ups here: https://github.com/badges/shields/projects/1
This commit is contained in:
Paul Melnikow
2017-11-28 11:34:17 -05:00
committed by GitHub
parent a0cd93080e
commit 4b5bf03fea
32 changed files with 5853 additions and 977 deletions

View File

@@ -0,0 +1,24 @@
import React from 'react';
export default () => (
<section>
<img alt="Shields.io" src="static/logo.svg" />
<hr className="spacing" />
<p className="highlights">
Pixel-perfect &nbsp;
Retina-ready &nbsp;
Fast &nbsp;
Consistent &nbsp;
Hackable &nbsp;
No tracking
</p>
<style jsx>{`
.highlights {
font-style: italic;
}
`}</style>
</section>
);