The icons every page draws: Lucide and brand logos from simple-icons, installed with npm, drawn by the server with icon()
- JavaScript 54.2%
- Python 43.6%
- HTML 2.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| frontend | ||
| src | ||
| .gitignore | ||
| COPYING | ||
| COPYING.LESSER | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| README.md | ||
splent_feature_icons
The icons every page of a SPLENT product draws, from icon libraries installed with npm:
- Lucide (
lucide-static, ISC), the default set: about 2,000 icons, with the names Feather gave them as aliases. - Brand logos of
simple-icons(CC0): GitHub, ORCID, Zenodo, GitLab and the others listed infrontend/webpack.extra.js.
The framework draws them on the server as inline SVG:
{{ icon("download") }}
{{ icon("github", set="brands", label="GitHub") }}
{{ icon("x", size=20, class_="me-1") }}
An icon takes the colour of the text around it and is hidden from assistive technology unless it has a label.
Markup that a script builds after the page loaded can write <i data-feather="name">: the feature's script swaps it for the same <svg>, asking /icons/svg for the names it has not drawn yet.
Build
splent feature:compile icons
writes assets/dist/icons/lucide.json and assets/dist/icons/brands.json, which the feature registers at start.