diff --git a/public/img/church_2500.jpg b/public/img/church_2500.jpg
new file mode 100644
index 0000000..ca3518c
Binary files /dev/null and b/public/img/church_2500.jpg differ
diff --git a/src/components/Html.js b/src/components/Html.js
index 8ce9301..7612569 100644
--- a/src/components/Html.js
+++ b/src/components/Html.js
@@ -21,6 +21,7 @@ class Html extends React.Component {
+
{style && }
diff --git a/src/components/RsvpButton/RsvpButton.css b/src/components/RsvpButton/RsvpButton.css
new file mode 100644
index 0000000..16d55de
--- /dev/null
+++ b/src/components/RsvpButton/RsvpButton.css
@@ -0,0 +1,91 @@
+@import '../variables.css';
+
+.root {
+ margin: 0 auto;
+ max-width: 420px;
+ position: relative;
+}
+
+.rsvp,
+.rsvpForm {
+ position: absolute;
+ width: 100%;
+ transition: opacity ease-in-out 0.25s;
+ display: none;
+ opacity: 0;
+}
+
+.rsvpVisible,
+.rsvpFormVisible {
+ display: block;
+ opacity: 1;
+}
+
+.formGroup {
+ margin-bottom: 15px;
+ display: inline-block;
+}
+
+.rsvpGroup {
+ width: 60%;
+}
+
+.rsvpButtonGroup {
+ width: 30%;
+ float: right;
+}
+
+.label {
+ display: inline-block;
+ position: fixed;
+ top: -1000px;
+ left: -1000px;
+}
+
+.input {
+ display: block;
+ box-sizing: border-box;
+ padding: 12px 16px;
+ width: 100%;
+ height: 50px;
+ opacity: 0.75;
+ outline: 0;
+ border: 3px solid #fff;
+ border-radius: 14px;
+ background: #fff;
+ color: #616161;
+ font-size: 18px;
+ line-height: 1.3333333;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+}
+
+.input:focus {
+ opacity: 1;
+ box-shadow: 0 0 4px #fff;
+}
+
+.button {
+ display: block;
+ box-sizing: border-box;
+ margin: 0;
+ padding: 10px 16px;
+ width: 100%;
+ opacity: 0.75;
+ outline: 0;
+ border: 4px solid #fff;
+ border-radius: 14px;
+ background: transparent;
+ color: #fff;
+ text-align: center;
+ text-decoration: none;
+ font-size: 18px;
+ line-height: 1.3333333;
+ cursor: pointer;
+ transition: opacity ease-in-out 0.25s, box-shadow ease-in-out 0.25s;
+}
+
+.button:hover,
+.button:focus {
+ opacity: 1;
+ box-shadow: 0 0 4px #fff;
+}
diff --git a/src/components/RsvpButton/RsvpButton.js b/src/components/RsvpButton/RsvpButton.js
new file mode 100644
index 0000000..9679714
--- /dev/null
+++ b/src/components/RsvpButton/RsvpButton.js
@@ -0,0 +1,64 @@
+import React from 'react';
+import withStyles from 'isomorphic-style-loader/lib/withStyles';
+import s from './RsvpButton.css';
+
+class RsvpButton extends React.Component {
+
+ constructor(props) {
+ super(props);
+ this.state = {};
+ }
+
+ showRsvpForm = () => {
+ this.setState({ showRsvpForm: true });
+ setTimeout(() => {
+ this.rsvpInput.focus();
+ }, 250);
+ }
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+export default withStyles(s)(RsvpButton);
diff --git a/src/components/RsvpButton/package.json b/src/components/RsvpButton/package.json
new file mode 100644
index 0000000..08fe4ef
--- /dev/null
+++ b/src/components/RsvpButton/package.json
@@ -0,0 +1,6 @@
+{
+ "name": "RsvpButton",
+ "version": "0.0.0",
+ "private": true,
+ "main": "./RsvpButton.js"
+}
diff --git a/src/components/RsvpCard/RsvpCard.js b/src/components/RsvpCard/RsvpCard.js
index 085e6f6..ac35733 100644
--- a/src/components/RsvpCard/RsvpCard.js
+++ b/src/components/RsvpCard/RsvpCard.js
@@ -22,13 +22,16 @@ class RsvpCard extends React.Component {
}).isRequired,
};
- state = {
- detailsVisible: this.props.person.attending,
- saveAttending: this.props.person.attending ? 'saved' : null,
- saveStarter: this.props.person.starter !== '-1' ? 'saved' : null,
- saveMain: this.props.person.main !== '-1' ? 'saved' : null,
- saveDietary: this.props.person.dietary ? 'saved' : null,
- };
+ constructor(props) {
+ super(props);
+ this.state = {
+ detailsVisible: this.props.person.attending,
+ saveAttending: this.props.person.attending ? 'saved' : null,
+ saveStarter: this.props.person.starter !== '-1' ? 'saved' : null,
+ saveMain: this.props.person.main !== '-1' ? 'saved' : null,
+ saveDietary: this.props.person.dietary ? 'saved' : null,
+ };
+ }
isRSVPComplete(prop, value) {
function isOK(str) {
diff --git a/src/components/variables.css b/src/components/variables.css
index 4da9dac..b5c809f 100644
--- a/src/components/variables.css
+++ b/src/components/variables.css
@@ -3,7 +3,8 @@
* Typography
* ======================================================================== */
- --font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;
+ --font-family-base: 'Poppins', 'Segoe UI', 'HelveticaNeue-Light', sans-serif;
+ --font-family-cursive: 'Yesteryear', cursive;
/*
* Layout
@@ -15,20 +16,20 @@
* Media queries breakpoints
* ======================================================================== */
-/* --screen-xs-min: 480px; /* Extra small screen / phone */
-/* --screen-sm-min: 768px; /* Small screen / tablet */
-/* --screen-md-min: 992px; /* Medium screen / desktop */
-/* --screen-lg-min: 1200px; /* Large screen / wide desktop */
-
@custom-media --xs-viewport (min-width: 480px);
@custom-media --sm-viewport (min-width: 768px);
@custom-media --md-viewport (min-width: 992px);
@custom-media --lg-viewport (min-width: 1200px);
- --colour-primary: #6495ED;
- --colour-secondary: #2A6FEB;
- --colour-tertiary: #2A6FEB;
- --colour-grey: #CCC;
- --colour-green: #87EDA2;
- --colour-red: #FA7575;
+ /*
+ * Colour palette
+ * ======================================================================== */
+
+ --colour-nearblack: #282828;
+ --colour-primary: #6495ed;
+ --colour-secondary: #2a6feb;
+ --colour-tertiary: #2a6feb;
+ --colour-grey: #ccc;
+ --colour-green: #87eda2;
+ --colour-red: #fa7575;
}
diff --git a/src/routes/admin/index.js b/src/routes/admin/index.js
index 7bc7bf5..bcc91a1 100644
--- a/src/routes/admin/index.js
+++ b/src/routes/admin/index.js
@@ -11,17 +11,13 @@ export default {
async action() {
const resp = await fetchQL('{getAllPersons{key,firstname,lastname,email,password,completed,starter,main}}');
+ const { data } = await resp.json();
+ const people = data.getAllPersons || [];
const food = {
starters: starters.map(name => ({ name, total: 0 })),
mains: mains.map(name => ({ name, total: 0 })),
};
- let people = await resp.json();
- if (people.data && people.data.getAllPersons) {
- people = people.data.getAllPersons;
- } else {
- people = [];
- }
const Admin = await new Promise((resolve) => {
require.ensure([], (require) => resolve(require('./Admin').default), 'admin');
diff --git a/src/routes/home/Home.css b/src/routes/home/Home.css
index 7ec72e6..290b34b 100644
--- a/src/routes/home/Home.css
+++ b/src/routes/home/Home.css
@@ -1,73 +1,43 @@
@import '../../components/variables.css';
.root {
- padding-left: 20px;
- padding-right: 20px;
+ width: 100vw;
+ height: 100vh;
}
-.formContainer {
- margin: 0 auto;
- max-width: 420px;
+.churchImage {
+ position: fixed;
+ width: 100vw;
+ height: 100vh;
+ background-image: url('/img/church_2500.jpg');
+ background-size: cover;
+ background-position-x: 40%;
+ filter: grayscale(1) brightness(0.4);
+ z-index: -1;
}
-.formGroup {
- margin-bottom: 15px;
+.container {
+ padding-top: 5vh;
+ margin: 0 20px;
}
-.label {
- display: inline-block;
- margin-bottom: 5px;
- max-width: 100%;
- font-weight: 700;
-}
-
-.input {
- display: block;
- box-sizing: border-box;
- padding: 10px 16px;
- width: 100%;
- height: 46px;
- outline: 0;
- border: 1px solid var(--colour-grey);
- border-radius: 0;
- background: #fff;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- color: #616161;
- font-size: 18px;
- line-height: 1.3333333;
- transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
-}
-
-.input:focus {
- border-color: var(--colour-tertiary);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(0, 116, 194, 0.6);
-}
-
-.button {
- display: block;
- box-sizing: border-box;
- margin: 0;
- padding: 10px 16px;
- width: 100%;
- outline: 0;
- border: 1px solid var(--colour-secondary);
- border-radius: 0;
- background: var(--colour-primary);;
- color: #fff;
+.headings {
+ max-width: 640px;
+ margin: 0 auto 40px;
text-align: center;
- text-decoration: none;
- font-size: 18px;
- line-height: 1.3333333;
- cursor: pointer;
+ color: var(--colour-nearblack);
}
-.button:hover {
- background: var(--colour-secondary);
+.headings > * {
+ margin: 0 0 20px;
+ font-size: 2.5em;
}
-.button:focus {
- border-color: var(--colour-tertiary);
- box-shadow: 0 0 8px var(--colour-secondary);
+.headings h3 {
+ margin-top: 40px;
+ font-family: var(--font-family-cursive);
}
-
+.rsvp {
+ padding-top: 15vh;
+}
diff --git a/src/routes/home/Home.js b/src/routes/home/Home.js
index aa60f1d..dcfd9f5 100644
--- a/src/routes/home/Home.js
+++ b/src/routes/home/Home.js
@@ -1,31 +1,22 @@
import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Home.css';
+import RsvpButton from '../../components/RsvpButton';
class Home extends React.Component {
render() {
return (
-
-
+
+
+
+
Daniel and Hana
+ are getting married
+ - 27th July 2017 -
+
+
+
+
);
diff --git a/src/routes/login/Login.css b/src/routes/login/Login.css
index 245ae22..0c0a475 100644
--- a/src/routes/login/Login.css
+++ b/src/routes/login/Login.css
@@ -11,10 +11,6 @@
max-width: 380px;
}
-.lead {
- font-size: 1.25em;
-}
-
.formGroup {
margin-bottom: 15px;
}
diff --git a/src/routes/login/Login.js b/src/routes/login/Login.js
index cf331b9..7fbdc70 100644
--- a/src/routes/login/Login.js
+++ b/src/routes/login/Login.js
@@ -12,7 +12,6 @@ class Login extends React.Component {
{this.props.title}
-
Log in with your username or company email address.