Improve layout
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
e.clearSelection();
|
e.clearSelection();
|
||||||
});
|
});
|
||||||
|
|
||||||
var codepenButton = document.getElementById('codepen-button');
|
var codepenButton = document.getElementsByClassName('codepen-button')[0];
|
||||||
if (codepenButton) {
|
if (codepenButton) {
|
||||||
codepenButton.onclick = function(event) {
|
codepenButton.onclick = function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|||||||
@@ -91,9 +91,14 @@ pre[class*="language-"] {
|
|||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre>legend {
|
||||||
|
font-size: 100%;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.source-controls {
|
.source-controls {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: 20px;
|
margin-top: 10px;
|
||||||
right: 40px;
|
right: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,12 +106,12 @@ pre[class*="language-"] {
|
|||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#copy-button {
|
.copy-button {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#codepen-button {
|
.codepen-button {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
|
<!-- <a class="codepen-button pull-right"><i class="fa fa-codepen"></i> Edit</a> -->
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4 id="title">{{ title }}</h4>
|
<h4 id="title">{{ title }}</h4>
|
||||||
{{{ contents }}}
|
{{{ contents }}}
|
||||||
@@ -114,29 +115,15 @@
|
|||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="source-controls">
|
<div class="source-controls">
|
||||||
<!-- <a id="codepen-button"><i class="fa fa-codepen"></i> Edit</a> -->
|
<a class="copy-button" id="copy-html-button" data-clipboard-target="#example-html-source"><i class="fa fa-clipboard"></i> Copy</a>
|
||||||
</div>
|
</div>
|
||||||
<form method="POST" id="codepen-form" target="_blank" action="https://codepen.io/pen/define/">
|
<pre><legend>index.html</legend><code id="example-html-source" class="language-markup"><!DOCTYPE html>
|
||||||
<textarea class="hidden" name="title">{{ title }}</textarea>
|
|
||||||
<textarea class="hidden" name="description">{{ shortdesc }}</textarea>
|
|
||||||
<textarea class="hidden" name="js">{{ js.source }}</textarea>
|
|
||||||
<textarea class="hidden" name="css">{{ css.source }}</textarea>
|
|
||||||
<textarea class="hidden" name="html">{{ contents }}</textarea>
|
|
||||||
<input type="hidden" name="data">
|
|
||||||
</form>
|
|
||||||
<hr>
|
|
||||||
<pre>index.html</pre>
|
|
||||||
<div class="source-controls">
|
|
||||||
<a id="copy-html-button" data-clipboard-target="#example-html-source"><i class="fa fa-clipboard"></i> Copy</a>
|
|
||||||
</div>
|
|
||||||
<pre><code id="example-html-source" class="language-markup"><!DOCTYPE html>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
<link rel="stylesheet" href="https://openlayers.org/en/v{{ olVersion }}/css/ol.css" type="text/css">
|
<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 -->
|
<!-- 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>
|
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>{{#if extraHead.remote}}
|
||||||
{{#if extraHead.remote}}
|
|
||||||
{{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}}
|
{{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}}
|
||||||
<style>
|
<style>
|
||||||
{{ indent css.source spaces=6 }} </style>{{/if}}
|
{{ indent css.source spaces=6 }} </style>{{/if}}
|
||||||
@@ -145,12 +132,12 @@
|
|||||||
{{ indent contents spaces=4 }} <script src="index.js"></script>
|
{{ indent contents spaces=4 }} <script src="index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html></code></pre>
|
</html></code></pre>
|
||||||
<br>
|
</div>
|
||||||
<pre>index.js</pre>
|
<div class="row-fluid">
|
||||||
<div class="source-controls">
|
<div class="source-controls">
|
||||||
<a id="copy-js-button" data-clipboard-target="#example-js-source"><i class="fa fa-clipboard"></i> Copy</a>
|
<a class="copy-button" id="copy-js-button" data-clipboard-target="#example-js-source"><i class="fa fa-clipboard"></i> Copy</a>
|
||||||
</div>
|
</div>
|
||||||
<pre><code id="example-js-source" class="language-js">{{ js.source }}</code></pre>
|
<pre><legend>index.js</legend><code id="example-js-source" class="language-js">{{ js.source }}</code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user