pricing with emojis

This commit is contained in:
Zsolt Ero
2024-01-18 02:20:09 +01:00
parent e32079a97f
commit 6ba719d61e
3 changed files with 16 additions and 31 deletions

View File

@@ -1,34 +1,42 @@
[ [
{ {
"price": 10, "price": 10,
"name": "Iron" "name": "Steel",
"icon": "🗡️"
}, },
{ {
"price": 20, "price": 20,
"name": "Steel" "name": "Copper",
"icon": "🥘"
}, },
{ {
"price": 40, "price": 40,
"name": "Copper" "name": "Bronze",
"icon": "🛎️"
}, },
{ {
"price": 75, "price": 75,
"name": "Bronze" "name": "Silver",
"icon": "🍴"
}, },
{ {
"price": 150, "price": 150,
"name": "Silver" "name": "Gold",
"icon": "🏆"
}, },
{ {
"price": 250, "price": 250,
"name": "Gold" "name": "Platinum",
"icon": "💿"
}, },
{ {
"price": 500, "price": 500,
"name": "Platinum" "name": "Sapphire",
"icon": "💍"
}, },
{ {
"price": 1000, "price": 1000,
"name": "Diamond" "name": "Diamond",
"icon": "💎"
} }
] ]

View File

@@ -1,22 +0,0 @@
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 },
})

View File

@@ -1 +0,0 @@
<div id="support-plans-slider"></div>