Commit 8de75bcb70963452d7a2f12ad813146f4800662e

Thomas de Grivel 2021-12-09T13:35:23

favicon. move assets to _assets

diff --git a/config/config.exs b/config/config.exs
index 4075e09..799c8c7 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -23,7 +23,7 @@ config :kmxgit, KmxgitWeb.Endpoint,
 config :dart_sass,
   version: "1.39.0",
   default: [
-    args: ~w(css/app.scss ../priv/static/assets/app.css),
+    args: ~w(css/app.scss ../priv/static/_assets/app.css),
     cd: Path.expand("../assets", __DIR__)
   ]
 
@@ -44,7 +44,7 @@ config :esbuild,
   version: "0.12.18",
   default: [
     args:
-      ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/assets --external:/fonts/* --external:/images/*),
+      ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/_assets --external:/fonts/* --external:/images/*),
     cd: Path.expand("../assets", __DIR__),
     env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
   ]
diff --git a/lib/kmxgit_web/endpoint.ex b/lib/kmxgit_web/endpoint.ex
index 3ca39da..d8de8b5 100644
--- a/lib/kmxgit_web/endpoint.ex
+++ b/lib/kmxgit_web/endpoint.ex
@@ -20,7 +20,7 @@ defmodule KmxgitWeb.Endpoint do
     at: "/",
     from: :kmxgit,
     gzip: false,
-    only: ~w(assets fonts images favicon.ico robots.txt)
+    only: ~w(_assets _fonts _images robots.txt)
 
   # Code reloading can be explicitly enabled under the
   # :code_reloader configuration of your endpoint.
diff --git a/lib/kmxgit_web/templates/layout/admin.html.heex b/lib/kmxgit_web/templates/layout/admin.html.heex
index 8588192..206ed0c 100644
--- a/lib/kmxgit_web/templates/layout/admin.html.heex
+++ b/lib/kmxgit_web/templates/layout/admin.html.heex
@@ -10,8 +10,10 @@
     <% else %>
       <%= live_title_tag "kmx git [admin]" %>
     <% end %>
-    <link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")}/>
-    <script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/assets/app.js")}></script>
+    <link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/_assets/app.css")}/>
+    <script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/_assets/app.js")}></script>
+    <link rel="icon" type="image/png" sizes="32x32" href="/_images/git.32.png">
+    <link rel="icon" type="image/png" sizes="16x16" href="/_images/git.16.png">
   </head>
   <body>
     <%= render "admin_nav.html", assigns %>
diff --git a/lib/kmxgit_web/templates/layout/root.html.heex b/lib/kmxgit_web/templates/layout/root.html.heex
index 4f640a3..772fde7 100644
--- a/lib/kmxgit_web/templates/layout/root.html.heex
+++ b/lib/kmxgit_web/templates/layout/root.html.heex
@@ -10,8 +10,10 @@
     <% else %>
       <%= live_title_tag "kmx git" %>
     <% end %>
-    <link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")}/>
-    <script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/assets/app.js")}></script>
+    <link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/_assets/app.css")}/>
+    <script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/_assets/app.js")}></script>
+    <link rel="icon" type="image/png" sizes="32x32" href="/_images/git.32.png">
+    <link rel="icon" type="image/png" sizes="16x16" href="/_images/git.16.png">
   </head>
   <body>
     <%= render "nav.html", assigns %>
diff --git a/priv/static/_images/git.128.png b/priv/static/_images/git.128.png
new file mode 100644
index 0000000..1d68b87
Binary files /dev/null and b/priv/static/_images/git.128.png differ
diff --git a/priv/static/_images/git.32.png b/priv/static/_images/git.32.png
new file mode 100644
index 0000000..a328589
Binary files /dev/null and b/priv/static/_images/git.32.png differ
diff --git a/priv/static/_images/git.48.png b/priv/static/_images/git.48.png
new file mode 100644
index 0000000..97872bb
Binary files /dev/null and b/priv/static/_images/git.48.png differ
diff --git a/priv/static/_images/git.64.png b/priv/static/_images/git.64.png
new file mode 100644
index 0000000..8499e0c
Binary files /dev/null and b/priv/static/_images/git.64.png differ