From c7c0cb7d44599d516fe5f3109625e92c59cab02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 29 Mar 2019 15:35:09 +0100 Subject: [PATCH] imp: allow adding templates in xml tab --- playground.css | 23 +++++++--- src/playground.js | 41 ++++++++++++++---- src/samples.js | 104 ++++++++++++++++++++++++++-------------------- 3 files changed, 109 insertions(+), 59 deletions(-) diff --git a/playground.css b/playground.css index 1046bcec..0e02cbdb 100644 --- a/playground.css +++ b/playground.css @@ -75,27 +75,30 @@ body { margin-top: 8px; } -/* CONTENT ****************************************/ -.content { +/* RIGHT PANE ****************************************/ +.right-pane { background-color: lightgray; overflow: hidden; } -.content iframe { +.right-pane iframe { background-color: white; width: 100%; height: 100%; border: 0; } -.content .welcome { +.content { + height: 100%; +} +.right-pane .welcome { text-align: center; font-size: 30px; color: gray; margin-top: 50px; } -.content .url { +.right-pane .url { font-size: 20px; margin-top: 20px; } @@ -104,7 +107,15 @@ body { color: gray; } -.content .note { +.right-pane .note { font-size: 20px; margin-top: 20px; } + +.right-pane .error { + height: 100%; + padding-top: 40%; + font-size: 30px; + color: darkred; + text-align: center; +} diff --git a/src/playground.js b/src/playground.js index 890e1622..a7f5fb20 100644 --- a/src/playground.js +++ b/src/playground.js @@ -8,13 +8,16 @@ const MODES = { xml: "ace/mode/xml" }; +const DEFAULT_XML = ` +`; + const TEMPLATE = `