6ce1087262245e3d2d46198ac237d0d04126e1a3
max
  Tue Sep 21 04:50:49 2021 -0700
removing duplicated font-awesome integration into hgTracks, adding
folder icon as a tag without a font dependency, removing link
from the icon, and adding the icon to the config page, refs #28108

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index be9db39..f048759 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -9416,44 +9416,65 @@
 int maxPennants = 3;
 char *pennants[maxPennants];
 int numPennants = chopByChar(setting, ';', pennants, ArraySize(pennants));
 int i;
 for (i = 0;  i < numPennants;  i++)
     {
     char *hint = NULL;
     char *html = makeOnePennantIcon(pennants[i], &hint);
     slPairAdd(&list, html, hint);
     freeMem(html);
     }
 slReverse(&list);
 return list;
 }
 
+void hPrintIcons(struct trackDb *tdb) 
+/* prints optional folder and pennants icons and a space, if any icons were printed */
+{
+bool hasIcon = hPrintPennantIcon(tdb);
+if (tdbIsSuper(tdb) || tdbIsComposite(tdb))
+    {
+    // this is the folder.svg icon from the font-awesome collection.
+    // the icon collection also contains a "fa fa-folder-o" icon, which is the outlined version 
+    // It was decided to use only the filled out icon for now and use the same icon for super
+    // and composite tracks. Adding the SVG removes a dependency and makes the icons show up instantly,
+    // instead of the short delay when using fonts. Github uses icons like this.
+    hPrintf("<svg class='folderIcon' viewBox='0 0 512 512'><path fill='#00457c' "
+            "d='M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 "
+            "0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z'/></svg>");
+    hasIcon = TRUE;
+    }
+if (hasIcon)
+    hPrintf(" ");
+}
+
 boolean hPrintPennantIcon(struct trackDb *tdb)
 // Returns TRUE and prints out the "pennantIcon" when found.
 // Example: ENCODE tracks in hgTracks config list.
 {
 if (trackDbSetting(tdb, "wgEncode") != NULL)
     {
     hPrintf("<a title='encode project' href='../ENCODE'><img height='16' width='16' "
             "src='../images/encodeThumbnail.jpg'></a>\n");
     }
 struct slPair *list = makePennantIcons(tdb), *el;
 boolean gotPennant = (list != NULL);
 for (el = list;  el != NULL;  el = el->next)
     hPrintf("%s\n", el->name);
 slPairFreeValsAndList(&list);
+
 return gotPennant;
 }
 
 boolean printPennantIconNote(struct trackDb *tdb)
 // Returns TRUE and prints out the "pennantIcon" and note when found.
 //This is used by hgTrackUi and hgc before printing out trackDb "html"
 {
 struct slPair *list = makePennantIcons(tdb), *el;
 boolean gotPennant = (list != NULL);
 for (el = list;  el != NULL;  el = el->next)
     {
     printf("<br>%s\n", el->name);
     char *hint = el->val;
     if (hint)
         printf("<b>Note:</b> %s\n", hint);