diff --git a/.gitignore b/.gitignore index d1dd750..060af90 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,6 @@ chiya-*.tar # Ignore assets that are produced by build tools. /priv/static/assets/ -/priv/static/* - # Ignore digested assets cache. /priv/static/cache_manifest.json diff --git a/lib/chiya_web.ex b/lib/chiya_web.ex index 4f08afc..ab785de 100644 --- a/lib/chiya_web.ex +++ b/lib/chiya_web.ex @@ -17,7 +17,7 @@ defmodule ChiyaWeb do those modules here. """ - def static_paths, do: ~w(assets fonts images favicon.ico robots.txt) + def static_paths, do: ~w(assets fonts images favicon favicon.ico robots.txt browserconfig.xml site.webmanifest) def router do quote do diff --git a/lib/chiya_web/components/core_components.ex b/lib/chiya_web/components/core_components.ex index d7719c7..fdae68c 100644 --- a/lib/chiya_web/components/core_components.ex +++ b/lib/chiya_web/components/core_components.ex @@ -16,6 +16,18 @@ defmodule ChiyaWeb.CoreComponents do alias Phoenix.LiveView.JS import ChiyaWeb.Gettext + + def favicon(assigns) do + ~H""" + + + + + + + + """ + end @doc """ diff --git a/lib/chiya_web/components/layouts/root_app.html.heex b/lib/chiya_web/components/layouts/root_app.html.heex index c0414df..af16941 100644 --- a/lib/chiya_web/components/layouts/root_app.html.heex +++ b/lib/chiya_web/components/layouts/root_app.html.heex @@ -4,9 +4,12 @@ - <.live_title suffix=" · Phoenix Framework"> - <%= assigns[:page_title] || "Chiya Admin" %> + <.live_title suffix={" · #{@settings.title}"}> + <%= assigns[:page_title] || "Admin" %> + + <.favicon /> + diff --git a/lib/chiya_web/components/layouts/root_public.html.heex b/lib/chiya_web/components/layouts/root_public.html.heex index 9568aa1..356e68d 100644 --- a/lib/chiya_web/components/layouts/root_public.html.heex +++ b/lib/chiya_web/components/layouts/root_public.html.heex @@ -4,9 +4,12 @@ - <.live_title suffix=" · Phoenix Framework"> - <%= assigns[:page_title] || "Chiya" %> + <.live_title suffix={" · #{@settings.title}"}> + <%= assigns[:page_title] || "Home" %> + + <.favicon /> + diff --git a/priv/static/browserconfig.xml b/priv/static/browserconfig.xml new file mode 100644 index 0000000..70cb989 --- /dev/null +++ b/priv/static/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/priv/static/favicon.ico b/priv/static/favicon.ico index 73de524..03cd5a7 100644 Binary files a/priv/static/favicon.ico and b/priv/static/favicon.ico differ diff --git a/priv/static/favicon/android-chrome-192x192.png b/priv/static/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..0c45ee8 Binary files /dev/null and b/priv/static/favicon/android-chrome-192x192.png differ diff --git a/priv/static/favicon/android-chrome-512x512.png b/priv/static/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..dc5670c Binary files /dev/null and b/priv/static/favicon/android-chrome-512x512.png differ diff --git a/priv/static/favicon/apple-touch-icon.png b/priv/static/favicon/apple-touch-icon.png new file mode 100644 index 0000000..b96ce9b Binary files /dev/null and b/priv/static/favicon/apple-touch-icon.png differ diff --git a/priv/static/favicon/favicon-16x16.png b/priv/static/favicon/favicon-16x16.png new file mode 100644 index 0000000..eda51d7 Binary files /dev/null and b/priv/static/favicon/favicon-16x16.png differ diff --git a/priv/static/favicon/favicon-32x32.png b/priv/static/favicon/favicon-32x32.png new file mode 100644 index 0000000..8e5af19 Binary files /dev/null and b/priv/static/favicon/favicon-32x32.png differ diff --git a/priv/static/favicon/mstile-150x150.png b/priv/static/favicon/mstile-150x150.png new file mode 100644 index 0000000..0837738 Binary files /dev/null and b/priv/static/favicon/mstile-150x150.png differ diff --git a/priv/static/favicon/safari-pinned-tab.svg b/priv/static/favicon/safari-pinned-tab.svg new file mode 100644 index 0000000..c91930f --- /dev/null +++ b/priv/static/favicon/safari-pinned-tab.svg @@ -0,0 +1,343 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + diff --git a/priv/static/site.webmanifest b/priv/static/site.webmanifest new file mode 100644 index 0000000..5eb5e44 --- /dev/null +++ b/priv/static/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/favicon/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/favicon/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +}