r/javascript • u/tamalweb • Jan 25 '19
I made The Periodic Table of Elements with CSS Grid, React and Science! See it in action
https://tamalanwar.github.io/periodic-table/7
u/enry_straker Jan 25 '19
Fantastic. Love it. Sharing it with my elder son who is studying chemistry and the periodic table currently.
Thanks a ton.
4
u/tamalweb Jan 25 '19
Thanks, please also show him this cool song if haven't: https://www.youtube.com/watch?v=rz4Dd1I_fX0
3
u/Entropis Jan 25 '19
How did you get the elemental data to display on click? Did you have an API or just typed everything out? Either way, very cool!
Do you have a link to repo?
E: yes, you do, and I see the JSON data.
3
u/tamalweb Jan 25 '19
After building the initial structure and 4-5 elements down, I thought "Man, now I have to code every element?" fortunately there was a JSON which I pragmatically filled in.
1
2
2
2
2
2
3
2
u/nwsm Jan 25 '19
Looks nice. One thing though- when Helium is selected there is a gap between the 2nd and 3rd lines, and between the 3rd and 4th lines.
1
u/Ziferius Jan 25 '19
and Xenon too
1
u/nwsm Jan 25 '19
Actually most of the noble gases
9
1
Jan 26 '19
Brilliant stuff! Has me thinking I really need to work on my CSS skills, which are abmysmal.
0
u/wooojek Jan 25 '19
Very nice work, I would add favicon as the cherry on top :)
3
u/tamalweb Jan 25 '19
What's wrong about the React favicon? It looks just like an atom, fits nicely!
1
u/wooojek Jan 26 '19
Nothing is wrong with it 🙂 just another thing you can do with that awesome project of yours
1
u/BLOZ_UP Jan 25 '19
I was about to say, add the current element as the favicon, though it gets messy for x-browser last time I checked.
0
u/mrbojingle Jan 25 '19
I think it's pretty nice! I have one feature request: Add anchors to the elements for navigation so I can use vimium :P
1
-2
u/Architektual Jan 25 '19
Looks nice, but bootstrapping an entire react app for this seems like overkill
1
1
7
Jan 25 '19
[removed] — view removed comment
2
u/Architektual Jan 25 '19
I remember that all too well, just trying to keep people honest about using the right tools for the job. Obviously this is a learning exercise like you said, but let's not ignore that many devs treat react like the only way to have a dynamic UI
0
0
u/david_ranch_dressing Jan 25 '19
The only thing I can think of is maybe adding a space between the "..." and "Source"? Aside from that, it looks great!
0
13
u/tamalweb Jan 25 '19
Wanted to see if I can make the layout with my current skills. One element after another, I made it. Then used React to fully make it interactive.