mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-16 02:14:12 +03:00
Removed redundant search terms
This commit is contained in:
parent
663d885ff8
commit
7f46931b18
510
index.html
510
index.html
File diff suppressed because one or more lines are too long
@ -93,7 +93,11 @@ for (var i = 0; i < source.icons.length; i++) {
|
||||
filePath = "../icons/" + fileName + ".svg";
|
||||
var fs = require('fs');
|
||||
var svg = fs.readFileSync(filePath, 'utf8');
|
||||
main += "\n <li class=\"tiles__item\" data-search=\"" + source.icons[i].title.toLowerCase() + " " + fileName.toLowerCase() + " " + source.icons[i].hex.toLowerCase() + "\" style=\"background-color:#" + source.icons[i].hex + "\"><a href=\"https://simpleicons.org/icons/" + fileName + ".svg\" class=\"icon--link\" title=\"" + source.icons[i].title + "\">" + svg + "<span class=\"tile-name\">" + source.icons[i].title + "</span></a>" + "<span class=\"hex\">#" + source.icons[i].hex + "</span></li>";
|
||||
var searchTerms = source.icons[i].title.toLowerCase() + " " + source.icons[i].hex.toLowerCase();
|
||||
if (source.icons[i].title.toLowerCase() != fileName.toLowerCase()) {
|
||||
searchTerms = searchTerms + " " + fileName.toLowerCase();
|
||||
}
|
||||
main += "\n <li class=\"tiles__item\" data-search=\"" + searchTerms + "\" style=\"background-color:#" + source.icons[i].hex + "\"><a href=\"https://simpleicons.org/icons/" + fileName + ".svg\" class=\"icon--link\" title=\"" + source.icons[i].title + "\">" + svg + "<span class=\"tile-name\">" + source.icons[i].title + "</span></a>" + "<span class=\"hex\">#" + source.icons[i].hex + "</span></li>";
|
||||
}
|
||||
|
||||
// Put all content together and export to index.html
|
||||
|
Loading…
Reference in New Issue
Block a user