-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
76 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -239,3 +239,8 @@ hr { | |
max-width: 100%; | ||
} | ||
} | ||
|
||
#support-plans-slider { | ||
max-width: 600px; | ||
margin: 50px auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div id="support-plans-slider"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]/dist/nouislider.min.css" rel="stylesheet" /> | ||
<link href="https://unpkg.com/[email protected]/themes/prism.min.css" rel="stylesheet" /> | ||
</head> | ||
|
||
|
@@ -42,7 +41,11 @@ <h1>OpenFreeMap</h1> | |
<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/[email protected]/dist/nouislider.min.js"></script> | ||
|
||
<script src="map_docs.js"></script> | ||
<script src="support_plans.js"></script> | ||
|
||
<script src="https://unpkg.com/[email protected]/components/prism-core.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/plugins/autoloader/prism-autoloader.min.js"></script> | ||
|