From ab24d9043ee0bbb29e60ad33b955a625f85a7cbc Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 7 Aug 2015 12:36:16 -0600 Subject: [PATCH] Minimal source control links --- config/examples/example.html | 16 +++++++++------- examples/resources/common.js | 8 ++++++++ examples/resources/layout.css | 30 ++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/config/examples/example.html b/config/examples/example.html index c4fb84e538..3208d1b1d9 100644 --- a/config/examples/example.html +++ b/config/examples/example.html @@ -4,12 +4,13 @@ + + {{{ extraHead }}} {{{ css.tag }}} - {{ title }} @@ -36,16 +37,18 @@
-
-
- - +
+ Copy + Edit +
+ -
<!DOCTYPE html>
+        
+        
<!DOCTYPE html>
 <html>
 <head>
 <title>{{ title }}</title>
@@ -71,7 +74,6 @@
 </script>
 </body>
 </html>
-
diff --git a/examples/resources/common.js b/examples/resources/common.js index 2609dbbd7c..82a902d824 100644 --- a/examples/resources/common.js +++ b/examples/resources/common.js @@ -10,6 +10,14 @@ }); } + var fiddleButton = document.getElementById('jsfiddle-button'); + if (fiddleButton) { + fiddleButton.onclick = function(event) { + event.preventDefault(); + document.getElementById('jsfiddle-form').submit(); + }; + } + if (window.location.host === 'localhost:3000') { return; } diff --git a/examples/resources/layout.css b/examples/resources/layout.css index 1bdcf161f4..ab0be1d8fa 100644 --- a/examples/resources/layout.css +++ b/examples/resources/layout.css @@ -59,6 +59,36 @@ ol.inline>li { font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif; } +pre[class*="language-"] { + margin-top: 20px; + background: #FFFFFF; +} + +#source-controls { + position: absolute; + margin-top: 20px; + right: 40px; +} + +#source-controls a { + margin-left: 15px; +} + +#copy-button { + text-decoration: none; + cursor: pointer; +} + +#jsfiddle-button { + text-decoration: none; + cursor: pointer; +} + +pre { + border: 1px solid #eee; + border-radius: 0; +} + #tags, #shortdesc, .hidden { display: none; }