diff --git a/examples/resources/common.js b/examples/resources/common.js index 623f8bea92..8bfed4ab7b 100644 --- a/examples/resources/common.js +++ b/examples/resources/common.js @@ -8,7 +8,7 @@ e.clearSelection(); }); - var codepenButton = document.getElementById('codepen-button'); + var codepenButton = document.getElementsByClassName('codepen-button')[0]; if (codepenButton) { codepenButton.onclick = function(event) { event.preventDefault(); diff --git a/examples/resources/layout.css b/examples/resources/layout.css index 3cc66a1072..a1873a1222 100644 --- a/examples/resources/layout.css +++ b/examples/resources/layout.css @@ -91,9 +91,14 @@ pre[class*="language-"] { background: #FFFFFF; } +pre>legend { + font-size: 100%; + font-weight: bold; +} + .source-controls { position: absolute; - margin-top: 20px; + margin-top: 10px; right: 40px; } @@ -101,12 +106,12 @@ pre[class*="language-"] { margin-left: 15px; } -#copy-button { +.copy-button { text-decoration: none; cursor: pointer; } -#codepen-button { +.codepen-button { text-decoration: none; cursor: pointer; } diff --git a/examples/templates/example.html b/examples/templates/example.html index 83fc621c19..f3a0df0734 100644 --- a/examples/templates/example.html +++ b/examples/templates/example.html @@ -99,6 +99,7 @@
index.html-
<!DOCTYPE html>
+ <!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
<link rel="stylesheet" href="https://openlayers.org/en/v{{ olVersion }}/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
- <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
- {{#if extraHead.remote}}
+ <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>{{#if extraHead.remote}}
{{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}}
<style>
{{ indent css.source spaces=6 }} </style>{{/if}}
@@ -145,12 +132,12 @@
{{ indent contents spaces=4 }} <script src="index.js"></script>
</body>
</html>
-
- index.js
+