mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
support plans
This commit is contained in:
34
website/assets/pricing.json
Normal file
34
website/assets/pricing.json
Normal file
@@ -0,0 +1,34 @@
|
||||
[
|
||||
{
|
||||
"price": 10,
|
||||
"name": "Iron"
|
||||
},
|
||||
{
|
||||
"price": 20,
|
||||
"name": "Steel"
|
||||
},
|
||||
{
|
||||
"price": 40,
|
||||
"name": "Copper"
|
||||
},
|
||||
{
|
||||
"price": 75,
|
||||
"name": "Bronze"
|
||||
},
|
||||
{
|
||||
"price": 150,
|
||||
"name": "Silver"
|
||||
},
|
||||
{
|
||||
"price": 250,
|
||||
"name": "Gold"
|
||||
},
|
||||
{
|
||||
"price": 500,
|
||||
"name": "Platinum"
|
||||
},
|
||||
{
|
||||
"price": 1000,
|
||||
"name": "Diamond"
|
||||
}
|
||||
]
|
||||
@@ -239,3 +239,8 @@ hr {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#support-plans-slider {
|
||||
max-width: 600px;
|
||||
margin: 50px auto;
|
||||
}
|
||||
22
website/assets/support_plans.js
Normal file
22
website/assets/support_plans.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const slider = document.getElementById('support-plans-slider');
|
||||
|
||||
var arbitraryValuesForSlider = ['128MB', '256MB', '1GB', '8GB', '16GB', '32GB'];
|
||||
|
||||
var format = {
|
||||
to: function(value) {
|
||||
return arbitraryValuesForSlider[Math.round(value)];
|
||||
},
|
||||
from: function (value) {
|
||||
return arbitraryValuesForSlider.indexOf(value);
|
||||
}
|
||||
};
|
||||
|
||||
noUiSlider.create(slider, {
|
||||
// start values are parsed by 'format'
|
||||
start: '1GB',
|
||||
range: { min: 0, max: arbitraryValuesForSlider.length - 1 },
|
||||
step: 1,
|
||||
tooltips: true,
|
||||
format: format,
|
||||
pips: { mode: 'steps', format: format, density: 50 },
|
||||
});
|
||||
1
website/blocks/support_plans.html
Normal file
1
website/blocks/support_plans.html
Normal file
@@ -0,0 +1 @@
|
||||
<div id="support-plans-slider"></div>
|
||||
@@ -20,8 +20,12 @@ def generate():
|
||||
|
||||
index_html = template.replace('{main}', main_html)
|
||||
|
||||
style_selector = open('blocks/map_docs.html').read()
|
||||
index_html = index_html.replace('<!--map_docs-->', style_selector)
|
||||
map_docs = open('blocks/map_docs.html').read()
|
||||
index_html = index_html.replace('<!--map_docs-->', map_docs)
|
||||
|
||||
support_plans = open('blocks/support_plans.html').read()
|
||||
index_html = index_html.replace('<!--support_plans-->', support_plans)
|
||||
|
||||
open(OUT_DIR / 'index.html', 'w').write(index_html)
|
||||
|
||||
make_static_page('privacy', 'Privacy Policy')
|
||||
@@ -33,7 +37,8 @@ def copy_assets():
|
||||
for file in [
|
||||
'style.css',
|
||||
'logo.jpg',
|
||||
'map.js',
|
||||
'map_docs.js',
|
||||
'support_plans.js',
|
||||
'favicon.ico',
|
||||
'github.svg',
|
||||
'x.svg',
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
|
||||
<!-- <link rel="icon" href="/favicon.ico" sizes="any" />-->
|
||||
|
||||
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<link href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />
|
||||
|
||||
<link href="https://unpkg.com/nouislider@15.7.1/dist/nouislider.min.css" rel="stylesheet" />
|
||||
<link href="https://unpkg.com/prismjs@1.29.0/themes/prism.min.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
@@ -42,7 +41,11 @@
|
||||
<a href="tos">Terms of Service</a>
|
||||
</div>
|
||||
|
||||
<script src="map.js"></script>
|
||||
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<script src="https://unpkg.com/nouislider@15.7.1/dist/nouislider.min.js"></script>
|
||||
|
||||
<script src="map_docs.js"></script>
|
||||
<script src="support_plans.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/prismjs@1.29.0/components/prism-core.min.js"></script>
|
||||
<script src="https://unpkg.com/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user