ShayanTheNerd / multiplication-table

An elegant multiplication table with smooth hover effects!

Home Page:https://shayanthenerd.github.io/multiplication-table/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiplication Table

Visualize an interactive multiplication table on your device.

Multiplication Table preview

Overview

The challenge

Users should be able to:

  • Recieve a firendly warning if they're previweing website on a non-desktop device (mobile, tablet, etc.).
  • Hover over a number (table cell) or click on it if on a non-desktop device and have corresponding table cells highlighted to see the numbers that make up the multiplication.

Links

My process

Built with:

  • Semantic HTML
  • Vanilla CSS
  • Vanilla JavaScript

I learned:

  • How to apply side effects on dynamic, sibling UI elements.
  • How to detect the type of user agent's device (desktop/non-desktop).
  • How to implement a multiplication table with dynamically generated cells.

Development setup

All you need to do is to clone the project:

git clone https://github.com/ShayanTheNerd/multiplication-table.git

Alternatively, you can copy the source of the project directly to your local environment using Degit:

pnpm i -g degit

degit https://github.com/ShayanTheNerd/multiplication-table new-project-folder

Now, you can preview it on a local server of your choice. My personal recommendation is the Live Server Extension.

Deployment and production

Before deploying the project or creating a new pull request, format all files and make sure there are no errors.

Style Guide

If you want to develop this project, please stick to these rules:

  • Follow the current architecture, coding paradigm, and project folder structure.
  • Follow the current character case principals for ids, classes, variables, file and folder names, etc.
  • Code based on the current libraries, frameworks, and packages included in the project.
  • Make sure to use BEM methodology for naming custom CSS classes.
  • In case you need to access an HTML element in JavaScript by a class name, prefix the class name with js-. For example, js-submit-btn.
  • Add Git commit messages considering Conventional Commits.

Contribution

Your contribution is always welcome, please follow these steps:

  1. Fork the project.
  2. Create your feature branch: git checkout -b feature/branch-name.
  3. Make sure to follow instructions in the style guide section.
  4. Stage all changes you made: git add -A.
  5. Commit all staged changes with a descriptive commit message: git commit -m 'feat: add foo bar baz'.
  6. Push everything to your feature branch: git push origin feature/branch-name.
  7. Create a new Pull Request.

License

This project is licensed under MIT license. You're free to use it, but a link to this page and mentioning the author's name is mandatory. Created by Shayan Zamani.


back to top ⬆️

About

An elegant multiplication table with smooth hover effects!

https://shayanthenerd.github.io/multiplication-table/

License:MIT License


Languages

Language:JavaScript 40.0%Language:CSS 37.8%Language:HTML 22.2%