create gists
This commit is contained in:
parent
79a17290d5
commit
43a8412f06
90 changed files with 1777 additions and 2107 deletions
27
lib/zoeyscomputer_web/live/gist_live/show.html.heex
Normal file
27
lib/zoeyscomputer_web/live/gist_live/show.html.heex
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<.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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue