katbin/lib/ketbin_web/templates/page/form.html.heex
SphericalKat 2fa19381dc
refactor(home): use heex templates
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-10-07 05:52:14 +05:30

22 lines
1.1 KiB
Plaintext

<%= form_for @changeset, @action, [class: "flex flex-col w-full h-full relative"], fn f -> %>
<%= if @changeset.action do %>
<div class="w-full text-center bg-amber">
<p>Oops, something went wrong!</p>
</div>
<% end %>
<div class="w-full h-full">
<%= textarea f, :content, [class: "w-full h-full px-6 py-4 outline-none bg-light-grey font-bold resize-none", placeholder: "> Paste, save, share! (Pasting just a URL will shorten it!)"] %>
<div class="flex absolute top-0 right-0 p-4">
<button type="submit">
<svg
class="h-6 w-6 cursor-pointer fill-current text-white hover:text-amber"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24">
<path d="M17.6 3.6c-.4-.4-.9-.6-1.4-.6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.8c0-.5-.2-1-.6-1.4l-2.8-2.8zM12 19c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3zm1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2z"/>
</svg>
</button>
</div>
</div>
<% end %>