defmodule LivebookWeb.LearnHelpers do use Phoenix.Component use LivebookWeb, :verified_routes @doc """ Renders an learn notebook card. """ attr :notebook_info, :map, required: true def notebook_card(assigns) do ~H""" <.link navigate={~p"/learn/notebooks/#{@notebook_info.slug}"} class="flex flex-col border-2 border-gray-100 hover:border-gray-200 rounded-2xl" >
{"#{@notebook_info.title}
<%= @notebook_info.title %>

<%= @notebook_info.details.description %>

""" end defp img_src("data:" <> _ = url), do: url defp img_src(url), do: url end