Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

The Calculator

Dharmik_487 1,740

@Dharmik48

Desktop design screenshot for the Calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


Another challenge down✌️. This was a lot of fun and taught me a lot's of cool new stuff! I am really proud of the outcome and it motivates💪 me a lot! Thank you Frontend Mentor for this awesome challenge🤗.

At last if possible, a feedback never hurts. Thank you.

Community feedback

Account Deleted

Your calculator works ok except for the fact that I can enter a period(...) in whatever way; 5...5...55.5.5.........5 - this shouldn't be allowed. & I can also enter an operator after another.

Marked as helpful

1

Dharmik_487 1,740

@Dharmik48

Posted

@thulanigamtee Thank you again for helping out and finding these bugs! I'll fix them ASAP!

0
nmorajda 945

@nmorajda

Posted

Why is the color information in the JS file? I guess it should be part of a CSS file and JS only handle event handling.

0

Dharmik_487 1,740

@Dharmik48

Posted

@nmorajda actually I am using CSS variables for the theme colors and change the values of the variables using JS. If I'd only use CSS I would have to create 3 times more variables i.e. 1 set for each theme. So basically using JS makes it much easier.

Thanks for commenting though🤗

0
nmorajda 945

@nmorajda

Posted

@Dharmik48 This is a small and only your application, so ... ok. I wouldn't put a description of the appearance inside the JS code, though. IMHO in this application without modifying the JS code, it should be possible to add a new theme. I'll rewrite my calculator to show you what I mean.

0
nmorajda 945

@nmorajda

Posted

@Dharmik48 I didn't have to modify anything in the JS file :)

I add in src/templates/pages/index.pug:

label(for="theme-4") 4
input(type="checkbox" id="theme-4" value="theme-4")

And in src/scss/main.scss:

.theme-4 {
    --main-bg: tomato;

}

And i have new working theme tomato: https://nmorajda.github.io/calculator-app/www/

Such a modification can be performed by a person without knowledge of JS. Even I had an easier task because I naturally knew how to do it (even though I wrote the application some time ago).

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord