Skip to content

Commit 38ffcdf

Browse files
committed
changed to react-slides module
1 parent e3676f7 commit 38ffcdf

10 files changed

+45
-48
lines changed

events/docker_and_node.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{
66
"title": "Node.js OC - Docker and Node",
77
"description": "How Zillow is using Docker with Node.js.",
8-
"slides": "//www.slideshare.net/slideshow/embed_code/38980381",
8+
"slides": {
9+
"url": "//www.slideshare.net/slideshow/embed_code/38980381"
10+
},
911
"speaker": {
1012
"name": "Jeffrey Horn",
1113
"image": "https://avatars3.githubusercontent.com/u/1922957?v=2&s=460",

events/grunt.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{
66
"title": "GruntJS",
77
"description": "GruntJS",
8-
"slides": "http://benwas.com/grunt/",
8+
"slides": {
9+
"url": "http://benwas.com/grunt/"
10+
},
911
"speaker": {
1012
"name": "Benjamin Wasilewski",
1113
"github": "bwasilewski",

events/intro.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{
66
"title": "Intro To Node.JS",
77
"description": "Intro To Node.JS",
8-
"slides": "//www.slideshare.net/slideshow/embed_code/key/ncocU4wrfvCtfz",
8+
"slides": {
9+
"url": "//www.slideshare.net/slideshow/embed_code/key/ncocU4wrfvCtfz"
10+
},
911
"speaker": {
1012
"name": "Farsheed Atef",
1113
"twitter": "captainatef",

events/isomorphic_js.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{
66
"title": "Isomorphic Javascript",
77
"description": "Topic Bullet Points:\n\n• Introduce Divshot's need for code reuse between Node and browser\n\n• Introduce the solution and it's implication (namely Browserify and the numerous modules that solve isomorphic javascript problems) \n\n• hyperquest \n\n• through \n\n• filereader-stream \n\n• Introduce Divshot's solution using isomorphic Node-style code\n\n• Other various examples- Questions?",
8-
"slides": "//slides.com/scottcorgan/like-a-glove/embed",
8+
"slides": {
9+
"url": "//slides.com/scottcorgan/like-a-glove/embed"
10+
},
911
"speaker": {
1012
"bio": "Scott Corgan. Worked on Node since right before v0.6. Build E-commerce platforms, hosting platforms, and many many NPM modules. Currently working at Divshot as lead Node developer.",
1113
"name": "Scott Corgan",

events/node_devops.json

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
{
66
"title": "Node.js, the Universe and Everything",
77
"description": "Greenfield projects are great, but how do you integrate Node.js with an existing stack?\n\nThis month Mark does a deep dive on what he and his team @ Hightail are doing to build, release, and integrate Node.js with a diverse infrastructure and a polyglot application stack.",
8+
"slides": {
9+
"service": "speakerdeck",
10+
"id": "5234f6475cc24d97ad34ee9459654b26"
11+
},
812
"speaker": {
913
"name": "Mark Wilkerson",
1014
"image": "https://avatars1.githubusercontent.com/u/266110?v=3&s=460",

events/socketio.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{
66
"title": "Intro to Socket IO",
77
"description": "Intro to Socket IO",
8-
"slides": "//www.slideshare.net/slideshow/embed_code/key/xwnormQ2tU1yjb",
8+
"slides": {
9+
"url": "//www.slideshare.net/slideshow/embed_code/key/xwnormQ2tU1yjb"
10+
},
911
"speaker": {
1012
"name": "Eddy Kim"
1113
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"homepage": "https://github.com/javascriptoc/jsoc.io",
2424
"dependencies": {
2525
"moment": "2.10.6",
26-
"react": "0.13.3"
26+
"react": "0.13.3",
27+
"react-slides": "^1.0.0"
2728
},
2829
"devDependencies": {
2930
"css-loader": "0.16.0",

src/components/topic.ls

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require! {
44
\./speaker
55
'./video-embed'
6-
'./speaker-deck': slides
6+
'react-slides': slides
77
}
88

99
Slides = create-factory slides
@@ -20,7 +20,7 @@ module.exports = React.create-class({
2020
if video
2121
Video url: video.url
2222
if slides
23-
Slides url: slides
23+
Slides url: slides.url, service: slides.service, id: slides.id
2424
footer null,
2525
if speaker
2626
Speaker data: speaker

src/sass/components/_topic.sass

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
white-space: pre-wrap
99

1010

11-
.slide-frame
11+
.react-slides iframe
1212
margin-top: 1em
1313
width: 700px
14+
height: 390px;
1415
max-width: 100%
16+
@include aspect-ratio('16:9')
1517

16-
.video-frame
18+
.video-frame iframe
1719
margin-top: 1em
1820
width: 700px
21+
height: 390px;
1922
max-width: 100%
20-
21-
iframe
22-
overflow: hidden
23+
@include aspect-ratio('16:9')

src/sass/modules/_aspect-ratio.sass

+16-35
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
[data-aspect-ratio]
1+
2+
// Seriously?
3+
$ratios: ('3:1': 'padding-top: 33.33%')
4+
$ratios: map-merge($ratios, ('2:1': '50%'))
5+
$ratios: map-merge($ratios, ('16:9': '56.25%'))
6+
$ratios: map-merge($ratios, ('3:2': '66.66%'))
7+
$ratios: map-merge($ratios, ('4:3': '75%'))
8+
$ratios: map-merge($ratios, ('1:1': '100%'))
9+
$ratios: map-merge($ratios, ('3:4': '133.33%'))
10+
$ratios: map-merge($ratios, ('2:3': '150%'))
11+
$ratios: map-merge($ratios, ('9:16': '177.77%'))
12+
$ratios: map-merge($ratios, ('1:2': '200%'))
13+
$ratios: map-merge($ratios, ('1:3': '300%'))
14+
15+
@mixin aspect-ratio($ratio)
216
display: block
317
max-width: 100%
418
position: relative
519

620
&:before
721
content: ''
822
display: block
23+
padding-top: map-get($ratios,$ratio)
924

1025

1126
> *
@@ -15,37 +30,3 @@
1530
position: absolute
1631
top: 0
1732
width: 100%
18-
19-
20-
[data-aspect-ratio="3:1"]:before
21-
padding-top: 33.33%
22-
23-
[data-aspect-ratio="2:1"]:before
24-
padding-top: 50%
25-
26-
[data-aspect-ratio="16:9"]:before
27-
padding-top: 56.25%
28-
29-
[data-aspect-ratio="3:2"]:before
30-
padding-top: 66.66%
31-
32-
[data-aspect-ratio="4:3"]:before
33-
padding-top: 75%
34-
35-
[data-aspect-ratio="1:1"]:before
36-
padding-top: 100%
37-
38-
[data-aspect-ratio="3:4"]:before
39-
padding-top: 133.33%
40-
41-
[data-aspect-ratio="2:3"]:before
42-
padding-top: 150%
43-
44-
[data-aspect-ratio="9:16"]:before
45-
padding-top: 177.77%
46-
47-
[data-aspect-ratio="1:2"]:before
48-
padding-top: 200%
49-
50-
[data-aspect-ratio="1:3"]:before
51-
padding-top: 300%

0 commit comments

Comments
 (0)