Skip to content

Commit

Permalink
Use external heex template for show_verse
Browse files Browse the repository at this point in the history
Just playing around with things...
  • Loading branch information
rtshkmr committed Dec 19, 2023
1 parent 3ea3a4f commit f5b2b05
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions lib/vyasa_web/live/gita_live/show_verse.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,6 @@ defmodule VyasaWeb.GitaLive.ShowVerse do
{:ok, socket}
end

@impl true
def render(assigns) do
~H"""
<.header>
<:subtitle><%= @verse.chapter_number %>:<%= @verse.verse_number %></:subtitle>
<p class="font-dn text-2xl"><%= @verse.text |> String.split("।।") |> List.first() %></p>
</.header>
<br />
<p><%= @verse.transliteration %></p>
<br />
<p><%= @verse.word_meanings %></p>
<br />
<.button
phx-hook="ShareQuoteButton"
id="ShareQuoteButton"
data-verse={Jason.encode!(@verse)}
data-share-title={"Gita Chapter #{@verse.chapter_number} #{@verse.title}"}
>
Share
</.button>
<.back navigate={~p"/gita/#{@verse.chapter_number}"}>
Back to Gita Chapter <%= @verse.chapter_number %>
</.back>
<.back navigate={~p"/gita"}>Back to Gita</.back>
"""
end

# <.link patch={~p"/gita/#{@chapter.id}"} phx-click={JS.push_focus()}> <.button>Annotate</.button> </.link>
@impl true
def handle_params(%{"chapter_id" => chapter_no, "verse_id" => verse_no}, _, socket) do
{:noreply,
Expand Down

0 comments on commit f5b2b05

Please sign in to comment.