Skip to content

Commit

Permalink
clean up files
Browse files Browse the repository at this point in the history
  • Loading branch information
iamfrank committed Nov 30, 2023
1 parent 7e8999f commit 4bc5b80
Show file tree
Hide file tree
Showing 25 changed files with 2,057 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/build-es.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { stylusLoader } from 'esbuild-stylus-loader'
console.log('--------------------------')
console.log('Building ES module')

const destinations = ['dist', 'examples']
const destinations = ['dist', 'docs']

// Production build

Expand Down
2 changes: 1 addition & 1 deletion build/build-examples.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ try {
code = code.replace('InsertCodeSRIHere', code_sri_str)
temp = temp.replace('InsertCodeExampleHere', code)

await writeHTML(`examples/${ file }`, temp)
await writeHTML(`docs/${ file }`, temp)

}

Expand Down
Binary file removed doc/dawa.png
Binary file not shown.
Binary file removed doc/eksempel.png
Binary file not shown.
Binary file removed doc/google.1.png
Binary file not shown.
Binary file removed doc/google.2.png
Binary file not shown.
Binary file removed doc/osm.png
Binary file not shown.
146 changes: 146 additions & 0 deletions docs/advanced.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@

<!DOCTYPE html>
<html lang="da" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Advanced</title>

<link rel="shortcut icon" href="./okapi-small.png">

<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="./okapi.css" rel="stylesheet">

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>

</head>
<body>
<main> <div
id="map"
class="geomap"
data-type=""
data-center-lat="56.153673"
data-center-lon="10.214241"
data-zoom="10"
data-background="dtk_skaermkort_daempet"
data-mylocation="true"
data-fullscreen="true"
data-zoomslider="true"
data-layerswitcher="true"
data-mousewheelzoom="true"
data-extent='[-320000, 5600000, 1440000, 6800000]'
data-token="fd44f26ab5701c01ca9f570e507fe9ab"
style="height: 400px;">
</div>

<!--
Udskift 'data-token=' med din egen token fra Dataforsyningen.
Hvis ikke du har en token så log ind på ’Min side’ https://www.dataforsyningen.dk/
Opret en token og brug den i din applikation
Token i dette eksempel er midlertidig og udelukkende til test brug.
English
Replace the 'data-token=' with your own token from the Danish map supply.
If you do not have a token please log in to "My page" https://www.dataforsyningen.dk/
Create a token and use it in your application
Token in this example is temporary and solely for test use.
-->

<script type="module">
import okapi from './okapi.js'
var maps = new okapi.Initialize({});
</script>
</main>
<aside>
<pre>
<code class="language-markup">

&lt;!DOCTYPE html>
&lt;html lang="da">
&lt;head>
&lt;meta charset="utf-8">
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://cdn.jsdelivr.net/gh/SDFIdk/okapi@latest/dist/okapi.min.css" rel="stylesheet">
&lt;script src="https://cdn.jsdelivr.net/gh/SDFIdk/okapi@latest/lib/@dataforsyningen/okapi-1.9.2.min.js" integrity="sha384-SgEw9Obq1dyR6wtxJA65RKk3C/YrDqC0Dl79+dBxqQChkHJ/KRBCNKTsUq6Tmxal" crossorigin="anonymous">&lt;/script>


&lt;/head>
&lt;body>
&lt;main> &lt;div
id="map"
class="geomap"
data-type=""
data-center-lat="56.153673"
data-center-lon="10.214241"
data-zoom="10"
data-background="dtk_skaermkort_daempet"
data-mylocation="true"
data-fullscreen="true"
data-zoomslider="true"
data-layerswitcher="true"
data-mousewheelzoom="true"
data-extent='[-320000, 5600000, 1440000, 6800000]'
data-token="InsertYourTokenHere"
style="height: 400px;">
&lt;/div>

&lt;!--
Udskift 'data-token=' med din egen token fra Dataforsyningen.
Hvis ikke du har en token så log ind på ’Min side’ https://www.dataforsyningen.dk/
Opret en token og brug den i din applikation
Token i dette eksempel er midlertidig og udelukkende til test brug.

English
Replace the 'data-token=' with your own token from the Danish map supply.
If you do not have a token please log in to "My page" https://www.dataforsyningen.dk/
Create a token and use it in your application
Token in this example is temporary and solely for test use.
-->

&lt;script type="module">
import okapi from './okapi.js'
var maps = new okapi.Initialize({});
&lt;/script>
&lt;/main>
&lt;/body>
&lt;/html>

</code>
</pre>
<script>
(function(){
Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (env) {
var linkCopy = document.createElement('a');
linkCopy.textContent = ' Copy';

if (!ClipboardJS) {
callbacks.push(registerClipboard);
} else {
registerClipboard();
}

return linkCopy;

function registerClipboard() {
var clip = new ClipboardJS(linkCopy, {
'text': function () {
return env.code;
}
});


clip.on('success', function() {
linkCopy.textContent = ' Copied!';
});
}
});
})();
</script>
</aside>
</body>
</html>
7 changes: 7 additions & 0 deletions docs/clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4bc5b80

Please sign in to comment.