From 23a0ba68b9bb9cacc1da9f0f419e8e4fe7898160 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 6 Jan 2026 14:46:39 -0600 Subject: [PATCH] separate out marketing layouts --- lib/towerops_web.ex | 1 + lib/towerops_web/components/layouts.ex | 72 ----------------- .../components/marketing_layouts.ex | 78 +++++++++++++++++++ .../controllers/page_html/home.html.heex | 4 +- 4 files changed, 81 insertions(+), 74 deletions(-) create mode 100644 lib/towerops_web/components/marketing_layouts.ex diff --git a/lib/towerops_web.ex b/lib/towerops_web.ex index ab69e9c3..a1aaa6c1 100644 --- a/lib/towerops_web.ex +++ b/lib/towerops_web.ex @@ -90,6 +90,7 @@ defmodule ToweropsWeb do # Common modules used in templates alias Phoenix.LiveView.JS alias ToweropsWeb.Layouts + alias ToweropsWeb.MarketingLayouts # Routes generation with the ~p sigil unquote(verified_routes()) diff --git a/lib/towerops_web/components/layouts.ex b/lib/towerops_web/components/layouts.ex index d5cce81c..346f25d1 100644 --- a/lib/towerops_web/components/layouts.ex +++ b/lib/towerops_web/components/layouts.ex @@ -303,78 +303,6 @@ defmodule ToweropsWeb.Layouts do """ end - @doc """ - Renders the marketing layout. - - Use this for public-facing marketing pages. - - ## Examples - - -

Marketing Content

-
- - """ - attr :flash, :map, required: true, doc: "the map of flash messages" - - slot :inner_block, required: true - - def marketing(assigns) do - ~H""" -
-
-
- -
-
- -
- {render_slot(@inner_block)} -
- -
-
-
- Towerops -
-
-
-

- Copyright © 2025 Towerops. All rights reserved. -

-
-
-
-
- - <.flash_group flash={@flash} /> - """ - end - @doc """ Renders the admin layout. diff --git a/lib/towerops_web/components/marketing_layouts.ex b/lib/towerops_web/components/marketing_layouts.ex new file mode 100644 index 00000000..9792c3aa --- /dev/null +++ b/lib/towerops_web/components/marketing_layouts.ex @@ -0,0 +1,78 @@ +defmodule ToweropsWeb.MarketingLayouts do + @moduledoc """ + Marketing layouts for public-facing pages. + """ + use ToweropsWeb, :html + + @doc """ + Renders the marketing layout. + + Use this for public-facing marketing pages. + + ## Examples + + +

Marketing Content

+
+ + """ + attr :flash, :map, required: true, doc: "the map of flash messages" + + slot :inner_block, required: true + + def marketing(assigns) do + ~H""" +
+
+
+ +
+
+ +
+ {render_slot(@inner_block)} +
+ +
+
+
+ Towerops +
+
+
+

+ Copyright © 2025 Towerops. All rights reserved. +

+
+
+
+
+ + + """ + end +end diff --git a/lib/towerops_web/controllers/page_html/home.html.heex b/lib/towerops_web/controllers/page_html/home.html.heex index f32086ea..475bf01b 100644 --- a/lib/towerops_web/controllers/page_html/home.html.heex +++ b/lib/towerops_web/controllers/page_html/home.html.heex @@ -1,4 +1,4 @@ - +

@@ -210,4 +210,4 @@

-
+