These are chat archives for CodeHubOrg/discussions

16th
Mar 2017
Dave Thomson
@rinse0ut
Mar 16 2017 09:28
Found a cool show case of sites made with React: http://madewithreact.com/
@TimHandy you might find this useful for include paths from the slack chat on BristolJS:
https://atom.io/packages/tree-view-copy-relative-path
Tim Handy
@TimHandy
Mar 16 2017 09:37
ahh, that's nice @rinse0ut . my paths are never that long yet... only ever ./ or ../
I like the pomodoro on madewithreact.com
Dave Thomson
@rinse0ut
Mar 16 2017 09:47
Yeah using it now!
Dave Thomson
@rinse0ut
Mar 16 2017 11:35
is a great example of a progressive web application
Open it on your mobile and save it to your home screen and you have an app!
Tim Handy
@TimHandy
Mar 16 2017 16:15
I'm struggling with a CSS issue... I have my responsive nav working... when its on small screen I have a burger, and when bigger i have links... what I can't figure out is how to default my burger nav toggle to closed until the burger is clicked... if I add a .hidden class to the nav it works fine for small screens, but then the nav is hidden by default and is therfore not visible on larger screens... any ideas anyone?
Katja Durrani
@katjad
Mar 16 2017 16:41
I was going to look at code but unfortunately have to go now and only back in evening. But what I remember is that it is often better not to use a toggle function, but too write your own functions. So by default there would be a hidden class, and then you could check within the function whether the class is set, and remove it in case it is set. But I don't know if that addresses the problem you have.
Katja Durrani
@katjad
Mar 16 2017 16:48
there's also a javascript library that reacts to screen size, I've forgotten the name though! ah I think it's enquire.
so media queries for js
Tim Handy
@TimHandy
Mar 16 2017 16:50
ok, thanks Katya... i'll take a look. I was just about to look at js onScreenSizeChange... i'm guessing that's a thing... it should be.
Tim Handy
@TimHandy
Mar 16 2017 17:40
@rinse0ut thanks dave, but I'm doing it vanilla... fixed it! check it out....
line 219 downwards
Dave Thomson
@rinse0ut
Mar 16 2017 17:43
:sunglasses:
Tim Handy
@TimHandy
Mar 16 2017 17:44
yeah, I do feel pretty cool having figured that out.
it feels like it's not the optimum way to manage it, like it's a bit dirty, think I've overlooked something obvious.. but it works, and it's fairly tidy.
Dave Thomson
@rinse0ut
Mar 16 2017 17:49
Are you compiling it to ES6?
Tim Handy
@TimHandy
Mar 16 2017 17:51
Nah, ya gotta have the latest bleeding edge browser to view it... probably should compile down really.