Code Monkey home page Code Monkey logo

vention_rails_frontend_test's Introduction

Welcome to the Vention Rails Frontend Test!

The goal of this test is to create some interactive cards using HTML, CSS/SCSS, and JavaScript inside a Ruby on Rails application.

Rules

  • Vanilla JS and CSS/SCSS only (no Bootstrap, React or other frontend frameworks).
  • The layout for the cards should be responsive.
  • The page must be built within the provided Rails application.
  • Provide access to your code, e.g. link to a GitHub repo.
  • The card data should be stored (e.g. in JS mocked API response).

Setup

Before you begin building, clone this repo and follow the steps below to setup Ruby on Rails on your system.

1. Install Ruby

Rails requires Ruby. Install Ruby 3.1.4.

For installation methods for most Operating Systems take a look at ruby-lang.org.

Run the following command to verify Ruby is installed on your system:

ruby --version

2. Install SQLite3

You will also need an installation of the SQLite3 database. Many popular UNIX-like OSes ship with an acceptable version of SQLite3. Others can find installation instructions at the SQLite3 website.

Run the following command to verify SQLite3 is installed on your system:

sqlite3 --version

3. Install Rails

In the root directory of this repo, run the following command to install Rails and its dependencies.

bundle install

Verify that Rails has been installed with:

rails --version

4. Start the Web Server

Run the following command in the root directory to start the Web server in dev mode:

./bin/dev

This will start up Puma, a web server distributed with Rails by default.

To see your application in action, open a browser window and navigate to http://localhost:3000. You should see a white page with a "Ready" heading and an image.

5. Start Building

To start building, locate the following files/folders:

app/views/layouts/application.html.erb

  • This file is used to render the layout of the page, including the <head> and <body> tags.

app/views/home/index.html.erb

  • You can use this file to write your HTML.

app/assets/stylesheets/application.scss

  • You can use this file to write your CSS/SCSS.

app/javascript/application.js

  • You can use this file to write your JS.

public/images/

  • You can use and reference the images from this folder.

What to Build

The card states are shown below. The image should fade and a button should appear when the card is hovered over. When an item is added to the cart, an icon should appear on the top left-hand corner of the card indicating that it has been added to the cart. A new button should now appear allowing you to remove the item from the cart, which resets the card back to its original state.

Card States

State 1

State 2

State 3

vention_rails_frontend_test's People

Contributors

kirilsoshnin avatar

Watchers

 avatar  avatar Etienne Lacroix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.