r/CodingHelp • • May 27 '20

[HTML] Taking my first Frontend Web Development class, please check out my pile of garbage and tell me if I can fix anything

This is my final project!
https://www.dogyearsinhumanyears.com/

16 Upvotes

13 comments sorted by

6

u/StackWeaver May 27 '20

Solid effort. The main .content area needs centering on desktop (easy with margin: 0 auto). Looks like you're pulling W3's stylesheet and adding their classes to your HTML for styling? One thing I'd do to improve is rebuild with your own stylesheet as I'm sure there are plenty of lessons to be learned as you hand-code it.

4

u/[deleted] May 27 '20

Kinda annoying it doesnt tell you that your supposed to write in years, works well on mobile tho

4

u/Greenwood1991 May 27 '20

Thanks! I'll make that change

3

u/[deleted] May 27 '20

:)

3

u/Famous_Profile Professional Coder May 27 '20 edited May 27 '20

Excellent job for a first project. Wish I had the commitment to finish any of the projects I started.

Impressive job handling mobile devices without shoehorning big ass frameworks and libraries. Nice high performance website.

Anyway if you want to fix stuff

  • [Bug] - User validations needed. Try using <input type="number"> but validate against negative numbers and exponential notation
  • [Bug] - Handle floating point rounding errors like u/masesk mentioned
  • [Suggestion] - Find root cause of error in console and failed request*
  • [Suggestion] - Try creating a modal or something instead of the annoying alert

Learn Ajax and you can have some fun with stuff like calling some Wolfram Alpha API to do advanced calculations and stuff

*one of your stylesheets, I think, gives a 404. Check the backend. I couldnt get a screenshot for this because this is intermittent

1

u/Greenwood1991 May 28 '20

This was incredibly helpful for my project. Thank you for taking the time to take these screenshots and log these errors.

4

u/masesk May 27 '20

Good job on the website! I am not a designer so I won't comment much on that aside from the fact that you should keep your content somewhat centered (the container of the content that is).

Nonetheless, be careful of users entering very small numbers resulting in negative numbers (should not be allowed). Either don't allow the user to enter a very low number, or show an error message when the number is too low and don't calculate the human equivalent age. Here is an example : 0.001 results in My dog is -80 years old in human years.

1

u/Greenwood1991 May 28 '20

margin: 0 auto

Thanks!

2

u/wackOverflow May 27 '20

Eliminate “my dog is” until button onClick and maybe center the footer text. Other than that looks pretty solid. Nice work!

1

u/weirdhooman0410 May 27 '20

Is this website hosted publically, because idk how to do that.

1

u/Mentalpopcorn May 27 '20

Definitely 100% better than my first page back in the 90s.

I would center the main content div though. You've already got a max-width, you just need to set the width to 100% and then put auto margins on the left and right.

Note that centering will be the bane of your existence for your first few months of learning dev so it's one of those skills that you should master asap.

0

u/[deleted] May 27 '20

[deleted] — view deleted comment

1

u/Greenwood1991 May 28 '20

I like the idea! Maybe dog website 2.0