-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
174 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "data"] | ||
path = data | ||
url = https://github.com/co2birthdate/dataops.git | ||
[submodule "dataops"] | ||
path = dataops | ||
url = https://github.com/co2birthdate/dataops.git |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const Shield = ({ birthvalue, currentvalue, percentchange }) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="427" | ||
height="20" | ||
role="img" | ||
aria-label={`born ${birthvalue} ppm CO₂: today we are ${percentchange}% higher`} | ||
> | ||
<title>CO₂ birthdate: {birthvalue} ppm: today we are {percentchange}% higher</title> | ||
<linearGradient id="s" x2="0" y2="100%"> | ||
<stop offset="0" stopColor="#bbb" stopOpacity=".1" /> | ||
<stop offset="1" stopOpacity=".1" /> | ||
</linearGradient> | ||
<clipPath id="r"> | ||
<rect width="427" height="20" rx="3" fill="#fff" /> | ||
</clipPath> | ||
<g clipPath="url(#r)"> | ||
<rect width="125" height="20" fill="#555" /> | ||
<rect x="125" width="151" height="20" fill="#97ca00" /> | ||
<rect x="275" width="151" height="20" fill="#555" /> | ||
<rect width="427" height="20" fill="url(#s)" /> | ||
</g> | ||
<g | ||
fill="#fff" | ||
textAnchor="middle" | ||
fontFamily="Verdana,Geneva,DejaVu Sans,sans-serif" | ||
textRendering="geometricPrecision" | ||
fontSize="110" | ||
> | ||
<text aria-hidden="true" x="635" y="150" fill="#010101" fillOpacity=".3" transform="scale(.1)" textLength="1150"> | ||
Born at {birthvalue} ppm CO₂ | ||
</text> | ||
<text x="635" y="140" transform="scale(.1)" fill="#fff" textLength="1150"> | ||
Born at {birthvalue} ppm CO₂ | ||
</text> | ||
<text aria-hidden="true" x="1995" y="150" fill="#010101" fillOpacity=".3" transform="scale(.1)" textLength="1410"> | ||
We are {percentchange}% higher | ||
</text> | ||
<text x="1995" y="140" transform="scale(.1)" fill="#fff" textLength="1410"> | ||
We are {percentchange}% higher | ||
</text> | ||
<text aria-hidden="true" x="3490" y="150" fill="#010101" fillOpacity=".3" transform="scale(.1)" textLength="1440"> | ||
Current: {currentvalue} ppm CO₂ | ||
</text> | ||
<text x="3490" y="140" transform="scale(.1)" fill="#fff" textLength="1440"> | ||
Most recent: {currentvalue} ppm CO₂ | ||
</text> | ||
</g> | ||
</svg> | ||
) | ||
|
||
export default Shield |
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