mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
biome
This commit is contained in:
@@ -35,13 +35,13 @@ function initMap() {
|
||||
document.getElementById('mapbg-image').remove()
|
||||
})
|
||||
|
||||
let nav = new maplibregl.NavigationControl({ showCompass: false })
|
||||
const nav = new maplibregl.NavigationControl({ showCompass: false })
|
||||
map.addControl(nav, 'top-right')
|
||||
|
||||
// let scale = new maplibregl.ScaleControl()
|
||||
// map.addControl(scale)
|
||||
|
||||
let attrib = new maplibregl.AttributionControl({
|
||||
const attrib = new maplibregl.AttributionControl({
|
||||
compact: false,
|
||||
})
|
||||
map.addControl(attrib)
|
||||
@@ -50,7 +50,7 @@ function initMap() {
|
||||
}
|
||||
|
||||
function selectStyle(style) {
|
||||
const styleUrl = 'https://tiles.openfreemap.org/styles/' + style.split('-')[0]
|
||||
const styleUrl = `https://tiles.openfreemap.org/styles/${style.split('-')[0]}`
|
||||
map.setStyle(styleUrl)
|
||||
|
||||
if (style === 'liberty-3d') {
|
||||
@@ -75,9 +75,9 @@ initMap()
|
||||
|
||||
const buttons = document.querySelectorAll('.button-container .btn')
|
||||
|
||||
buttons.forEach(button => {
|
||||
button.addEventListener('click', function (event) {
|
||||
buttons.forEach(button => button.classList.remove('selected'))
|
||||
buttons.forEach((button) => {
|
||||
button.addEventListener('click', (event) => {
|
||||
buttons.forEach((button) => button.classList.remove('selected'))
|
||||
button.classList.add('selected')
|
||||
|
||||
const style = event.target.getAttribute('data-style')
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
const { title } = Astro.props
|
||||
|
||||
import { Content as Sponsor } from '../content/donate/sponsor.md'
|
||||
import { Content as Pro } from '../content/donate/pro.md'
|
||||
import { Content as Sponsor } from '../content/donate/sponsor.md'
|
||||
---
|
||||
|
||||
<Sponsor />
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro'
|
||||
import Map from '../components/Map.astro'
|
||||
import Logo from '../components/Logo.astro'
|
||||
import Donate from '../components/Donate.astro'
|
||||
import Logo from '../components/Logo.astro'
|
||||
import Map from '../components/Map.astro'
|
||||
import Layout from '../layouts/Layout.astro'
|
||||
|
||||
import { Content as WhatisText } from '../content/index/whatis.md'
|
||||
import { Content as BeforeDonate } from '../content/index/before_donate.md'
|
||||
import { Content as AfterDonate } from '../content/index/after_donate.md'
|
||||
import { Content as BeforeDonate } from '../content/index/before_donate.md'
|
||||
import { Content as WhatisText } from '../content/index/whatis.md'
|
||||
---
|
||||
|
||||
<Layout title="OpenFreeMap">
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro'
|
||||
import Map from '../components/Map.astro'
|
||||
import Layout from '../layouts/Layout.astro'
|
||||
|
||||
import { Content as MaplibreText } from '../content/how_to_use/maplibre.md'
|
||||
import { Content as MapboxText } from '../content/how_to_use/mapbox.md'
|
||||
import { Content as LeafletText } from '../content/how_to_use/leaflet.md'
|
||||
import { Content as MobileText } from '../content/how_to_use/mobile.md'
|
||||
import { Content as CustomStylesText } from '../content/how_to_use/custom_styles.md'
|
||||
import { Content as SelfHostingText } from '../content/how_to_use/self_hosting.md'
|
||||
import Logo from '../components/Logo.astro'
|
||||
import Donate from '../components/Donate.astro'
|
||||
import Logo from '../components/Logo.astro'
|
||||
import { Content as CustomStylesText } from '../content/how_to_use/custom_styles.md'
|
||||
import { Content as LeafletText } from '../content/how_to_use/leaflet.md'
|
||||
import { Content as MapboxText } from '../content/how_to_use/mapbox.md'
|
||||
import { Content as MaplibreText } from '../content/how_to_use/maplibre.md'
|
||||
import { Content as MobileText } from '../content/how_to_use/mobile.md'
|
||||
import { Content as SelfHostingText } from '../content/how_to_use/self_hosting.md'
|
||||
---
|
||||
|
||||
<Layout title="OpenFreeMap Quick Start Guide">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import 'reset.css';
|
||||
@import 'global.css';
|
||||
@import "reset.css";
|
||||
@import "global.css";
|
||||
/* */
|
||||
@import 'map.css';
|
||||
@import "map.css";
|
||||
|
||||
@@ -2,7 +2,7 @@ body {
|
||||
line-height: 1.5;
|
||||
font-size: 17px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
|
||||
font-family: Avenir, Montserrat, Corbel, "URW Gothic", source-sans-pro, sans-serif;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
}
|
||||
@@ -24,7 +24,7 @@ h6 {
|
||||
margin-top: 3em;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.2;
|
||||
font-family: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro,
|
||||
font-family: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro,
|
||||
sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
background-image: url('/berlin.webp');
|
||||
background-image: url("/berlin.webp");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
@@ -25,11 +25,7 @@
|
||||
}
|
||||
|
||||
.mapbg-attrib {
|
||||
font:
|
||||
12px / 20px Helvetica Neue,
|
||||
Arial,
|
||||
Helvetica,
|
||||
sans-serif;
|
||||
font: 12px / 20px Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
background-color: hsla(0, 0%, 100%, 0.5);
|
||||
padding: 0 5px;
|
||||
bottom: 0;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/base",
|
||||
"extends": "astro/tsconfigs/base"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user