From c967587b95043a72108bc0ed4d55be259b607341 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 17 Nov 2016 11:40:11 -0300 Subject: [PATCH] Pym and Iframe support embed --- client/coral-embed-stream/style/default.css | 1 + client/coral-framework/reducers/auth.js | 2 +- client/coral-sign-in/components/styles.css | 3 +- views/article.ejs | 37 +++++++++++++++------ views/embed-stream.ejs | 16 +++++---- views/embed/stream.ejs | 2 +- 6 files changed, 41 insertions(+), 20 deletions(-) diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index 2f7394d4d..285dd3cb9 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -4,6 +4,7 @@ body { width: 100%; font-size: 12px; margin: 0; + min-height: 700px; } button { diff --git a/client/coral-framework/reducers/auth.js b/client/coral-framework/reducers/auth.js index 5c2335f17..bf7fef368 100644 --- a/client/coral-framework/reducers/auth.js +++ b/client/coral-framework/reducers/auth.js @@ -29,7 +29,7 @@ export default function auth (state = initialState, action) { })); case actions.CHANGE_VIEW : return state - .set('signUpError', '') + .set('signInError', '') .set('view', action.view); case actions.CLEAN_STATE: return initialState; diff --git a/client/coral-sign-in/components/styles.css b/client/coral-sign-in/components/styles.css index 9cd7bd326..81864eb2f 100644 --- a/client/coral-sign-in/components/styles.css +++ b/client/coral-sign-in/components/styles.css @@ -1,9 +1,8 @@ .dialog { - width: 400px; - border: none; border: none; box-shadow: 0 9px 46px 8px rgba(0, 0, 0, 0.14), 0 11px 15px -7px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.2); width: 280px; + top: 10px; } .header { diff --git a/views/article.ejs b/views/article.ejs index 95c0d7904..7d168f960 100644 --- a/views/article.ejs +++ b/views/article.ejs @@ -3,23 +3,40 @@ - - + -
+

<%= title %>

-

Lorem ipsum dolor sponge amet, consectetur adipiscing clam. Ut lobortis sollicitudin pillar a ornare. Curabitur dignissim vestibulum cay non rhoncus. Cras laoreet ante vel nunc hendrerit, shelf imperdiet neque egestas. Suspendisse aliquet iaculis fermentum. Talk volutpat, tellus posuere laoreet consequat, mi lacus laoreet massa, sed vehicula mauris velit non lectus. Integer non trust nec neque congue faucibus porttitor sit amet elkhorn.

+

+ Lorem ipsum dolor sponge amet, consectetur adipiscing clam. + Ut lobortis sollicitudin pillar a ornare. Curabitur dignissim + vestibulum cay non rhoncus. Cras laoreet ante vel nunc hendrerit, + shelf imperdiet neque egestas. Suspendisse aliquet iaculis fermentum. + Talk volutpat, tellus posuere laoreet consequat, mi lacus laoreet massa, + sed vehicula mauris velit non lectus. Integer non trust nec neque congue + faucibus porttitor sit amet elkhorn. +

Visit the moderation console

+
+
-
- - -
+ + + diff --git a/views/embed-stream.ejs b/views/embed-stream.ejs index 36f7ce43b..e1ddb17e7 100644 --- a/views/embed-stream.ejs +++ b/views/embed-stream.ejs @@ -11,18 +11,22 @@ body, #root { width: 100%; height: 100%; - margin: 0; - background: #fff; + min-height: 600px; + margin: 0; + background: #fff; }
+ + - - + var pymParent = new pym.Parent('coralStreamEmbed', '/embed/stream', {title: 'Talk Comments'}); + pymParent.onMessage('height', function(height) { + document.querySelector('#coralStreamEmbed iframe').height = height + 'px'; + }); + diff --git a/views/embed/stream.ejs b/views/embed/stream.ejs index dd7142c3b..5cdef0811 100644 --- a/views/embed/stream.ejs +++ b/views/embed/stream.ejs @@ -7,7 +7,7 @@ rel="stylesheet"> -
+