diff --git a/lib/mcp_registry_web/components/layouts.ex b/lib/mcp_registry_web/components/layouts.ex index e57b68a..1205fcb 100644 --- a/lib/mcp_registry_web/components/layouts.ex +++ b/lib/mcp_registry_web/components/layouts.ex @@ -73,6 +73,7 @@ defmodule McpRegistryWeb.Layouts do <.nav_link navigate={~p"/servers"} current={@active == :servers}>servers <.nav_link href={~p"/api/v0/servers"} current={false}>api <.nav_link href={~p"/llms.txt"} current={false}>llms.txt + <.nav_link href="https://gateway.mcpharbor.dev" current={false}>gateway <.theme_toggle /> <.link @@ -129,13 +130,11 @@ defmodule McpRegistryWeb.Layouts do <:link_item href={~p"/llms.txt"}>llms.txt <:link_item href={~p"/api/v0/servers"}>JSON API <:link_item href={~p"/mcp"}>MCP endpoint + <:link_item href="https://gateway.mcpharbor.dev">MCP Gateway <.footer_column title="Project"> - <:link_item href="https://github.com/lbesecker195/MCP_Registry"> - Source on GitHub - - <:link_item href="https://github.com/lbesecker195/MCP_Registry/wiki">Wiki + <:link_item navigate={~p"/book"}>The book <:link_item href="https://seriouslysimpleanalytics.com"> Seriously Simple Analytics @@ -145,17 +144,22 @@ defmodule McpRegistryWeb.Layouts do
Copyright LoganBesecker.com 2026 · Apache 2.0 - <%!-- DB-IP's free database is CC BY 4.0; this credit is a condition - of the licence, not a recommendation. Removing it means the - geo data can no longer be used. --%> - · IP data from - - DB-IP - + <%!-- DB-IP's free database is CC BY 4.0, and the credit is a + condition of that licence rather than a recommendation. It is + therefore tied to whether the data is actually loaded: geo + blocking is off, so nothing here uses DB-IP and no credit is + owed. Switch GEO_BLOCK_ENABLED on and the credit comes back + by itself, which is safer than remembering to re-add it. --%> + + · IP data from + + DB-IP + + Analytics by @@ -176,6 +180,15 @@ defmodule McpRegistryWeb.Layouts do """ end + # True only when a geo database is actually configured to load. The DB-IP + # credit is a licence condition on *use* of the data, so it follows this + # rather than being hardcoded. + defp geo_data_in_use? do + Application.get_env(:mcp_registry, :geo_block, []) + |> Keyword.get(:cities, []) + |> Enum.any?() + end + attr :current, :boolean, default: false attr :rest, :global, include: ~w(href navigate patch) slot :inner_block, required: true @@ -228,10 +241,12 @@ defmodule McpRegistryWeb.Layouts do belongs to the page frame, not to the listing being described, and any page can drop it into a sidebar. - The book is a live affiliate link and carries `rel="sponsored"`, which is - what Google asks for on paid or affiliate placements — without it the link - reads as an editorial endorsement and puts the whole page's ranking at risk. - The other three are unsold, and open a pre-filled enquiry email so an + The book tile points at `/book`, not at Amazon. A cold click from a 250px + tile to a product page converts badly; the landing page names the reader's + problem first and asks for the click afterwards, and the visit stays on the + site in the meantime. `/book` carries the affiliate link and its disclosure. + + The other three slots are unsold, and open a pre-filled enquiry email so an interested buyer can name a price without leaving the page. Image paths go through `~p`, which appends the digest that @@ -252,8 +267,8 @@ defmodule McpRegistryWeb.Layouts do @sponsor_slots [ %{ file: "Book.png", - alt: "Sponsored: book cover — opens Amazon", - kind: :affiliate + alt: "MCP Server Optimization — the book behind this registry", + kind: :book }, %{file: "sponsor-1.png", alt: "Sponsor slot available — email to enquire", kind: :enquiry}, %{file: "sponsor-2.png", alt: "Sponsor slot available — email to enquire", kind: :enquiry}, @@ -289,18 +304,14 @@ defmodule McpRegistryWeb.Layouts do `scale: 1.4` while `transform` stays `none`. --%>