Closed bennothommo closed 3 months ago
The Workshop theme now has a page that allows you to review the available Font Awesome icons. You can install it then navigate to CMS -> Font Awesome Icons.
@bennothommo this might cause problems with how I load in the fonts on the frontend for use in my EasyForms plugin (as well as a simplified version for just icons):
plugins/cadets/core/assets/less/select.less
: (used on https://cadets.site/)
@base_path: "../../../../..";
// @base_path: "../../../../../Core/winter";
@winterAssets: "@{base_path}/modules/backend/assets/less";
@stormAssets: "@{base_path}/modules/system/assets/ui/less";
@import "@{winterAssets}/core/boot.less";
@font-path: "/modules/system/assets/ui/font";
@image-path: "/modules/system/assets/ui/images";
@icon-font-path: @font-path;
.unit-selector {
@import "@{stormAssets}/../icons.less";
}
@import "@{stormAssets}/select.less";
Could we come up with a simplified way to include the icon assets in the frontend (and while we're at it maybe the select2 assets as well)?
@LukeTowers why are you including the entire icon LESS file inside the .unit-selector
class selector? Are you intending for icons to only show within that class?
As to how to include the icon assets easily in the frontend - the icons CSS file is already split off from the rest of Storm, and is accessible at modules/system/assets/ui/icons.css
. It would be trivial to just include that in any theme. The Select2 CSS is currently merged in with the rest of the Storm UI, but I suppose you could split off its CSS as well.
After looking at it again, it's fine for https://cadets.site to just include the icons.css directly, but the reason I took that approach with the EasyForms plugin is because I didn't want to cause any conflicts with existing icon systems in themes. It's not the end of the world though, if it causes a problem for someone then I can always just make it optionally include that CSS and they can figure out how they want icons to work in their theme themselves.
php artisan mix:update
to get latest Font Awesome version.Fixes https://github.com/wintercms/winter/issues/1090