Skip to content

Commit

Permalink
Deploy andrewgryan/leaflet-html to andrewgryan/leaflet-html:gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed May 4, 2024
0 parents commit 59ef54a
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!doctype html>
<title>404 Not Found</title>
<h1>404 Not Found</h1>
126 changes: 126 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>

[data-leaflet-html] {
block-size: 40ch;
isolation: isolate;
z-index: 1;
}
body {
font-family: system-ui;
line-height: 1.6;
}
h1, h2 {
font-weight: 100;
}

pre {
padding-inline: 0.75rem;
padding-block: 0.5rem;
border-radius: 0.2rem;
overflow-x: scroll;
}

.wrapper {
inline-size: 80ch;
margin-inline: auto;
}
</style>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""
/>
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script
src="https://unpkg.com/leaflet-html@latest/dist/leaflet-html.umd.js"
></script>
</head>
<body>
<div class="wrapper">
<h1 id="leaflet-html">Leaflet HTML</h1>
<p><a href="https://leafletjs.com/">LeafletJS</a> is a library geared towards map based visualisations.
Leaflet HTML expresses that JavaScript API in HTML.</p>
<h2 id="design-principles">Design principles</h2>
<p>Leaflet HTML tries to model Leaflet's API as closely as possible to avoid confusion and to ease onboarding.
Naming conventions are followed where possible.
The hierarchy in the JS API is replicated by nesting HTML elements.</p>
<h2 id="example">Example</h2>
<p>The following is a live running example of Leaflet HTML.</p>
<div data-leaflet-html data-center="[39.61, -105.02]" data-zoom="10">
<div data-control-layers>
<div data-base-maps>
<div
data-tile-layer
data-name="CartoDB_Voyager"
data-url-template="https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png"
data-attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>'
data-max-zoom="20"
data-subdomains="abcd"
data-show
></div>
</div>
<div data-overlay-maps>
<div data-layer-group data-name="Cities">
<div data-marker data-lat-lng="[39.61, -105.02]">
<div data-popup data-content="This is Littleton, CO."></div>
</div>
<div data-marker data-lat-lng="[39.74, -104.99]">
<div data-popup data-content="This is Denver, CO."></div>
</div>
<div data-marker data-lat-lng="[39.73, -104.8]">
<div data-popup data-content="This is Aurora, CO."></div>
</div>
<div data-marker data-lat-lng="[39.77, -105.23]">
<div data-popup data-content="This is Golden, CO."></div>
</div>
</div>
</div>
</div>
</div>
<pre data-lang="html" style="background-color:#2b303b;color:#c0c5ce;" class="language-html "><code class="language-html" data-lang="html"><span style="color:#65737e;">&lt;!-- Example --&gt;
</span><span>&lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-leaflet-html data-center</span><span>=&quot;</span><span style="color:#a3be8c;">[39.61, -105.02]</span><span>&quot; </span><span style="color:#d08770;">data-zoom</span><span>=&quot;</span><span style="color:#a3be8c;">10</span><span>&quot;&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-control-layers</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-base-maps</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div
</span><span> </span><span style="color:#d08770;">data-tile-layer
</span><span> </span><span style="color:#d08770;">data-name</span><span>=&quot;</span><span style="color:#a3be8c;">CartoDB_Voyager</span><span>&quot;
</span><span> </span><span style="color:#d08770;">data-url-template</span><span>=&quot;</span><span style="color:#a3be8c;">https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png</span><span>&quot;
</span><span> </span><span style="color:#d08770;">data-attribution</span><span>=&#39;</span><span style="color:#8fa1b3;">&amp;</span><span style="color:#d08770;">copy;</span><span style="color:#a3be8c;"> &lt;a href=&quot;https://www.openstreetmap.org/copyright&quot;&gt;OpenStreetMap&lt;/a&gt; contributors </span><span style="color:#8fa1b3;">&amp;</span><span style="color:#d08770;">copy;</span><span style="color:#a3be8c;"> &lt;a href=&quot;https://carto.com/attributions&quot;&gt;CARTO&lt;/a&gt;</span><span>&#39;
</span><span> </span><span style="color:#d08770;">data-max-zoom</span><span>=&quot;</span><span style="color:#a3be8c;">20</span><span>&quot;
</span><span> </span><span style="color:#d08770;">data-subdomains</span><span>=&quot;</span><span style="color:#a3be8c;">abcd</span><span>&quot;
</span><span> </span><span style="color:#d08770;">data-show
</span><span> &gt;&lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-overlay-maps</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-layer-group data-name</span><span>=&quot;</span><span style="color:#a3be8c;">Cities</span><span>&quot;&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>=&quot;</span><span style="color:#a3be8c;">[39.61, -105.02]</span><span>&quot;&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>=&quot;</span><span style="color:#a3be8c;">This is Littleton, CO.</span><span>&quot;&gt;&lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>=&quot;</span><span style="color:#a3be8c;">[39.74, -104.99]</span><span>&quot;&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>=&quot;</span><span style="color:#a3be8c;">This is Denver, CO.</span><span>&quot;&gt;&lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>=&quot;</span><span style="color:#a3be8c;">[39.73, -104.8]</span><span>&quot;&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>=&quot;</span><span style="color:#a3be8c;">This is Aurora, CO.</span><span>&quot;&gt;&lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>=&quot;</span><span style="color:#a3be8c;">[39.77, -105.23]</span><span>&quot;&gt;
</span><span> &lt;</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>=&quot;</span><span style="color:#a3be8c;">This is Golden, CO.</span><span>&quot;&gt;&lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span> &lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span><span>&lt;/</span><span style="color:#bf616a;">div</span><span>&gt;
</span></code></pre>

</div>
</body>
</html>
4 changes: 4 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Disallow:
Allow: /
Sitemap: https://andrewgryan.github.io/leaflet-html/sitemap.xml
6 changes: 6 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://andrewgryan.github.io/leaflet-html/</loc>
</url>
</urlset>

0 comments on commit 59ef54a

Please sign in to comment.