A collection of simple challenges to demonstrate developer skill and resourcefulness.
The first challenge is to implement a simple login page. In this challenge you will:
- use Bootstrap to construct a simple and attractive login page
- use JavaScript to interact with a RESTful backend
In your local copy of the project, install the gems and run the server:
bundle install
rackup -p3000
Time estimate: 7 minutes.
- Add a basic grid to the page.
- Add a login form to the page. The form should include:
- Email field
- Password field
- "Remember me" checkbox
- Sign-in button
- "Forgot password" link
- Add a background image to the page.
Here is an example of how this could look when you are done:
Time estimate: 7 minutes.
- When the user clicks the "Sign-in" button, check to see if the email and password are 'admin@example.com' and 'password123' respectively. If they both match, alert 'Success,' otherwise alert 'Authentication Failure!'
Time estimate: 7 minutes.
- When the user clicks the "Sign-in" button, use Ajax to submit the form. Alert the same messages as above based on the response from the web service.
- Edit the login action to validate the email and password. The service should:
- Respond with a 200 code if the login was successful.
- Respond with a 400 if the email or password did not match.