Here’s how to use the Entypo icons in the Friday Theme as SVGs It’s easy with Jekyll’s include tag and Bootstrap 4 classes.
Bootstrap 3 shipped with the Glyphicons built-in as icon files and accompanying CSS classes. Bootstrap 4 doesn’t have these, but does point you to some SVG icon libraries. With Jekyll’s include and Bootstrap 4’s flex layout, it’s easy to use the SVGs inline without writing lots of icon-related CSS.
A clock icon in grey left-aligned
A cycle icon in red right-aligned
The markup above uses .icon
to control the icon’s size and and .red
or .grey
as examples of controlling its colour.
Bootstrap takes care of the layout. d-flex align-items-center
ensures the icon is vertically aligned along the center line with the accompanying content and ml-2
and mr-2
take care of horizontal spacing.
The following CSS is already in theme/css/site.css
and can easily be extended for different colours.