Coder Social home page Coder Social logo

elushnikova / elevator Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 159 KB

Simplified model of an elevator. Proof of concept for student task and a source of screenshots/casts for task description.

Home Page: https://elevator.elushnikova.dev

JavaScript 46.74% HTML 18.90% CSS 34.35%
css data-attributes dom dom-events event-delegation html js

elevator's Introduction

Elevator

This is a simplified model of an elevator written in HTML, CSS, and JavaScript. It's a proof of concept for student task and a source of screenshots/casts for task description.

How to run

Open elevator.elushnikova.dev to see the result.

If you want to run it locally, clone the repository and open index.html in your browser.

Task steps

  1. Mark up building and elevator. Store information in data attributes.

  2. Style building and elevator. Try to work mobile first. Add CSS transitions.

  3. Handle elevator requests. Ensure that elevator does finish at the requested floor before accepting another request.

  4. Generate building with custom number of floors. Generate markup and adjust style rules via JS, if necessary.

  5. Publish! Deploy! Share! I love Netlify — it's quite handy and allows to automatically deploy your latest commits.

This is the entire scope of my little project for now.

What's next?

If you want to improve project and have time for that, here are some ideas:

  • Write unit tests — I prefer Jest. My code here needs refactoring before doing so.

  • Add queue for requests. If elevator is already moving, add new requests to the queue. Yay, algorithms!

  • For each request, add a character to enter elevator on selected floor. Character requests random floor, and exits on desired floor. Yay, overcrowding and more algorithms :D

  • Add more elevators. Make them move in parallel. Yay, parallelism and concurrency >:D

...I think that's enough for now. Have fun!

Please, let me know if you have any questions or want to show something you've done — I'll be happy to hear from you.

Sincerely,
Lena Lushnikova.

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.