From 654fcb541cc86771302c11672c66c06a9b934a73 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 17 Jan 2026 11:05:39 -0600 Subject: [PATCH] Add footer with dynamic copyright year to all layouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add footer component to app, authenticated, and admin layouts - Update marketing layout footer to use dynamic year - Use flexbox layout to push footer to bottom of viewport - Footer displays 'Copyright © Towerops' - Year updates automatically using Date.utc_today().year --- lib/towerops_web/components/layouts.ex | 41 +++++++++++++++---- .../components/marketing_layouts.ex | 2 +- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/lib/towerops_web/components/layouts.ex b/lib/towerops_web/components/layouts.ex index 0ce601ae..dbcff59c 100644 --- a/lib/towerops_web/components/layouts.ex +++ b/lib/towerops_web/components/layouts.ex @@ -35,7 +35,7 @@ defmodule ToweropsWeb.Layouts do def app(assigns) do ~H""" -
+
-
+
{render_slot(@inner_block)}
+ + <.footer />
<.flash_group flash={@flash} /> @@ -103,7 +105,7 @@ defmodule ToweropsWeb.Layouts do def authenticated(assigns) do ~H""" -
+
<%= if @current_scope && @current_scope.impersonating? do %>
@@ -224,11 +226,13 @@ defmodule ToweropsWeb.Layouts do
-
+
{render_slot(@inner_block)}
+ + <.footer />
<.flash_group flash={@flash} /> @@ -355,7 +359,7 @@ defmodule ToweropsWeb.Layouts do def admin(assigns) do ~H""" -
+
-
- {render_slot(@inner_block)} -
-
+
+
+ {render_slot(@inner_block)} +
+
+ + <.footer /> +
<.flash_group flash={@flash} /> """ end + + @doc """ + Renders the application footer with copyright notice. + """ + def footer(assigns) do + ~H""" +
+
+

+ Copyright © {Date.utc_today().year} Towerops +

+
+
+ """ + end end diff --git a/lib/towerops_web/components/marketing_layouts.ex b/lib/towerops_web/components/marketing_layouts.ex index 9792c3aa..3cb891a3 100644 --- a/lib/towerops_web/components/marketing_layouts.ex +++ b/lib/towerops_web/components/marketing_layouts.ex @@ -65,7 +65,7 @@ defmodule ToweropsWeb.MarketingLayouts do

- Copyright © 2025 Towerops. All rights reserved. + Copyright © {Date.utc_today().year} Towerops