These are chat archives for CodeHubOrg/discussions

24th
Mar 2017
Katja Durrani
@katjad
Mar 24 2017 02:15
Staging site updated :) This is becoming so good! Projects page as well (I just think we need to tidy up our account a bit at some point ;)). Thanks all of you!
Dave Thomson
@rinse0ut
Mar 24 2017 05:57
:smile:
:+1:
Tim Handy
@TimHandy
Mar 24 2017 10:16
@rinse0ut Got the random quote pug mixin kinda working... just need the quotes to include. Whats the 'shared content plan' ?
Should add it to the wiki
Tim Handy
@TimHandy
Mar 24 2017 10:44
Can't find anything on how to import an array from a js file so that I can use it in pug. Anyone know how? Tried a few options including script(src="../public/js/quotesInspiration.js") but get an error about "Only named blocks and mixins can appear at the top level of an extending template". Google didn't help.
Dave Thomson
@rinse0ut
Mar 24 2017 10:46
Can you commit and push to your github please?
Tim Handy
@TimHandy
Mar 24 2017 10:48
sure.
index.pug line 133 and 5-8
js/quotesInspiration.js
and mixins/randomQuote.pug
line 133 works if you pass it an explicit array of quotes actually on line 133
but trying to import from the quotesInspiration.js file does not... I'm doing something wrong with the import I think.
Dave Thomson
@rinse0ut
Mar 24 2017 10:53
I’ve added links on the issue as to how the data is include for the logos from the model folder.
Ah yes your using a html file and not a pug template.
If you’re up for the challenge, convert your html file to a pug template and include the data in the same way as the logo model.
Tim Handy
@TimHandy
Mar 24 2017 10:56
ahh, so I need to import the array in the routes.js file and pass it to the template...
Dave Thomson
@rinse0ut
Mar 24 2017 10:56
:+1:
Tim Handy
@TimHandy
Mar 24 2017 10:56
I hadn't understood that part, though I vaguely remember doing that once upon a time.
cheers, will keep going.
Tim Handy
@TimHandy
Mar 24 2017 11:37
@rinse0ut https://github.com/TimHandy/javascript101/tree/random-quote-mixin Nope, still won't work... I can't see what I'm doing wrong, I've exported the array, passed it to the template in the routes file, but the array doesn't appear to be getting to randomQuote.pug this way as I get a 'length undefined' error. To my eyes I've done everything you did. Line 127 in index.pug works (if 128 is commented out)... line 128 does not work.
Dave Thomson
@rinse0ut
Mar 24 2017 11:47
Just tested it and line 128 does work
Please move the data to the model folder
var quotesInspiration = require('./model/quotesInspiration')
Dave Thomson
@rinse0ut
Mar 24 2017 12:03
@TimHandy
Tim Handy
@TimHandy
Mar 24 2017 12:03
whaeh???
really... oh...
restart of the server must have been it! doh!
thanks, I have PR'd the careers page also.
Dave Thomson
@rinse0ut
Mar 24 2017 12:11
School boy error :wink: Easily done. Template changes don’t need a refresh but data and route changes do.
Merged the Careers page. Spot on! Really well written. The recruiting bit as well is awesome. :sunglasses: @TimHandy
Tim Handy
@TimHandy
Mar 24 2017 12:17
Cheers :-)
PR for randomQuote done.
Dave Thomson
@rinse0ut
Mar 24 2017 12:19
Being picky I would suggest you shorten the second title to ‘Our Tech Stack’ (or whatever you think) and include the old title as a paragraph.
Dave Thomson
@rinse0ut
Mar 24 2017 12:26
To make the home template cleaner you could move the surrounding quote mark up into the mixing and just have this:
 +randomQuote(‘Inspiration’, quotesInspiration)
where the first param is the feature title
@TimHandy
Good job btw. :+1:
Tim Handy
@TimHandy
Mar 24 2017 12:32
ok, will take a look at that, thanks. next question re the hamburger. I think this might be because it doesn't look like the bootstrap JS has been included. I'll add the js file to our js dir, but how would I include this in a script tag at the end of the body? Put it at the end of the footer.html partial?
Dave Thomson
@rinse0ut
Mar 24 2017 12:36
Basically we don’t need it and it is additional bloat. Especially as we want high performance on mobile. Just use vanilla JS for the moment.
Tim Handy
@TimHandy
Mar 24 2017 12:37
oh, ok. Should I include a js file at end of the footer partial for it?
Dave Thomson
@rinse0ut
Mar 24 2017 12:40
yes please
Tim Handy
@TimHandy
Mar 24 2017 12:51
re the quote... I thought the way I had done it here made it more reusable, so that it takes a quote and returns an unformatted quote that can be formatted however you like. if I move the formatting into the mixin won't that make it less reusable as the h3, panel and panel-body will be baked in?
Dave Thomson
@rinse0ut
Mar 24 2017 12:55
That’s true, perhaps we need a panel mixin instead?
Dave Thomson
@rinse0ut
Mar 24 2017 14:10
@paulfourniercarey Thanks for sorting the home page icons! Looks much better! :sunglasses: :shipit:
@katjad Could you add the outstanding members to CodeHubOrg git group when you have the chance please?
Katja Durrani
@katjad
Mar 24 2017 14:14
@rinse0ut I did add them to the group but did not reassign tasks at the same time as they had to accept first. They should all have been added but let me know if I forgot someone
Dave Thomson
@rinse0ut
Mar 24 2017 14:14
Thanks @katjad
Paul
@paulfourniercarey
Mar 24 2017 14:16
No worries, now I have to work out how to get all the new updates synced down local
Dave Thomson
@rinse0ut
Mar 24 2017 14:16
git pull upstream master
Paul
@paulfourniercarey
Mar 24 2017 14:18
Thanks, shame I am a stubborn GitHub app user click click! 🙈