You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 74dcf0d
Browse filesBrowse the repository at this point in the historyBrowse files
Replace Font Awesome and Academicons webfonts with an inline SVG sprite
The site drew 14 distinct glyphs and paid ~347 KB across two third-party
origins for them: Font Awesome's 89 KB stylesheet plus fa-solid-900 (127 KB),
fa-brands-400 (105 KB) and the v4 compatibility shim (5 KB), then Academicons'
stylesheet and webfont on top.
All 14 are single-path icons. Extracted their viewBox and path data (18.6 KB
total, roughly half the raw files, which for Academicons were mostly Inkscape
and RDF metadata) into one <symbol> sprite emitted once per page by the
layouts. Icons are referenced through _includes/icon.html, so templates read
{% include icon.html name="github" %} rather than carrying SVG blobs.
A sprite matters here because icons sit inside {% for member in ... %} loops on
the team and home pages; inlining full SVGs would repeat multi-KB paths per
member. Each <use> reference is ~40 bytes instead.
Net: +8.6 KB gzipped per page, -347 KB and two origins. Verified all 112 icon
references resolve to defined symbols and the count is unchanged from the
webfont markup.
Attribution is retained in the sprite header as the licences require:
Font Awesome Free 6.0.0 icons are CC BY 4.0, Academicons 1.9.6 SIL OFL 1.1.
fill: currentColor reproduces how the icon fonts inherited color, so the
existing hover rules carry over unchanged (a .fa-2x/.ai-2x -> a .icon-2x).
Also drops a commented-out Font Awesome 5 link left in headpear.html.
Copy file name to clipboardExpand all lines: _pages/research.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@ Our group builds numerical methods, computational models, and open-source softwa
23
23
{% endfor %}
24
24
</ul>
25
25
<divclass="research-footer"markdown="0">
26
-
{% if theme.papers %}<spanclass="research-pubs"><iclass="fas fa-file-alt"></i> {% for key in theme.papers %}<ahref="{{ site.baseurl }}/papers/#{{ key }}">{{ key }}</a>{% unless forloop.last %} · {% endunless %}{% endfor %}</span>{% endif %}
27
-
{% if theme.links %}<divclass="research-links">{% for link in theme.links %}<ahref="{{ link.url }}"target="_blank"rel="noopener noreferrer"class="research-link"><iclass="fab fa-github"></i> {{ link.text }}</a>{% endfor %}</div>{% endif %}
26
+
{% if theme.papers %}<spanclass="research-pubs">{% include icon.html name="file-lines" %} {% for key in theme.papers %}<ahref="{{ site.baseurl }}/papers/#{{ key }}">{{ key }}</a>{% unless forloop.last %} · {% endunless %}{% endfor %}</span>{% endif %}
27
+
{% if theme.links %}<divclass="research-links">{% for link in theme.links %}<ahref="{{ link.url }}"target="_blank"rel="noopener noreferrer"class="research-link">{% include icon.html name="github" %} {{ link.text }}</a>{% endfor %}</div>{% endif %}
0 commit comments