ArdanaLabs / Ardana-dApps

BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Font Awesome SVG sprites #36

Closed toastal closed 1 year ago

toastal commented 1 year ago

This will give us 6.2.0 Font Awesome sprites into /assets/images/font-awesome-sprite-{regular,brands}.svg. An example of usage:

<a class="SocialLink" title="Mastodon" href="...">
  <svg class="Icon" role="none">
    <!-- For when Ardana supports the Fediverse and FOSS protocols -->
    <use href="/assets/images/font-awesome-sprite-brands.svg#mastodon"/>
  </svg>
  <span class="srOnly">Mastodon</span>
</a>

IMPORTANT: we should rebase out and remove the PNGs for the brand logos (use the Font Awesome brands) and the icon fonts. This will reduce the size of the repository and checkout faster.

TODO: these are still wasteful though as we are download the entire icon sets like the current icons (just like the current webfont approach); what we should do I choose a way to script out and remove the unused icons (this could be post-MVP). If I were doing it myself, I would reach for Lambda Soup again and use a CSS selector to remove all icons that are not in a defined set we wish to keep.

Assists with #22

other changes