diff --git a/website/blocks/index.md b/website/blocks/main.md similarity index 100% rename from website/blocks/index.md rename to website/blocks/main.md diff --git a/website/blocks/map.html b/website/blocks/map.html deleted file mode 100644 index 0ff48e2..0000000 --- a/website/blocks/map.html +++ /dev/null @@ -1,20 +0,0 @@ -
Choose a style:
- - -Use the following style in a MapLibre map:
-https://tiles.openfreemap.org/styles/liberty
diff --git a/website/blocks/howto_use.html b/website/blocks/map_howto.html
similarity index 79%
rename from website/blocks/howto_use.html
rename to website/blocks/map_howto.html
index fb50a2b..50d54c4 100644
--- a/website/blocks/howto_use.html
+++ b/website/blocks/map_howto.html
@@ -1,4 +1,23 @@
-How to use: In detail
+Choose a style:
+ + +Use the following style in a MapLibre map:
+https://tiles.openfreemap.org/styles/liberty
@@ -110,3 +129,4 @@
+
diff --git a/website/generate.py b/website/generate.py
index 1d005a7..00476a8 100755
--- a/website/generate.py
+++ b/website/generate.py
@@ -14,43 +14,21 @@ def generate():
shutil.rmtree(OUT_DIR, ignore_errors=True)
OUT_DIR.mkdir()
- make_index_html()
- make_howto_use()
- make_js()
+ template = open('template.html').read()
- make_static_page('privacy', 'Privacy Policy')
- make_static_page('tos', 'Terms of Services')
-
- copy_assets()
-
-
-def make_index_html():
- template = open('template_index.html').read()
-
- main_md = open('blocks/index.md').read()
+ main_md = open('blocks/main.md').read()
main_html = marko.convert(main_md)
- template = template.replace('{body}', main_html)
+ index_html = template.replace('{main}', main_html)
- map_howto = open('blocks/map.html').read()
- template = template.replace('', map_howto)
+ map_howto = open('blocks/map_howto.html').read()
+ index_html = index_html.replace('', map_howto)
support_plans = open('blocks/support_plans.html').read()
- template = template.replace('', support_plans)
+ index_html = index_html.replace('', support_plans)
- open(OUT_DIR / 'index.html', 'w').write(template)
+ open(OUT_DIR / 'index.html', 'w').write(index_html)
-
-def make_howto_use():
- template = open('template_howto_use.html').read()
-
- map_howto = open('blocks/map.html').read()
- template = template.replace('', map_howto)
-
- open(OUT_DIR / 'howto_use.html', 'w').write(template)
-
-
-def make_js():
pricing_json = json.load(open('assets/pricing.json'))
support_plans_js = open('assets/support_plans.js').read()
support_plans_js = support_plans_js.replace(
@@ -58,6 +36,10 @@ def make_js():
)
open(OUT_DIR / 'support_plans.js', 'w').write(support_plans_js)
+ make_static_page('privacy', 'Privacy Policy')
+ make_static_page('tos', 'Terms of Services')
+ copy_assets()
+
def copy_assets():
for file in [
diff --git a/website/template_index.html b/website/template.html
similarity index 99%
rename from website/template_index.html
rename to website/template.html
index ac1602e..a672ae3 100644
--- a/website/template_index.html
+++ b/website/template.html
@@ -32,7 +32,7 @@