Have 3 questions about this solution and looking for coding buddy.
Design comparison
Solution retrospective
- How to connect "main page project left" numbers with "modal project left" numbers (pink in main page). SOLVED
1.1 NEW PROBLEM - how to apply style when 'left' is 0. Should I redesign structure of page as an array of object and then render it with different information? NEED HELP WITH THIS.
-
How to center "left borders" in main statistics page? Did static and I know it is bad option. SOLVED
-
Looking for coding buddy to review each others code and give constructive feedback. (once per week or so - will negotiate).
Regards, Jaronimas
Community feedback
- @molszewski34Posted almost 3 years ago
You can try update it with parseInt method and use toLocaleString to give value a proper format.
sumOutput.innerHTML = "$" + (sumOutput + parseInt(noRewardInput.value)).toLocaleString("en-us"); sumOfBacker.innerHTML = (sumOfBacker + 1).toLocaleString("en-us");
let sumOutput = 89914; let sumOfBacker = 5007;
Marked as helpful0 - @molszewski34Posted almost 3 years ago
- Why you want to connect them when they are totally separate things? Things that should connect are modal number input and sum of pledged money and counter of backers which add +1 every time value of input is added to the sum. You can also try to update progress bar when sum is updated. I used <progress> but it seems to not look properly (no styling) on android devices (atleast mine) but value is updated. Another option is to connect pledge options with modal options so when you click button an option in modal is also checked.
- You can try use a grid but there is also a way to use it with flex. Instead of <ul> you can make 3 separate divs with content and give them 33% width and then give them proper borders or even give borders to middle box.
Marked as helpful0 - @jaronimas-codesPosted almost 3 years ago
For some reason, after all of my previous and your suggested formatting the value of 89914 becomes 89,914 and then if I adding $1 to it, then it is rounding up to total backed of $90. I still need to look for solution of formatting that, but thanks for answer.
0 - @jaronimas-codesPosted almost 3 years ago
Good evening, Mariusz,
- Was playing with number formatting and made a bug with progress bar. Now already fixed, but my statistic numbers are without commas and dots:/ For progress bar, I used simple div inside div with a change of width % according the total sum pledged divided by total sum asked.
My actual question is that when person donates money and "buys" one of the options, the amount of options (101, 64 and 0 by default) is reducing by one on modal, but cannot find solution that it would be reflected (connected) on main page (I colored that problem with pink background color on main page).
- Alright, will sit to make it happening, flex shouldn't be a big problem :)
Thank you very much for answer and hope
0
Please log in to post a comment
Log in with GitHubJoin 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