diff --git a/lib/wild_web/live/book_thoughts.ex b/lib/wild_web/live/book_thoughts.ex index ae387cb..8cb1040 100644 --- a/lib/wild_web/live/book_thoughts.ex +++ b/lib/wild_web/live/book_thoughts.ex @@ -1,3 +1,41 @@ defmodule WildWeb.BookThoughts do use WildWeb, :live_view + + def render(assigns) do + ~H""" +
+ <.header class="text-center"> + Write your thoughts for a book or a series of books + <:subtitle> + Share your thoughts and suggestion on the book that you just read + + + + <.simple_form for={@form} id="login_form" action={~p"/account/log_in"} phx-update="ignore"> + <.input field={@form[:email]} type="text" label="Book Title" required /> + <.input field={@form[:password]} type="number" label="Publication Year" required /> + <.input field={@form[:password]} type="range" label="Rating" required /> + + <:actions> + <.input field={@form[:remember_me]} type="checkbox" label="Keep me logged in" /> + <.link href={~p"/account/reset_password"} class="text-sm font-semibold"> + Forgot your password? + + + <:actions> + <.button phx-disable-with="Logging in..." class="w-full"> + Log in + + + +
+ """ + end + + def mount(_params, _session, socket) do + email = Phoenix.Flash.get(socket.assigns.flash, :email) + form = to_form(%{"email" => email}, as: "user") + {:ok, assign(socket, form: form), temporary_assigns: [form: form]} + end + end diff --git a/lib/wild_web/live/books_thoughts.html.heex b/lib/wild_web/live/books_thoughts.html.heex deleted file mode 100644 index 24f1dfe..0000000 --- a/lib/wild_web/live/books_thoughts.html.heex +++ /dev/null @@ -1,37 +0,0 @@ -

Our Book Journey

- -
-

Book name

-

Review times

-
- -
- - -
- -
-

- Book Name -

- -

- 4 thoughts -

-
- -

- by author name, published 1999 -

- -
-

- Recent thoughts from Thu -

-

- Some quick example text to build on the card title and make up the bulk of the card's content. -

-
- -
-