mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 06:22:16 +00:00
css
This commit is contained in:
@@ -24,5 +24,6 @@ function selectStyle(style) {
|
|||||||
map.setPitch(0)
|
map.setPitch(0)
|
||||||
map.setBearing(0)
|
map.setBearing(0)
|
||||||
|
|
||||||
document.getElementById('style-url-code').innerText = styleUrl
|
const spans = document.querySelectorAll('#style-url-code span')
|
||||||
|
spans[2].innerText = '/' + style
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,6 +138,11 @@ code {
|
|||||||
font-family: 'Nimbus Mono PS', 'Courier New', monospace;
|
font-family: 'Nimbus Mono PS', 'Courier New', monospace;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
background: #efefef;
|
background: #efefef;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
#style-url-code span {
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#map {
|
#map {
|
||||||
@@ -161,6 +166,13 @@ button {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-container {
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 600px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
/*button:hover { }*/
|
/*button:hover { }*/
|
||||||
/*button:focus { }*/
|
/*button:focus { }*/
|
||||||
/*button:active { }*/
|
/*button:active { }*/
|
||||||
@@ -198,3 +210,21 @@ hr {
|
|||||||
background-color: #555;
|
background-color: #555;
|
||||||
margin: 2em 0;
|
margin: 2em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 550px) {
|
||||||
|
body {
|
||||||
|
padding: 0 20px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.static,
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6,
|
||||||
|
.col-lbl,
|
||||||
|
p {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,13 +2,17 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
Choose a style:
|
Choose a style:
|
||||||
|
<div class="button-container">
|
||||||
<button onclick="selectStyle('bright')">Bright</button>
|
<button onclick="selectStyle('bright')">Bright</button>
|
||||||
<button onclick="selectStyle('liberty')">Liberty</button>
|
<button onclick="selectStyle('liberty')">Liberty</button>
|
||||||
<button onclick="selectStyle('positron')">Positron</button>
|
<button onclick="selectStyle('positron')">Positron</button>
|
||||||
|
</div>
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-bottom: 2em">
|
<p style="margin-bottom: 2em">
|
||||||
Use the following style in a MapLibre map:
|
Use the following style in a MapLibre map:
|
||||||
<code id="style-url-code">https://tiles.openfreemap.org/styles/liberty</code>
|
<code id="style-url-code">
|
||||||
|
<span>https://tiles.openfreemap.org</span><span>/styles</span><span>/liberty</span>
|
||||||
|
</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<input type="checkbox" id="col1" class="col-chk" />
|
<input type="checkbox" id="col1" class="col-chk" />
|
||||||
|
|||||||
Reference in New Issue
Block a user