first pass usecases update. desktop.
BIN
assets/img/icons/usecases/ic_cbdc.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
assets/img/icons/usecases/ic_custody.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/img/icons/usecases/ic_defi.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/img/icons/usecases/ic_developer_tooling.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/img/icons/usecases/ic_exchanges.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/img/icons/usecases/ic_gaming.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
assets/img/icons/usecases/ic_infrastructure.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
assets/img/icons/usecases/ic_interoperability.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/img/icons/usecases/ic_nfts.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/img/icons/usecases/ic_payments.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
assets/img/icons/usecases/ic_security.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/img/icons/usecases/ic_sustainability.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
assets/img/icons/usecases/ic_wallet.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/img/icons/usecases/ic_web_monetization.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
59
assets/js/use-cases.js
Normal file
@@ -0,0 +1,59 @@
|
||||
$(document).ready(() => {
|
||||
|
||||
//show these featured on load.
|
||||
const show_cats_arr = ["infrastructure", "developer_tooling"]
|
||||
|
||||
function refreshList() {
|
||||
|
||||
$("#use_case_companies_list .card-uses").hide()
|
||||
|
||||
for (const category of show_cats_arr) {
|
||||
$(`#use_case_companies_list .card-uses.category_${category}`).show()
|
||||
}
|
||||
|
||||
|
||||
const featured_count = show_cats_arr.filter( (current) => {
|
||||
return current == "infrastructure" || current == "developer_tooling"
|
||||
})
|
||||
|
||||
const other_count = show_cats_arr.filter( (current) => {
|
||||
if ( current !== "infrastructure" && current !== "developer_tooling" ){
|
||||
return current
|
||||
}
|
||||
})
|
||||
|
||||
// update category counts
|
||||
if (featured_count.length === 0) {
|
||||
$("#featured_count").hide()
|
||||
}else {
|
||||
$("#featured_count").html(featured_count.length)
|
||||
$("#featured_count").show()
|
||||
}
|
||||
|
||||
if (other_count.length === 0) {
|
||||
$("#other_count").hide()
|
||||
}else{
|
||||
$("#other_count").html(other_count.length)
|
||||
$("#other_count").show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(".cat_checkbox input").change((event) => {
|
||||
const lang = $(event.target).val().toLowerCase().split(' ').join('_')
|
||||
const lang_checked = $(event.target).prop("checked")
|
||||
|
||||
|
||||
if (lang_checked) {
|
||||
show_cats_arr.push(lang)
|
||||
} else {
|
||||
show_cats_arr.indexOf(lang) !== -1 && show_cats_arr.splice(show_cats_arr.indexOf(lang), 1)
|
||||
}
|
||||
|
||||
// refresh all visible.
|
||||
refreshList()
|
||||
})
|
||||
|
||||
// on first load show the featured cats.
|
||||
refreshList()
|
||||
})
|
||||