getkirby.com icon indicating copy to clipboard operation
getkirby.com copied to clipboard

Favicons: distinctive colors for different parts of the Kirby sites

Open marcus-at-localhost opened this issue 3 years ago • 1 comments

5000 Tabs open, constantly switching between my backend, docs, cookbook, feature upvoting and forum. Constantly getting lost. image

Forum and Kirby backend using the outlined Kirby logo, all other services the filled one.

I would appreciate some sort of color coding as you already are using here

image

What do you think?

marcus-at-localhost avatar Sep 24 '21 08:09 marcus-at-localhost

I'd appreciate that too.

For a client project I recently added a route for favicon.svg so I can color code depending on the page. Simplified example:

'routes' => [
  [
    'pattern' => '(:any)/favicon.svg',
    'action'  => function ($page) {
      $color = $page->color()->value();
      return new Response('<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50" fill="' . $color . '"/></svg>', 'image/svg+xml');
    }
  ]
]

Something like that could be used to color code the pages in the docs.

medienbaecker avatar Sep 24 '21 12:09 medienbaecker