diff --git a/README.md b/README.md
index 88b68622..749b88b0 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
- [🎉 Features](#-features)
- [🎆 EXIF extraction](#-exif-extraction)
- - [💰 Cryptocurrency donation via Web3/MetaMask](#-cryptocurrency-donation-via-web3-metamask)
+ - [💰 Cryptocurrency donation via Web3/MetaMask](#-cryptocurrency-donation-via-web3metamask)
- [🕸 Related Posts](#-related-posts)
- [🐝 Coinhive](#-coinhive)
- [🏆 SEO component](#-seo-component)
@@ -55,11 +55,11 @@ If you want to know how this works, have a look at the respective component unde
### 💰 Cryptocurrency donation via Web3/MetaMask
-Lets visitors say thanks with Bitcoin or Ether. Includes full Web3 client for sending Ether via MetaMask or Mist.
+Lets visitors say thanks with Bitcoin or Ether. Uses [web3.js](https://github.com/ethereum/web3.js) for sending Ether transactions via MetaMask, Brave or Mist. Component listens to account & network changes and adapts accordingly.
As a fallback, QR codes are generated with [react-qr-svg](https://github.com/no23reason/react-qr-svg) from the addresses defined in [`config.js`](config.js).
-
+
If you want to know how this works, have a look at the respective components under
@@ -70,7 +70,7 @@ If you want to know how this works, have a look at the respective components und
Under each post a list of related posts is displayed which are based on the tags of the currently viewed post. Also allows loading more related posts in place.
-
+
If you want to know how this works, have a look at the respective component under
@@ -80,7 +80,7 @@ If you want to know how this works, have a look at the respective component unde
Includes a component for mining Monero with JavaScript via [Coinhive](https://coinhive.com).
-
+
Functionality is opt-in on a post basis. Simply add this to any post's frontmatter to activate it for this post:
diff --git a/package.json b/package.json
index c8ab57f6..3dd366d1 100644
--- a/package.json
+++ b/package.json
@@ -31,8 +31,8 @@
"dms2dec": "^1.1.0",
"fast-exif": "^1.0.1",
"fraction.js": "^4.0.9",
- "gatsby": "^2.0.21",
- "gatsby-image": "^2.0.13",
+ "gatsby": "^2.0.22",
+ "gatsby-image": "^2.0.14",
"gatsby-plugin-catch-links": "^2.0.4",
"gatsby-plugin-favicon": "^3.1.4",
"gatsby-plugin-feed": "^2.0.8",
@@ -78,7 +78,7 @@
"@babel/node": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"babel-eslint": "^10.0.1",
- "eslint": "^5.6.1",
+ "eslint": "^5.7.0",
"eslint-config-prettier": "^3.1.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-graphql": "^2.1.1",
diff --git a/src/components/atoms/Modal.module.scss b/src/components/atoms/Modal.module.scss
index d00c65b4..cfade373 100644
--- a/src/components/atoms/Modal.module.scss
+++ b/src/components/atoms/Modal.module.scss
@@ -10,14 +10,15 @@
bottom: 0;
z-index: 10;
background: rgba($body-background-color, .9);
- backdrop-filter: blur(5px);
+ // backdrop-filter: blur(5px);
animation: fadein .3s;
- padding: $spacer / 2;
+ padding: $spacer;
@media (min-width: $screen-sm) {
display: flex;
- align-items: center;
+ align-items: flex-start;
justify-content: center;
+ padding-top: 6vh;
}
}
@@ -42,20 +43,31 @@
cursor: pointer;
background: transparent;
border: 0;
- -webkit-appearance: none;
+ appearance: none;
line-height: 1;
- font-size: $font-size-large;
- padding: 3px;
+ font-size: $font-size-h2;
+ padding: 4px;
position: absolute;
top: 0;
right: ($spacer/4);
- color: $brand-grey;
+ color: $brand-grey-light;
font-weight: 500;
+
+ &:hover,
+ &:focus {
+ color: $brand-grey;
+ }
}
-// Prevent background scrolling when modal is open
.isModalOpen {
+ // Prevent background scrolling when modal is open
overflow: hidden;
+
+ // more cross-browser backdrop-filter
+ body > div:first-child {
+ transition: filter .85s ease-out;
+ filter: blur(5px);
+ }
}
.modal__title {
diff --git a/src/components/atoms/Web3Donation.jsx b/src/components/atoms/Web3Donation.jsx
index 68c26e05..c81283af 100644
--- a/src/components/atoms/Web3Donation.jsx
+++ b/src/components/atoms/Web3Donation.jsx
@@ -1,11 +1,85 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Web3 from 'web3'
+import Input from '../atoms/Input'
import styles from './Web3Donation.module.scss'
const ONE_SECOND = 1000
const ONE_MINUTE = ONE_SECOND * 60
+const InputGroup = ({
+ networkId,
+ selectedAccount,
+ amount,
+ onAmountChange,
+ handleWeb3Button
+}) => (
+
+ {accounts.length === 0 &&
+ 'Web3 detected, but no account. Are you logged into your MetaMask account?'}
+ {networkId !== '1' && 'Please connect to Main network'}
+ {error && error.message}
+