- If you are currently using Mapbox, please change your libraries to
- MapLibre GL JS.
- MapLibre is based on the last open-source version of Mapbox GL JS before it went
- closed-source. Migrating should be as simple as changing the libraries, as long as you are not
- using any features specific to the 2.x or later releases.
-
-
-
-
-
-
-
-
-
A Leaflet-based snippet is coming soon.
-
-
-
-
-
-
-
-
- For mobile apps, you can use the same styles with
- MapLibre Native.
-
-
-
-
-
-
-
-
-
- You can customize the styles using the
- Maputnik editor. For example, you
- can remove labels, POIs, or change colors.
-
-
- When you use a customized style, you need to host the style JSON yourself and use its URL in
- MapLibre.
-
@@ -10,6 +10,7 @@ import { Content as Pricing } from '../content/pricing.md'
-
+
-
+
+
diff --git a/website_astro/src/content/how_to_use/custom_styles.md b/website_astro/src/content/how_to_use/custom_styles.md
new file mode 100644
index 0000000..b331bcf
--- /dev/null
+++ b/website_astro/src/content/how_to_use/custom_styles.md
@@ -0,0 +1,11 @@
+## Custom styles
+
+You can customize the styles using the [Maputnik](https://maputnik.github.io/) editor. For example, you can remove labels, POIs, or change colors.
+
+When you use a customized style, you need to host the style JSON yourself and use its URL in MapLibre.
+
+[Customize Bright](https://maputnik.github.io/editor?style=https://tiles.openfreemap.org/styles/bright)
+
+[Customize Liberty](https://maputnik.github.io/editor?style=https://tiles.openfreemap.org/styles/liberty)
+
+[Customize Positron](https://maputnik.github.io/editor?style=https://tiles.openfreemap.org/styles/positron)
diff --git a/website_astro/src/content/how_to_use/leaflet.md b/website_astro/src/content/how_to_use/leaflet.md
new file mode 100644
index 0000000..50e3011
--- /dev/null
+++ b/website_astro/src/content/how_to_use/leaflet.md
@@ -0,0 +1,3 @@
+## Using Leaflet?
+
+A Leaflet-based snippet is coming soon.
diff --git a/website_astro/src/content/how_to_use/mapbox.md b/website_astro/src/content/how_to_use/mapbox.md
new file mode 100644
index 0000000..7bf461c
--- /dev/null
+++ b/website_astro/src/content/how_to_use/mapbox.md
@@ -0,0 +1,3 @@
+## Using Mapbox?
+
+If you are currently using Mapbox, please change your libraries to [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/). MapLibre is based on the last open-source version of Mapbox GL JS before it went closed-source. Migrating should be as simple as changing the libraries, as long as you are not using any features specific to the 2.x or later releases.
diff --git a/website_astro/src/content/how_to_use/maplibre.md b/website_astro/src/content/how_to_use/maplibre.md
new file mode 100644
index 0000000..62ba439
--- /dev/null
+++ b/website_astro/src/content/how_to_use/maplibre.md
@@ -0,0 +1,22 @@
+## How to load MapLibre?
+
+Include [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) in the ``. If you are using npm, you can install the `maplibre-gl` package. Make sure to import the CSS as well.
+
+```html
+
+
+```
+
+Initialize it to a div like this:
+
+```html
+
+
+```
diff --git a/website_astro/src/content/how_to_use/mobile.md b/website_astro/src/content/how_to_use/mobile.md
new file mode 100644
index 0000000..685ba8b
--- /dev/null
+++ b/website_astro/src/content/how_to_use/mobile.md
@@ -0,0 +1,3 @@
+## Mobile Apps
+
+For mobile apps, you can use the same styles with [MapLibre Native](https://maplibre.org/).
diff --git a/website_astro/src/content/how_to_use/self_hosting.md b/website_astro/src/content/how_to_use/self_hosting.md
new file mode 100644
index 0000000..2e53e0b
--- /dev/null
+++ b/website_astro/src/content/how_to_use/self_hosting.md
@@ -0,0 +1,3 @@
+## Self-hosting
+
+You can also download our processed planet MBTiles and Btrfs images if you want to self-host yourself. Details can be found on [GitHub](https://github.com/hyperknot/openfreemap).
diff --git a/website_astro/src/content/pricing.md b/website_astro/src/content/index/donate.md
similarity index 98%
rename from website_astro/src/content/pricing.md
rename to website_astro/src/content/index/donate.md
index f24d5b6..8d794f6 100644
--- a/website_astro/src/content/pricing.md
+++ b/website_astro/src/content/index/donate.md
@@ -4,4 +4,4 @@ If we ever receive a **Diamond** level supporter, we'll put their logo on this p
When subscribing to a support plan, you receive an invoice for each of your payments.
-Note: if you want to make a single donation, feel free to cancel after the first payment. However, please understand that the nature of this project needs recurring donations to cover the server costs.
\ No newline at end of file
+Note: if you want to make a single donation, feel free to cancel after the first payment. However, please understand that the nature of this project needs recurring donations to cover the server costs.
diff --git a/website_astro/src/layouts/Layout.astro b/website_astro/src/layouts/Layout.astro
index 6837990..8324991 100644
--- a/website_astro/src/layouts/Layout.astro
+++ b/website_astro/src/layouts/Layout.astro
@@ -28,7 +28,7 @@ import '../styles/global.css'
-
+
diff --git a/website_astro/src/pages/_howto_use.astro b/website_astro/src/pages/_howto_use.astro
deleted file mode 100644
index 682ae3b..0000000
--- a/website_astro/src/pages/_howto_use.astro
+++ /dev/null
@@ -1,112 +0,0 @@
-
How to use OpenFreeMap in my website or app
-
-
-
-
-
-
- Include
- MapLibre GL JS
- in the <head>. If you are using npm, you can install the
- maplibre-gl package. Make sure to import the CSS as well.
-
- If you are currently using Mapbox, please change your libraries to
- MapLibre GL JS.
- MapLibre is based on the last open-source version of Mapbox GL JS before it went
- closed-source. Migrating should be as simple as changing the libraries, as long as you are not
- using any features specific to the 2.x or later releases.
-
-
-
-
-
-
-
-
-
A Leaflet-based snippet is coming soon.
-
-
-
-
-
-
-
-
- For mobile apps, you can use the same styles with
- MapLibre Native.
-
-
-
-
-
-
-
-
-
- You can customize the styles using the
- Maputnik editor. For example, you
- can remove labels, POIs, or change colors.
-
-
- When you use a customized style, you need to host the style JSON yourself and use its URL in
- MapLibre.
-
- You can also download our processed planet MBTiles and Btrfs images if you want to self-host
- yourself. Details can be found on
- GitHub.
-
-
-
-
\ No newline at end of file
diff --git a/website_astro/src/pages/how_to_use.astro b/website_astro/src/pages/how_to_use.astro
new file mode 100644
index 0000000..fec7638
--- /dev/null
+++ b/website_astro/src/pages/how_to_use.astro
@@ -0,0 +1,21 @@
+---
+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'
+---
+
+
+
How to use OpenFreeMap in your website or app
+
+
+
+
+
+
+
+
+
diff --git a/website_astro/src/pages/index.astro b/website_astro/src/pages/index.astro
index 1b0e116..037db1b 100644
--- a/website_astro/src/pages/index.astro
+++ b/website_astro/src/pages/index.astro
@@ -4,18 +4,16 @@ import Map from '../components/Map.astro'
import Logo from '../components/Logo.astro'
import Donate from '../components/Donate.astro'
-import { Content as WhatIs } from '../content/index/whatis.md'
-import { Content as Rest } from '../content/index/rest.md'
+import { Content as WhatisText } from '../content/index/whatis.md'
+import { Content as RestText } from '../content/index/rest.md'
---
-
+
-
-
-
+
diff --git a/website_astro/src/styles/global.css b/website_astro/src/styles/global.css
index 700957d..f66bad4 100644
--- a/website_astro/src/styles/global.css
+++ b/website_astro/src/styles/global.css
@@ -153,18 +153,18 @@ p {
}
pre {
- background: #efefef;
- font-size: 14px !important;
+ /*background: #efefef;*/
+ font-size: 14px;
max-width: 600px;
- margin: 0 auto 0.6em !important;
- overflow: scroll;
- font-weight: bold;
+ margin: 0 auto 0.6em;
+ /*overflow: scroll;*/
+ /*font-weight: bold;*/
}
-code {
- font-family: 'Nimbus Mono PS', 'Courier New', monospace !important;
- background: #efefef;
-}
+/*code {*/
+/* font-family: 'Nimbus Mono PS', 'Courier New', monospace !important;*/
+/* background: #efefef;*/
+/*}*/
#map-container {
width: 100%;