diff --git a/src/components/RsvpCard/RsvpCard.css b/src/components/RsvpCard/RsvpCard.css index 68a0adc..78a9605 100644 --- a/src/components/RsvpCard/RsvpCard.css +++ b/src/components/RsvpCard/RsvpCard.css @@ -5,8 +5,12 @@ flex-flow: row wrap; flex-direction: column; width: 100%; - margin: 0; + margin: 0 0 40px; padding: 20px; + border: 3px solid #fff; + border-radius: 14px; + background-color: rgba(0, 0, 0, 0.4); + color: #fff; } @media (--sm-viewport) { @@ -30,25 +34,23 @@ .input { display: block; box-sizing: border-box; - padding: 10px 16px; + padding: 12px 16px; width: 100%; - height: 46px; + height: 50px; + opacity: 0.75; outline: 0; - border: 1px solid var(--colour-grey); - border-radius: 0; - background-color: #fff; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + 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, - background-color ease-in-out 0.15s; + 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); + opacity: 1; + box-shadow: 0 0 4px #fff; } .inputSuccess { @@ -75,24 +77,11 @@ } .rsvpSummary { - position: fixed; - right: 10px; - bottom: 10px; - left: 10px; - padding: 10px; - text-align: center; opacity: 0; - border-radius: 0; - background-color: #fff; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - color: #616161; font-size: 18px; - pointer-events: none; - transition: opacity ease-in-out .4s; + transition: opacity ease-in-out 0.4s; } .rsvpSummarySuccess { opacity: 1; - background-color: var(--colour-green); } - diff --git a/src/components/RsvpCard/RsvpCard.js b/src/components/RsvpCard/RsvpCard.js index ac35733..a27d3a0 100644 --- a/src/components/RsvpCard/RsvpCard.js +++ b/src/components/RsvpCard/RsvpCard.js @@ -7,6 +7,7 @@ import { starters, mains } from '../../config'; class RsvpCard extends React.Component { static propTypes = { + focusCallback: PropTypes.func, className: PropTypes.string, person: PropTypes.shape({ key: PropTypes.string, @@ -140,6 +141,7 @@ class RsvpCard extends React.Component { name="attending" defaultValue="-1" onChange={this.handleAttendingChange} + onFocus={this.props.focusCallback} > : null} {starters.map((starter, index) => ( @@ -214,6 +218,7 @@ class RsvpCard extends React.Component { name="main" defaultValue={this.props.person.main} onChange={this.handleMainChange} + onFocus={this.props.focusCallback} > {this.props.person.main === '-1' ? : null} {mains.map((main, index) => ( @@ -238,8 +243,10 @@ class RsvpCard extends React.Component { id="dietary" type="text" name="dietary" + autoComplete="off" defaultValue={this.props.person.dietary} onBlur={this.handleDietaryBlur} + onFocus={this.props.focusCallback} />
{this.state.saveDietary === 'saved' ? : null} diff --git a/src/routes/rsvp/Rsvp.css b/src/routes/rsvp/Rsvp.css index 0434e55..c45f219 100644 --- a/src/routes/rsvp/Rsvp.css +++ b/src/routes/rsvp/Rsvp.css @@ -1,14 +1,36 @@ @import '../../components/variables.css'; .root { - padding-left: 20px; - padding-right: 20px; + width: 100vw; + height: 100vh; +} + +.bgImage { + position: fixed; + width: 100vw; + height: 100vh; + background: url('/img/cervenalhota_2560.jpg'); + background-size: cover; + background-position-x: 30%; + background-color: #c1c1c1; + filter: grayscale(1) brightness(0.6); + z-index: -1; + transition: filter ease-in-out 0.5s; +} + +.bgImageFocus { + filter: grayscale(0.4) brightness(1); } .container { - margin: 0 auto; - padding: 0 0 40px; - max-width: var(--max-content-width); + padding-top: 5vh; + margin: 0 20px; +} + +.heading { + font-family: var(--font-family-cursive); + color: var(--colour-nearblack); + text-align: center; } .flexContainer { diff --git a/src/routes/rsvp/Rsvp.js b/src/routes/rsvp/Rsvp.js index 1919436..7fe5554 100644 --- a/src/routes/rsvp/Rsvp.js +++ b/src/routes/rsvp/Rsvp.js @@ -16,13 +16,30 @@ class Rsvp extends React.Component { })).isRequired, }; + constructor(props) { + super(props); + this.state = {}; + } + + focusCallback = () => { + this.setState({ focusBgImage: focus }); + } + render() { return (
+
-

{this.props.title}

+

Répondez, s'il vous plaît

- {this.props.people.map(person => )} + {this.props.people.map(person => ( + + ))}