webuildsg / webuild

:memo: Robot-handpicked list of open events and open source for designers, developers and makers in Singapore
https://webuild.sg/
MIT License
62 stars 33 forks source link

Give some link love to engineers.sg #82

Closed laktek closed 10 years ago

laktek commented 10 years ago

@miccheng is doing an awesome job with this and it deserves more attention :)

miccheng commented 10 years ago

Aww... Shucks...

alyssaq commented 10 years ago

Cool! Awesome to see this collection. Should we link to it in the footer?

sayanee commented 10 years ago

:+1: I thought about a link too - what do you all think about embedding the entire youtube playlist below the check open event clashes?

Getting inspiration from one-stop one-page info websites like frontend rescue

miccheng commented 10 years ago

Yeah, it's a YouTube playlist anyways. :)

On Friday, September 26, 2014, Sayanee Basu notifications@github.com wrote:

[image: :+1:] I thought about a link too - what do you all think about embedding the entire youtube playlist below the check open event clashes?

— Reply to this email directly or view it on GitHub https://github.com/webuildsg/webuild/issues/82#issuecomment-56934151.

Regards,

Michael Cheng CM Mobile: +65 9185 5166 LinkedIn: http://sg.linkedin.com/in/miccheng

laktek commented 10 years ago

Getting inspiration from one-stop one-page info websites like frontend rescue

For this issue, I'd vote for a link and move on.

If you're considering a major design revamp, I'd prefer something like this:

WDYT? (this should be discussed in a separate issue though)

sayanee commented 10 years ago

Definitely not a major revamp at the moment until in future when we have too many sections.

Agree with doing something quickly and integrating engineers.sg first. A simple embedding of the youtube playlist then ...

<iframe width="560" height="315" src="//www.youtube.com/embed/_8dAbjQqnT0?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>
sayanee commented 10 years ago

feedback please :tada: - check on staging

image

sayanee commented 10 years ago

feedback from @laktek to randomise the display of the video using this stackoverflow answer :+1:

laktek commented 10 years ago

:+1: thanks

sayanee commented 10 years ago

trying to generate a random number between 1 and the total number of videos in the playlist

alyssaq commented 10 years ago

Looks good :)

miccheng commented 10 years ago

Yeah, randomized would be good.

On Saturday, September 27, 2014, Alyssa Quek notifications@github.com wrote:

Looks good :)

— Reply to this email directly or view it on GitHub https://github.com/webuildsg/webuild/issues/82#issuecomment-57050243.

Regards,

Michael Cheng CM Mobile: +65 9185 5166 LinkedIn: http://sg.linkedin.com/in/miccheng

sayanee commented 10 years ago

Had to use the max number of videos in the playlist as a static value 32 :cry: Seems like there's no easy way to just get the number without integrating the latest YouTube V3 API.

Let's watch the trend on how often new videos are added and then maybe we can scrap the playlist page for just the total number on the backend with jsdom :stuck_out_tongue_closed_eyes:

For now, static is cool i guess YAGNI

miccheng commented 10 years ago

I think you should be using this embed link instead:

<iframe width="560" height="315" src="//www.youtube.com/embed/videoseries?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>

Cos it seems to be stuck at the 2nd video right now.

shiawuen commented 10 years ago

Remove fluidvids, replace it with this technique http://www.mademyday.de/css-height-equals-width-with-pure-css.html

Addon

One possible reason that the randomization not working in because iframe might be ignoring the src set after it's rendered (have to reconfirm this)

One solution is to not render the iframe in HTML, do it in runtime

var ifr = document.createElement('iframe')
ifr.src = src
ifr.width = width
ifr.height = height
ifr.id = 'playlist'
shiawuen commented 10 years ago

Ignore the previous comment :P

change this line to

From

|   <iframe id="playlist" width="560" height="315" src="//www.youtube.com/embed/_8dAbjQqnT0?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>

To

|   <iframe id="playlist" width="560" height="315" src="//www.youtube.com/embed/PhYriLMnLHI?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>

And this line to

From

newPlaylistAttribute = '//www.youtube.com/embed/_8dAbjQqnT0?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1&index=' + rand1toTotalVideo;

To

newPlaylistAttribute = '//www.youtube.com/embed/PhYriLMnLHI?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1&index=' + rand1toTotalVideo;
sayanee commented 10 years ago

so every time a new video is added to this playlist, the url changes :unamused: and hence the randome indexing does not work and the video gets stuck to the first video of the old playlist.

now the url is:

//www.youtube.com/embed/MbZZy8GbCUE?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1

instead of

//www.youtube.com/embed/PhYriLMnLHI?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1
miccheng commented 10 years ago

Have you tried using this one?

//www.youtube.com/embed/videoseries?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1