diff --git a/static/css/playground-embed.css b/static/css/playground-embed.css index 73871a0..8ca369e 100644 --- a/static/css/playground-embed.css +++ b/static/css/playground-embed.css @@ -13,13 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -.font-ico { - font-size: 26px; -} - .header { margin: 0; - padding: 10px; + padding: 5px; } .header .gravatar { @@ -27,23 +23,19 @@ border-radius: 13px; } -.header > .fn-right { - margin-top: 10px; -} - .header .logo { - height: 36px; + height: 23px; margin-top: -4px; } .share-panel { position: absolute; z-index: 20; - width: 258px; - padding: 10px 10px; + width: 226px; + padding: 5px 0px; right: 0px; line-height: normal; - top: 57px; + top: 34px; } .share-panel .font-ico { @@ -56,14 +48,39 @@ transform:rotate(360deg); } +.footer { + height: 30px; + text-shadow: 0 0 0; +} + #editorDiv { - width: 60%; - float: left; + width: 100%; + height: 70%; } #output { - width: 40%; - float: right; + height: 30%; + width: 100%; border-width: 0; - border-left: 1px solid #919191; + margin: 0; + padding: 0; + border-top: 1px solid #919191; +} + +#dialogShare { + margin: 10px 15px 0; + line-height: 28px; +} + +#dialogShare a { + white-space: pre-wrap; + word-wrap: break-word; +} + +.wrapper { + width: auto; +} + +.btn { + padding: 3px 5px; } \ No newline at end of file diff --git a/static/css/playground.css b/static/css/playground.css index d3d1a35..90754ba 100644 --- a/static/css/playground.css +++ b/static/css/playground.css @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -.font-ico { - font-size: 26px; -} - .header { margin: 0; padding: 10px; } +.font-ico { + font-size: 26px; +} + .header .gravatar { width: 26px; border-radius: 13px; @@ -56,6 +56,11 @@ transform:rotate(360deg); } +.footer { + height: 30px; + text-shadow: 0 0 0; +} + #editorDiv { width: 60%; float: left; @@ -65,10 +70,17 @@ width: 40%; float: right; border-width: 0; + margin: 0; + padding: 0; border-left: 1px solid #919191; } #dialogShare { - margin: 35px 100px 0 100px; + margin: 10px 15px 0; line-height: 28px; +} + +#dialogShare a { + white-space: pre-wrap; + word-wrap: break-word; } \ No newline at end of file diff --git a/static/js/playground.js b/static/js/playground.js index 179b7cf..504ecb5 100644 --- a/static/js/playground.js +++ b/static/js/playground.js @@ -18,18 +18,21 @@ var playground = { editor: undefined, pid: undefined, _resize: function () { - $("#editor, #output").height($(window).height() - 57 - $(".footer").height()); - playground.editor.setSize("auto", $("#editor").height() + "px"); + if (config.embed) { + $("#editorDiv").parent().height($(window).height() - 35 - $(".footer").height()); + playground.editor.setSize("auto", ($("#editorDiv").parent().height() * 0.7) + "px"); + } else { + $("#editor, #output").height($(window).height() - 58 - $(".footer").height()); + playground.editor.setSize("auto", $("#editor").height() + "px"); + } }, _initShare: function () { $("#dialogShare").dialog({ "modal": true, - "height": 460, - "width": 800, + "height": 200, + "width": 560, "title": config.label.share, - "hideFooter": true, - "afterOpen": function () { - } + "hideFooter": true }); }, _initWideShare: function () { @@ -307,7 +310,7 @@ var playground = { var html = '
' + url + "
"; html += '' + data.shortURL + '
'; - html += '
'; + html += '
'; html += '
'; $("#dialogShare").html(html); diff --git a/views/playground/index.html b/views/playground/index.html index cd09556..ec204e7 100644 --- a/views/playground/index.html +++ b/views/playground/index.html @@ -12,10 +12,10 @@ + {{if .embed}}{{else}}{{end}} - @@ -79,7 +79,8 @@ "staticServer": "{{.conf.StaticServer}}", "channel": "{{.conf.Channel}}", "wideSessionId": "{{.session.ID}}", - "label": {{.i18n}} + "label": {{.i18n}}, + "embed": {{.embed}} }; function newWideRequest() { var ret = {