diff --git a/assets/js/app.js b/assets/js/app.js index df0cdd9..3a9c194 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -18,15 +18,15 @@ // Include phoenix_html to handle method=PUT/DELETE in forms and buttons. import "phoenix_html" // Establish Phoenix Socket and LiveView configuration. -import {Socket} from "phoenix" -import {LiveSocket} from "phoenix_live_view" +import { Socket } from "phoenix" +import { LiveSocket } from "phoenix_live_view" import topbar from "../vendor/topbar" let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content") -let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}}) +let liveSocket = new LiveSocket("/live", Socket, { params: { _csrf_token: csrfToken } }) // Show progress bar on live navigation and form submits -topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"}) +topbar.config({ barColors: { 0: "#29d" }, shadowColor: "rgba(0, 0, 0, .3)" }) window.addEventListener("phx:page-loading-start", _info => topbar.show(300)) window.addEventListener("phx:page-loading-stop", _info => topbar.hide()) diff --git a/config/dev.exs b/config/dev.exs index 4cdb8d1..f31fa7e 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -56,7 +56,7 @@ config :boardwise, BoardWiseWeb.Endpoint, config :boardwise, BoardWiseWeb.Endpoint, live_reload: [ patterns: [ - ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$", + ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg|ico)$", ~r"priv/gettext/.*(po)$", ~r"lib/boardwise_web/(controllers|live|components)/.*(ex|heex)$" ] diff --git a/lib/boardwise_web/components/layouts/app.html.heex b/lib/boardwise_web/components/layouts/app.html.heex index e23bfc8..a941dd7 100644 --- a/lib/boardwise_web/components/layouts/app.html.heex +++ b/lib/boardwise_web/components/layouts/app.html.heex @@ -1,32 +1,5 @@ -
-
-
- - - -

- v<%= Application.spec(:phoenix, :vsn) %> -

-
- -
-
-
-
- <.flash_group flash={@flash} /> - <%= @inner_content %> -
+
+
+ <.flash_group flash={@flash} /> + <%= @inner_content %>
diff --git a/lib/boardwise_web/components/layouts/root.html.heex b/lib/boardwise_web/components/layouts/root.html.heex index b935afc..d1d3db7 100644 --- a/lib/boardwise_web/components/layouts/root.html.heex +++ b/lib/boardwise_web/components/layouts/root.html.heex @@ -2,9 +2,14 @@ + - <.live_title suffix=" ยท Phoenix Framework"> + + <.live_title suffix=""> <%= assigns[:page_title] || "BoardWise" %> diff --git a/lib/boardwise_web/controllers/page_controller.ex b/lib/boardwise_web/controllers/page_controller.ex deleted file mode 100644 index 848f5a4..0000000 --- a/lib/boardwise_web/controllers/page_controller.ex +++ /dev/null @@ -1,9 +0,0 @@ -defmodule BoardWiseWeb.PageController do - use BoardWiseWeb, :controller - - def home(conn, _params) do - # The home page is often custom made, - # so skip the default app layout. - render(conn, :home, layout: false) - end -end diff --git a/lib/boardwise_web/controllers/page_html.ex b/lib/boardwise_web/controllers/page_html.ex deleted file mode 100644 index 9a8a6ea..0000000 --- a/lib/boardwise_web/controllers/page_html.ex +++ /dev/null @@ -1,5 +0,0 @@ -defmodule BoardWiseWeb.PageHTML do - use BoardWiseWeb, :html - - embed_templates "page_html/*" -end diff --git a/lib/boardwise_web/controllers/page_html/home.html.heex b/lib/boardwise_web/controllers/page_html/home.html.heex deleted file mode 100644 index e9fc48d..0000000 --- a/lib/boardwise_web/controllers/page_html/home.html.heex +++ /dev/null @@ -1,222 +0,0 @@ -<.flash_group flash={@flash} /> - -
-
- -

- Phoenix Framework - - v<%= Application.spec(:phoenix, :vsn) %> - -

-

- Peace of mind from prototype to production. -

-

- Build rich, interactive web applications quickly, with less code and fewer moving parts. Join our growing community of developers using Phoenix to craft APIs, HTML5 apps and more, for fun or at scale. -

- -
-
diff --git a/lib/boardwise_web/controllers/search_controller.ex b/lib/boardwise_web/controllers/search_controller.ex new file mode 100644 index 0000000..759a98a --- /dev/null +++ b/lib/boardwise_web/controllers/search_controller.ex @@ -0,0 +1,7 @@ +defmodule BoardWiseWeb.SearchController do + use BoardWiseWeb, :controller + + def index(conn, _params) do + render(conn, :index, layout: false) + end +end diff --git a/lib/boardwise_web/controllers/search_html.ex b/lib/boardwise_web/controllers/search_html.ex new file mode 100644 index 0000000..a2b772c --- /dev/null +++ b/lib/boardwise_web/controllers/search_html.ex @@ -0,0 +1,5 @@ +defmodule BoardWiseWeb.SearchHTML do + use BoardWiseWeb, :html + + embed_templates "search_html/*" +end diff --git a/lib/boardwise_web/controllers/search_html/index.html.heex b/lib/boardwise_web/controllers/search_html/index.html.heex new file mode 100644 index 0000000..637ed6e --- /dev/null +++ b/lib/boardwise_web/controllers/search_html/index.html.heex @@ -0,0 +1 @@ +<.flash_group flash={@flash} /> diff --git a/lib/boardwise_web/router.ex b/lib/boardwise_web/router.ex index 09cda01..a54f021 100644 --- a/lib/boardwise_web/router.ex +++ b/lib/boardwise_web/router.ex @@ -17,7 +17,7 @@ defmodule BoardWiseWeb.Router do scope "/", BoardWiseWeb do pipe_through :browser - get "/", PageController, :home + get "/", SearchController, :index end # Other scopes may use custom stacks. diff --git a/priv/static/favicon.ico b/priv/static/favicon.ico index 7f372bf..a114478 100644 Binary files a/priv/static/favicon.ico and b/priv/static/favicon.ico differ