Fermain / -mollify

9 stars 9 forks source link

Replace material icons CDN with material icons npm install #159

Closed Fermain closed 10 months ago

Fermain commented 10 months ago

At the moment we are loading icons from a CDN and the caching (at least for me) does not work at all.

Instead of relying on CDN caching, can we try using a local npm install to see if this provides better performance when its in the bundle.

Christonn93 commented 10 months ago

Work that have been done

  1. Installed material icons material-icons
  2. Changed all old icons whit the new
  3. Changed class name in _components.scss
  4. Added logo as favicon

List of icons

Material Icons - The list of icons to be used.

Usage

For adding new icons use the following <span class="material-icons">THE NAME OF THE ICON GOES HERE</span>

To get the style correct, you will need to include import 'material-icons/iconfont/material-icons.css'; in the script tag on the page_name.svelte where the icons will be used.

Style

In the _components.scss file there is a @mixin icon section that was used to add style to icons before the change. I removed .icon-f and .icon-o and replaced the class name with .material-icons but did not see any change in the style. Not sure why this is.

I also added the logo as a favicon.ico, For some reason it do not show up. Might work more on that.