Skip to content

Commit

Permalink
biome
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Sep 25, 2024
1 parent f9955f7 commit c310271
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 30 deletions.
12 changes: 6 additions & 6 deletions website/public/scripts/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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') {
Expand All @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Donate.astro
Original file line number Diff line number Diff line change
@@ -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 />
Expand Down
10 changes: 5 additions & 5 deletions website/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
12 changes: 6 additions & 6 deletions website/src/pages/quick_start.astro
Original file line number Diff line number Diff line change
@@ -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 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 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'
---

<Layout title="OpenFreeMap Quick Start Guide">
Expand Down
6 changes: 3 additions & 3 deletions website/src/styles/_style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'reset.css';
@import 'global.css';
@import "reset.css";
@import "global.css";
/* */
@import 'map.css';
@import "map.css";
4 changes: 2 additions & 2 deletions website/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
8 changes: 2 additions & 6 deletions website/src/styles/map.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "astro/tsconfigs/base",
"extends": "astro/tsconfigs/base"
}

0 comments on commit c310271

Please sign in to comment.