prop/lib/microwaveprop_web/live/algo_live.ex
Graham McIntire c3a5cf4b1a
Add Maidenhead grid overlay, consolidate map controls, improve UX
- Port grid square rendering from gridmap-web with toggle control
- Consolidate band selector, grid toggle, data timestamp, and links
  into unified control panel
- Add "How this works" (/algo) and "Submit a QSO" (/submit) links
- Add back-to-map link on algo page
- Darken range circles for visibility over propagation overlay
- Fix popup blocking double-click zoom with pointer-events passthrough
- Prevent control panel from intercepting map click/scroll events
2026-03-31 10:15:21 -05:00

30 lines
705 B
Elixir

defmodule MicrowavepropWeb.AlgoLive do
@moduledoc false
use MicrowavepropWeb, :live_view
@algo_path Path.join(:code.priv_dir(:microwaveprop), "../algo.md")
@impl true
def mount(_params, _session, socket) do
content =
@algo_path
|> File.read!()
|> Earmark.as_html!()
{:ok, assign(socket, page_title: "Algorithm", content: content)}
end
@impl true
def render(assigns) do
~H"""
<div class="markdown-content">
<div class="mb-4">
<.link navigate="/map" class="btn btn-lg btn-ghost text-lg">
<.icon name="hero-arrow-left" class="size-4" /> Back to map
</.link>
</div>
{raw(@content)}
</div>
"""
end
end