diff --git a/lib/pinchflat_web/components/layouts/root.html.heex b/lib/pinchflat_web/components/layouts/root.html.heex index 8dbdc8d..c562aa7 100644 --- a/lib/pinchflat_web/components/layouts/root.html.heex +++ b/lib/pinchflat_web/components/layouts/root.html.heex @@ -12,7 +12,7 @@ -
+ <%= @inner_content %> diff --git a/lib/pinchflat_web/controllers/pages/page_controller.ex b/lib/pinchflat_web/controllers/pages/page_controller.ex index 8f5a0bc..5265796 100644 --- a/lib/pinchflat_web/controllers/pages/page_controller.ex +++ b/lib/pinchflat_web/controllers/pages/page_controller.ex @@ -1,8 +1,10 @@ defmodule PinchflatWeb.Pages.PageController do + alias Pinchflat.Media.MediaItem use PinchflatWeb, :controller alias Pinchflat.Repo alias Pinchflat.Sources.Source + alias Pinchflat.Media.MediaItem alias Pinchflat.Profiles.MediaProfile def home(conn, params) do @@ -18,9 +20,17 @@ defmodule PinchflatWeb.Pages.PageController do end defp render_home_page(conn) do + media_profile_count = Repo.aggregate(MediaProfile, :count, :id) + source_count = Repo.aggregate(Source, :count, :id) + media_item_count = Repo.aggregate(MediaItem, :count, :id) + conn |> put_session(:onboarding, false) - |> render(:home) + |> render(:home, + media_profile_count: media_profile_count, + source_count: source_count, + media_item_count: media_item_count + ) end defp render_onboarding_page(conn, media_profiles_exist, sources_exist) do diff --git a/lib/pinchflat_web/controllers/pages/page_html/home.html.heex b/lib/pinchflat_web/controllers/pages/page_html/home.html.heex index cecaf9e..a21d152 100644 --- a/lib/pinchflat_web/controllers/pages/page_html/home.html.heex +++ b/lib/pinchflat_web/controllers/pages/page_html/home.html.heex @@ -1,8 +1,27 @@ -For now, the options in the sidebar have what you need
+