diff --git a/README.md b/README.md index c86c0ee..05e30c2 100644 --- a/README.md +++ b/README.md @@ -72,3 +72,21 @@ Or to define a wholly custom theme, you will need to define the following CSS va For light mode palettes, the sequence of 00–07 should be reversed (light to dark, not dark to light). Note that not all colours are currently used in the theme. + +## Favicon + +risotto will automatically use favicons placed in the `static/` directory. +The following files will be detected and included in your site's `
` section: + +* `favicon.ico` +* `favicon-16x16.png` +* `favicon-32x32.png` +* `apple-touch-icon.png` +* `site.webmanifest` + +You can generate these from an image or emoji using [favicon.io](https://favicon.io/) or a similar service. +They must be placed directly under your site's `static/` directory, i.e. not in in a subdirectory or `themes/risotto/static/`. + +## Acknowledgements + +The 'cooked rice' emoji used as a favicon for the example site was created by the [Twemoji project](https://twemoji.twitter.com/) and is licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/). diff --git a/exampleSite/static/.gitignore b/exampleSite/static/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/exampleSite/static/README b/exampleSite/static/README new file mode 100644 index 0000000..9c565ef --- /dev/null +++ b/exampleSite/static/README @@ -0,0 +1,6 @@ +The favicons in this directory were generated using the following graphics from Twitter Twemoji: + +- Graphics Title: 1f35a.svg +- Graphics Author: Copyright 2020 Twitter, Inc and other contributors (https://github.com/twitter/twemoji) +- Graphics Source: https://github.com/twitter/twemoji/blob/master/assets/svg/1f35a.svg +- Graphics License: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/) diff --git a/exampleSite/static/android-chrome-192x192.png b/exampleSite/static/android-chrome-192x192.png new file mode 100644 index 0000000..dc22f05 Binary files /dev/null and b/exampleSite/static/android-chrome-192x192.png differ diff --git a/exampleSite/static/android-chrome-512x512.png b/exampleSite/static/android-chrome-512x512.png new file mode 100644 index 0000000..fa80ccd Binary files /dev/null and b/exampleSite/static/android-chrome-512x512.png differ diff --git a/exampleSite/static/apple-touch-icon.png b/exampleSite/static/apple-touch-icon.png new file mode 100644 index 0000000..c5668a3 Binary files /dev/null and b/exampleSite/static/apple-touch-icon.png differ diff --git a/exampleSite/static/favicon-16x16.png b/exampleSite/static/favicon-16x16.png new file mode 100644 index 0000000..2ec54d8 Binary files /dev/null and b/exampleSite/static/favicon-16x16.png differ diff --git a/exampleSite/static/favicon-32x32.png b/exampleSite/static/favicon-32x32.png new file mode 100644 index 0000000..047ad4a Binary files /dev/null and b/exampleSite/static/favicon-32x32.png differ diff --git a/exampleSite/static/favicon.ico b/exampleSite/static/favicon.ico new file mode 100644 index 0000000..7ccf4bb Binary files /dev/null and b/exampleSite/static/favicon.ico differ diff --git a/exampleSite/static/site.webmanifest b/exampleSite/static/site.webmanifest new file mode 100644 index 0000000..45dc8a2 --- /dev/null +++ b/exampleSite/static/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 45673a5..01ef81b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -15,3 +15,10 @@ + + +{{ if os.FileExists "static/favicon.ico" }}{{ end }} +{{ if os.FileExists "static/favicon-32x32.png" }}{{ end }} +{{ if os.FileExists "static/favicon-16x16.png" }}{{ end }} +{{ if os.FileExists "static/apple-touch-icon.png" }}{{ end }} +{{ if os.FileExists "static/site.webmanifest" }}{{ end }}