list by groups and icons
nathanEmity opened this issue · 0 comments
nathanEmity commented
Script to copy object in console(working in safary)
var iconsObject = {};
var groups = document.querySelectorAll(".icons-group");
for (let group of groups) {
let groupId = group.id;
let groupeName = group.querySelector(".icons-title").innerText;
iconsObject[groupId] = {
name: groupeName,
id: groupId,
};
let classes = {};
let icons = group.querySelectorAll(".icons__item");
for (let icon of icons) {
let className = icon.querySelector(
".icons__before i:first-child"
).className;
let name = icon.querySelector(".icons__text").innerText;
classes[name] = className;
}
iconsObject[groupId].classes = classes;
}
copy(iconsObject);
example object in js :
{
Accessibility: {
name: "Accessibility",
id: "Accessibility",
classes: {
"accessible-icon": "fab fa-accessible-icon",
"american-sign-language-interpreting":
"fas fa-american-sign-language-interpreting",
"assistive-listening-systems": "fas fa-assistive-listening-systems",
"audio-description": "fas fa-audio-description",
blind: "fas fa-blind",
braille: "fas fa-braille",
"closed-captioning": "fas fa-closed-captioning",
deaf: "fas fa-deaf",
"low-vision": "fas fa-low-vision",
"phone-volume": "fas fa-phone-volume",
"question-circle": "fas fa-question-circle",
"sign-language": "fas fa-sign-language",
tty: "fas fa-tty",
"universal-access": "fas fa-universal-access",
wheelchair: "fas fa-wheelchair",
},
},
Alert: {
name: "Alert",
id: "Alert",
classes: {
bell: "fas fa-bell",
"bell-slash": "fas fa-bell-slash",
exclamation: "fas fa-exclamation",
"exclamation-circle": "fas fa-exclamation-circle",
"exclamation-triangle": "fas fa-exclamation-triangle",
radiation: "fas fa-radiation",
"radiation-alt": "fas fa-radiation-alt",
"skull-crossbones": "fas fa-skull-crossbones",
},
},
Animals: {
name: "Animals",
id: "Animals",
classes: {
cat: "fas fa-cat",
crow: "fas fa-crow",
dog: "fas fa-dog",
dove: "fas fa-dove",
dragon: "fas fa-dragon",
feather: "fas fa-feather",
"feather-alt": "fas fa-feather-alt",
fish: "fas fa-fish",
frog: "fas fa-frog",
hippo: "fas fa-hippo",
horse: "fas fa-horse",
"horse-head": "fas fa-horse-head",
"kiwi-bird": "fas fa-kiwi-bird",
otter: "fas fa-otter",
paw: "fas fa-paw",
spider: "fas fa-spider",
},
},
Arrows: {
name: "Arrows",
id: "Arrows",
classes: {
"angle-double-down": "fas fa-angle-double-down",
"angle-double-left": "fas fa-angle-double-left",
"angle-double-right": "fas fa-angle-double-right",
"angle-double-up": "fas fa-angle-double-up",
"angle-down": "fas fa-angle-down",
"angle-left": "fas fa-angle-left",
"angle-right": "fas fa-angle-right",
"angle-up": "fas fa-angle-up",
"arrow-alt-circle-down": "fas fa-arrow-alt-circle-down",
"arrow-alt-circle-left": "fas fa-arrow-alt-circle-left",
"arrow-alt-circle-right": "fas fa-arrow-alt-circle-right",
"arrow-alt-circle-up": "fas fa-arrow-alt-circle-up",
"arrow-circle-down": "fas fa-arrow-circle-down",
"arrow-circle-left": "fas fa-arrow-circle-left",
"arrow-circle-right": "fas fa-arrow-circle-right",
"arrow-circle-up": "fas fa-arrow-circle-up",
"arrow-down": "fas fa-arrow-down",
"arrow-left": "fas fa-arrow-left",
"arrow-right": "fas fa-arrow-right",
"arrow-up": "fas fa-arrow-up",
"arrows-alt": "fas fa-arrows-alt",
"arrows-alt-h": "fas fa-arrows-alt-h",
"arrows-alt-v": "fas fa-arrows-alt-v",
"caret-down": "fas fa-caret-down",
"caret-left": "fas fa-caret-left",
"caret-right": "fas fa-caret-right",
"caret-square-down": "fas fa-caret-square-down",
"caret-square-left": "fas fa-caret-square-left",
"caret-square-right": "fas fa-caret-square-right",
"caret-square-up": "fas fa-caret-square-up",
"caret-up": "fas fa-caret-up",
"cart-arrow-down": "fas fa-cart-arrow-down",
"chart-line": "fas fa-chart-line",
"chevron-circle-down": "fas fa-chevron-circle-down",
"chevron-circle-left": "fas fa-chevron-circle-left",
"chevron-circle-right": "fas fa-chevron-circle-right",
"chevron-circle-up": "fas fa-chevron-circle-up",
"chevron-down": "fas fa-chevron-down",
"chevron-left": "fas fa-chevron-left",
"chevron-right": "fas fa-chevron-right",
"chevron-up": "fas fa-chevron-up",
"cloud-download-alt": "fas fa-cloud-download-alt",
"cloud-upload-alt": "fas fa-cloud-upload-alt",
"compress-arrows-alt": "fas fa-compress-arrows-alt",
download: "fas fa-download",
"exchange-alt": "fas fa-exchange-alt",
"expand-arrows-alt": "fas fa-expand-arrows-alt",
"external-link-alt": "fas fa-external-link-alt",
"external-link-square-alt": "fas fa-external-link-square-alt",
"hand-point-down": "fas fa-hand-point-down",
"hand-point-left": "fas fa-hand-point-left",
"hand-point-right": "fas fa-hand-point-right",
"hand-point-up": "fas fa-hand-point-up",
"hand-pointer": "fas fa-hand-pointer",
history: "fas fa-history",
"level-down-alt": "fas fa-level-down-alt",
"level-up-alt": "fas fa-level-up-alt",
"location-arrow": "fas fa-location-arrow",
"long-arrow-alt-down": "fas fa-long-arrow-alt-down",
"long-arrow-alt-left": "fas fa-long-arrow-alt-left",
"long-arrow-alt-right": "fas fa-long-arrow-alt-right",
"long-arrow-alt-up": "fas fa-long-arrow-alt-up",
"mouse-pointer": "fas fa-mouse-pointer",
play: "fas fa-play",
random: "fas fa-random",
recycle: "fas fa-recycle",
redo: "fas fa-redo",
"redo-alt": "fas fa-redo-alt",
reply: "fas fa-reply",
"reply-all": "fas fa-reply-all",
retweet: "fas fa-retweet",
share: "fas fa-share",
"share-square": "fas fa-share-square",
"sign-in-alt": "fas fa-sign-in-alt",
"sign-out-alt": "fas fa-sign-out-alt",
sort: "fas fa-sort",
"sort-alpha-down": "fas fa-sort-alpha-down",
"sort-alpha-down-alt": "fas fa-sort-alpha-down-alt",
"sort-alpha-up": "fas fa-sort-alpha-up",
"sort-alpha-up-alt": "fas fa-sort-alpha-up-alt",
"sort-amount-down": "fas fa-sort-amount-down",
"sort-amount-down-alt": "fas fa-sort-amount-down-alt",
"sort-amount-up": "fas fa-sort-amount-up",
"sort-amount-up-alt": "fas fa-sort-amount-up-alt",
"sort-down": "fas fa-sort-down",
"sort-numeric-down": "fas fa-sort-numeric-down",
"sort-numeric-down-alt": "fas fa-sort-numeric-down-alt",
"sort-numeric-up": "fas fa-sort-numeric-up",
"sort-numeric-up-alt": "fas fa-sort-numeric-up-alt",
"sort-up": "fas fa-sort-up",
sync: "fas fa-sync",
"sync-alt": "fas fa-sync-alt",
"text-height": "fas fa-text-height",
"text-width": "fas fa-text-width",
undo: "fas fa-undo",
"undo-alt": "fas fa-undo-alt",
upload: "fas fa-upload",
},
},
Audio_Video: {
name: "Audio & Video",
id: "Audio_Video",
classes: {
"audio-description": "fas fa-audio-description",
backward: "fas fa-backward",
"broadcast-tower": "fas fa-broadcast-tower",
circle: "fas fa-circle",
"closed-captioning": "fas fa-closed-captioning",
compress: "fas fa-compress",
"compress-arrows-alt": "fas fa-compress-arrows-alt",
eject: "fas fa-eject",
expand: "fas fa-expand",
"expand-arrows-alt": "fas fa-expand-arrows-alt",
"fast-backward": "fas fa-fast-backward",
"fast-forward": "fas fa-fast-forward",
"file-audio": "fas fa-file-audio",
"file-video": "fas fa-file-video",
film: "fas fa-film",
forward: "fas fa-forward",
headphones: "fas fa-headphones",
microphone: "fas fa-microphone",
"microphone-alt": "fas fa-microphone-alt",
"microphone-alt-slash": "fas fa-microphone-alt-slash",
"microphone-slash": "fas fa-microphone-slash",
music: "fas fa-music",
pause: "fas fa-pause",
"pause-circle": "fas fa-pause-circle",
"phone-volume": "fas fa-phone-volume",
"photo-video": "fas fa-photo-video",
play: "fas fa-play",
"play-circle": "fas fa-play-circle",
podcast: "fas fa-podcast",
random: "fas fa-random",
redo: "fas fa-redo",
"redo-alt": "fas fa-redo-alt",
rss: "fas fa-rss",
"rss-square": "fas fa-rss-square",
"step-backward": "fas fa-step-backward",
"step-forward": "fas fa-step-forward",
stop: "fas fa-stop",
"stop-circle": "fas fa-stop-circle",
sync: "fas fa-sync",
"sync-alt": "fas fa-sync-alt",
tv: "fas fa-tv",
undo: "fas fa-undo",
"undo-alt": "fas fa-undo-alt",
video: "fas fa-video",
"volume-down": "fas fa-volume-down",
"volume-mute": "fas fa-volume-mute",
"volume-off": "fas fa-volume-off",
"volume-up": "fas fa-volume-up",
youtube: "fab fa-youtube",
},
},
};