27 lines
735 B
Text
27 lines
735 B
Text
<.header>
|
|
Gist <%= @gist.id %>
|
|
<:subtitle>This is a gist record from your database.</:subtitle>
|
|
<:actions>
|
|
<.link patch={~p"/gists/#{@gist}/show/edit"} phx-click={JS.push_focus()}>
|
|
<.button>Edit gist</.button>
|
|
</.link>
|
|
</:actions>
|
|
</.header>
|
|
|
|
<.list>
|
|
<:item title="Code"><%= @gist.code %></:item>
|
|
<:item title="Lang"><%= @gist.lang %></:item>
|
|
</.list>
|
|
|
|
<.back navigate={~p"/gists"}>Back to gists</.back>
|
|
|
|
<.modal :if={@live_action == :edit} id="gist-modal" show on_cancel={JS.patch(~p"/gists/#{@gist}")}>
|
|
<.live_component
|
|
module={ZoeyscomputerWeb.GistLive.FormComponent}
|
|
id={@gist.id}
|
|
title={@page_title}
|
|
action={@live_action}
|
|
gist={@gist}
|
|
patch={~p"/gists/#{@gist}"}
|
|
/>
|
|
</.modal>
|