Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Have 3 questions about this solution and looking for coding buddy.

bem
Jaronimas•375
@jaronimas-codes
A solution to the Crowdfunding product page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


  1. 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.

  1. How to center "left borders" in main statistics page? Did static and I know it is bad option. SOLVED

  2. Looking for coding buddy to review each others code and give constructive feedback. (once per week or so - will negotiate).

Regards, Jaronimas

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Mariusz Olszewski•360
    @molszewski34
    Posted over 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 helpful
  • Mariusz Olszewski•360
    @molszewski34
    Posted over 3 years ago
    1. 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.
    2. 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 helpful
  • Jaronimas•375
    @jaronimas-codes
    Posted over 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.

  • Jaronimas•375
    @jaronimas-codes
    Posted over 3 years ago

    Good evening, Mariusz,

    1. 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).

    1. Alright, will sit to make it happening, flex shouldn't be a big problem :)

    Thank you very much for answer and hope

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub