diff --git a/README.md b/README.md index 3c086dd3..b2d97bbc 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ Both sections and items can have an icon associated with them, and defined under - **Favicon**: Set `icon: favicon` to fetch a services icon automatically from the URL of the corresponding application - **Font-Awesome**: To use any font-awesome icon, specify the category, followed by the icon name, e.g. `fas fa-rocket` or `fab fa-monero`. You can also use Pro icons if you have a license key, just set it under `appConfig.fontAwesomeKey` - **Generative**: Setting `icon: generative`, will generate a unique for a given service, based on it's URL or IP +- **Emoji**: Use an emoji as a tile icon, by putting the emoji's code as the icon attribute. Emojis can be specified either as emojis (`๐Ÿš€`), unicode (`'U+1F680'`) or shortcode (`':rocket:'`). - **URL**: You can also pass in a URL to an icon asset, hosted either locally or using any CDN service. E.g. `icon: https://i.ibb.co/710B3Yc/space-invader-x256.png`. - **Local Image**: To use a local image, store it in `./public/item-icons/` (or create a volume in Docker: `-v /local/image/directory:/app/public/item-icons/`) , and reference it by name and extension - e.g. set `icon: image.png` to use `./public/item-icon/image.png`. You can also use sub-folders here if you have a lot of icons, to keep them organized. diff --git a/docs/icons.md b/docs/icons.md index e7d7b0dc..8cac264f 100644 --- a/docs/icons.md +++ b/docs/icons.md @@ -3,14 +3,15 @@ Both sections and items can have an icon, which is specified using the `icon` attribute. Using icons improves the aesthetics of your UI and makes the app more intuitive to use. There are several options when it comes to setting icons, and this article outlines each of them - [Font Awesome Icons](#font-awesome) -- [Favicons](#favicons) +- [Auto-Fetched Favicons](#favicons) - [Generative Icons](#generative-icons) +- [Emoji Icons](#emoji-icons) - [Icons by URL](#icons-by-url) - [Local Icons](#local-icons) - [No Icon](#no-icon)

- +

### Font Awesome @@ -18,10 +19,17 @@ You can use any [Font Awesome Icon](https://fontawesome.com/icons) simply by spe Font-Awesome has a wide variety of free icons, but you can also use their pro icons if you have a membership. To do so, you need to specify your license key under: `appConfig.fontAwesomeKey`. This is usually a 10-digit string, for example `13014ae648`. +

+ +

### Favicons Dashy can auto-fetch the favicon for a given service using it's URL. Just set `icon: favicon` to use this feature. If the services URL is a local IP, then Dashy will attempt to find the favicon from `http://[ip]/favicon.ico`. This has two issues, favicons are not always hosted at the same location for every service, and often the default favicon is a low resolution. Therefore to fix this, for remote services an API is used to return a high-quality icon for any online service. +

+ +

+ The default favicon API is [Favicon Kit](https://faviconkit.com/), a free and reliable service for returning images from any given URL. However several other API's are supported. To change the API used, under `appConfig`, set `faviconApi` to one of the following values: - `faviconkit` - [faviconkit.com](https://faviconkit.com/) (Recommend) @@ -35,6 +43,29 @@ You can also force Dashy to always get favicons from the root of the domain, and ### Generative Icons Uses a unique and programmatically generated icon for a given service. This is particularly useful when you have a lot of similar services with a different IP or port, and no specific icon. These icons are generated with [ipsicon.io](https://ipsicon.io/). To use this option, just set an item's to: `icon: generative`. +

+ +

+ +### Emoji Icons +You can use almost any emoji as an icon for items or sections. You can specify the emoji either by pasting it directly, using it's unicode ( e.g. `'U+1F680'`) or shortcode (e.g. `':rocket:'`). You can find these codes for any emoji using [Emojipedia](https://emojipedia.org/) (near the bottom of emoji each page), or for a quick reference to emoji shortcodes, check out [emojis.ninja](https://emojis.ninja/) by @nomanoff. + +

+ +

+ +The following example shows the unicode options available, all three will render the ๐Ÿš€ emoji. + +```yaml +items: +- title: Shortcode + icon: ':rocket:' +- title: Unicode + icon: 'U+1F680' +- title: Emoji + icon: ๐Ÿš€ +``` + ### Icons by URL You can also set an icon by passing in a valid URL pointing to the icons location. For example `icon: https://i.ibb.co/710B3Yc/space-invader-x256.png`, this can be in .png, .jpg or .svg format, and hosted anywhere- so long as it's accessible from where you are hosting Dashy. The icon will be automatically scaled to fit, however loading in a lot of large icons may have a negative impact on performance, especially if you visit Dashy from new devices often. @@ -44,4 +75,4 @@ You may also want to store your icons locally, bundled within Dashy so that ther You can also use sub-folders within the `item-icons` directory to keep things organised. You would then specify an icon with it's folder name slash image name. For example: `networking/monit.png` ### No Icon -If you don't wish for a given item or section to have an icon, just leave out the `icon` attribute. \ No newline at end of file +If you don't wish for a given item or section to have an icon, just leave out the `icon` attribute. diff --git a/src/components/LinkItems/ItemIcon.vue b/src/components/LinkItems/ItemIcon.vue index fe2a756b..3e4ca928 100644 --- a/src/components/LinkItems/ItemIcon.vue +++ b/src/components/LinkItems/ItemIcon.vue @@ -1,6 +1,7 @@