add links
This commit is contained in:
parent
3842798968
commit
e2b802f968
54 changed files with 4984 additions and 6 deletions
30
lib/zoeyscomputer_web/live/link_live/index.html.heex
Normal file
30
lib/zoeyscomputer_web/live/link_live/index.html.heex
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<div class="flex gap-2">
|
||||
<h1 class="text-2xl grow font-bold">Links</h1>
|
||||
|
||||
<.link
|
||||
navigate={~p"/links/new"}
|
||||
class="bg-black border border-black hover:bg-gray-700 text-white font-bold py-2 px-3 rounded-md"
|
||||
>
|
||||
Add Link
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
<div class="divide-y">
|
||||
<div :for={link <- @links}>
|
||||
<div>
|
||||
<div class="font-bold"><%= link.url %></div>
|
||||
<div class="text-sm"><%= link.inserted_at %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<.form for={@form} phx-submit="submit">
|
||||
<div class="flex gap-2 items-end">
|
||||
<div class="grow">
|
||||
<.input field={@form[:url]} type="text" label="url" />
|
||||
</div>
|
||||
<button class="bg-black border border-black hover:bg-gray-700 text-white font-bold py-2 px-3 rounded-md">
|
||||
Create
|
||||
</button>
|
||||
</div>
|
||||
</.form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue