Skip to content

jstemerdink/EPi.Libraries.FavIcons

Repository files navigation

EPi.Libraries.Favicons

By Jeroen Stemerdink

Build status GitHub version Platform Platform NuGet GitHub license Quality Gate Status

Instructions

Add the following attribute to the ContentType you use for your settings

[ContainsSettings]

Add properties to the ContentType you use for your settings and add the attributes shown below.

[WebsiteIcon]
[UIHint(UIHint.Image)]
public virtual ContentReference Favicon { get; set; }

[MobileAppIcon]
[UIHint(UIHint.Image)]
public virtual ContentReference AppIcon { get; set; } >> use if your site is webapp capable

[ThemeColor]
public virtual string ThemeColor { get; set; } >> defaults to "#1E1E1E"

[TileColor]
public virtual string TileColor { get; set; } >> defaults to "#1E1E1E"

[ApplicationName]
public virtual string ApplicationName { get; set; } >> defaults to the name in the site definition

[ApplicationShortName]
public virtual string ApplicationShortName { get; set; } >> defaults to the name in the site definition

Add ImageSharp package to your solution

OR

Create your own resizing service.

You can create your own service by implementing IResizeService or ResizeServiceBase

Add the following to your header to render the markup:

@{
    await Html.RenderPartialAsync("_Favicons");
}

Add MVC in your startup

Parts

A favicon provider

A service to make the provider work with ImageSharp

Thanks

to Rehan Saeed for some of the ideas.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors