Skip to content

jstemerdink/EPi.Libraries.FavIcons

Repository files navigation

EPi.Libraries.Favicons

By Jeroen Stemerdink

Build status GitHub version Platform 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 ImageResizer package to your solution

OR

Add ImageProcessor package to your solution

OR

Add ImageProcessor 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 custom localization provider

An Azure translation plugin for the localization provider

Thanks

to Rehan Saeed for some of the ideas.

Powered by ReSharper

image