-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy andrewgryan/leaflet-html to andrewgryan/leaflet-html:gh-pages
- Loading branch information
GitHub Actions
committed
May 7, 2024
0 parents
commit 1637bc9
Showing
4 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: min(90%, 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='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <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;"><!-- Example --> | ||
</span><span><</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-leaflet-html data-center</span><span>="</span><span style="color:#a3be8c;">[39.61, -105.02]</span><span>" </span><span style="color:#d08770;">data-zoom</span><span>="</span><span style="color:#a3be8c;">10</span><span>"> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-control-layers</span><span>> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-base-maps</span><span>> | ||
</span><span> <</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>="</span><span style="color:#a3be8c;">CartoDB_Voyager</span><span>" | ||
</span><span> </span><span style="color:#d08770;">data-url-template</span><span>="</span><span style="color:#a3be8c;">https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png</span><span>" | ||
</span><span> </span><span style="color:#d08770;">data-attribution</span><span>='</span><span style="color:#8fa1b3;">&</span><span style="color:#d08770;">copy;</span><span style="color:#a3be8c;"> <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors </span><span style="color:#8fa1b3;">&</span><span style="color:#d08770;">copy;</span><span style="color:#a3be8c;"> <a href="https://carto.com/attributions">CARTO</a></span><span>' | ||
</span><span> </span><span style="color:#d08770;">data-max-zoom</span><span>="</span><span style="color:#a3be8c;">20</span><span>" | ||
</span><span> </span><span style="color:#d08770;">data-subdomains</span><span>="</span><span style="color:#a3be8c;">abcd</span><span>" | ||
</span><span> </span><span style="color:#d08770;">data-show | ||
</span><span> ></</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-overlay-maps</span><span>> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-layer-group data-name</span><span>="</span><span style="color:#a3be8c;">Cities</span><span>"> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>="</span><span style="color:#a3be8c;">[39.61, -105.02]</span><span>"> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>="</span><span style="color:#a3be8c;">This is Littleton, CO.</span><span>"></</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>="</span><span style="color:#a3be8c;">[39.74, -104.99]</span><span>"> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>="</span><span style="color:#a3be8c;">This is Denver, CO.</span><span>"></</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>="</span><span style="color:#a3be8c;">[39.73, -104.8]</span><span>"> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>="</span><span style="color:#a3be8c;">This is Aurora, CO.</span><span>"></</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-marker data-lat-lng</span><span>="</span><span style="color:#a3be8c;">[39.77, -105.23]</span><span>"> | ||
</span><span> <</span><span style="color:#bf616a;">div </span><span style="color:#d08770;">data-popup data-content</span><span>="</span><span style="color:#a3be8c;">This is Golden, CO.</span><span>"></</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span> </</span><span style="color:#bf616a;">div</span><span>> | ||
</span><span></</span><span style="color:#bf616a;">div</span><span>> | ||
</span></code></pre> | ||
|
||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |