Update FontAwesome icon gallery/picker (5.0.12 to 5.3.1)

master
Skylar Ittner 6 years ago
parent 0f889f9590
commit 20082e2ba2

File diff suppressed because it is too large Load Diff

@ -0,0 +1,29 @@
<?php
// Script to convert icons.json in the FontAwesome download into a PHP array for SiteWriter
$json = file_get_contents("/home/skylar/Downloads/fontawesome-free-5.3.1-web/metadata/icons.json");
$icons = json_decode($json, true);
$output = [];
foreach ($icons as $icon => $data) {
$meta = [];
$meta["label"] = $data["label"];
$meta["search"] = $data["search"]["terms"];
foreach ($data["styles"] as $s) {
$class = "fa";
switch ($s) {
case "solid":
$class = "fas";
break;
case "regular":
$class = "far";
break;
case "brands":
$class = "fab";
break;
}
$output["$class fa-$icon"] = $meta;
}
}
var_export($output);
Loading…
Cancel
Save