From 3100d2802c037c0510f41f36b32a1cf51765e55f Mon Sep 17 00:00:00 2001 From: nelsonic Date: Mon, 31 Aug 2020 08:21:54 +0100 Subject: [PATCH] update html forms / tables to be more visually appealing #95 --- lib/auth_web/templates/app/form.html.eex | 31 +++++++++++++---------- lib/auth_web/templates/app/index.html.eex | 30 +++++++++++++--------- lib/auth_web/templates/app/new.html.eex | 14 +++++++--- 3 files changed, 46 insertions(+), 29 deletions(-) diff --git a/lib/auth_web/templates/app/form.html.eex b/lib/auth_web/templates/app/form.html.eex index 7a669661..ae40a158 100644 --- a/lib/auth_web/templates/app/form.html.eex +++ b/lib/auth_web/templates/app/form.html.eex @@ -5,23 +5,26 @@ <% end %> - <%= label f, :name %> - <%= text_input f, :name %> + <%= label f, :name%> + <%= text_input f, :name, class: "db w-100 mt2 pa2 ba b--dark-grey", + placeholder: "A distinctive name"%> <%= error_tag f, :name %> - - <%= label f, :description %> - <%= text_input f, :description %> +
+ <%= label f, :description, class: "mt3" %> + <%= textarea f, :description, class: "db w-100 mt2 pa2 ba b--black", + placeholder: "Be as descriptive as possible." %> <%= error_tag f, :description %> - - <%= label f, :url %> - <%= text_input f, :url %> +
+ <%= label f, :url, class: "pt3" %> + <%= text_input f, :url, class: "db w-100 mt2 pa2 ba b--dark-grey", + placeholder: "The URL of your app e.g: http://localhost:4000 or dwyl.com" + %> <%= error_tag f, :url %> - <%= label f, :end %> - <%= datetime_select f, :end %> - <%= error_tag f, :end %> - -
- <%= submit "Save" %> +
+ <%= submit "Save", + class: "pointer br2 ba b--dark-green bg-green white pa3 ml1 mv1 f4 + shadow-hover bg-animate hover-bg-dark-green border-box no-underline" + %>
<% end %> diff --git a/lib/auth_web/templates/app/index.html.eex b/lib/auth_web/templates/app/index.html.eex index 948b2925..454dd2a1 100644 --- a/lib/auth_web/templates/app/index.html.eex +++ b/lib/auth_web/templates/app/index.html.eex @@ -1,14 +1,11 @@ -

Listing Apps

+

Apps

- - - - - - - - - +
NameDescriptionUrlEnd
+ + + + + @@ -17,8 +14,6 @@ - -
NameDescriptionUrl
<%= app.name %> <%= app.description %> <%= app.url %><%= app.end %> <%= link "Show", to: Routes.app_path(@conn, :show, app) %> <%= link "Edit", to: Routes.app_path(@conn, :edit, app) %> @@ -30,3 +25,14 @@
<%= link "New App", to: Routes.app_path(@conn, :new) %> + + \ No newline at end of file diff --git a/lib/auth_web/templates/app/new.html.eex b/lib/auth_web/templates/app/new.html.eex index 517173bc..5e8872b4 100644 --- a/lib/auth_web/templates/app/new.html.eex +++ b/lib/auth_web/templates/app/new.html.eex @@ -1,5 +1,13 @@ -

New App

+
+

New App

-<%= render "form.html", Map.put(assigns, :action, Routes.app_path(@conn, :create)) %> + <%= render "form.html", Map.put(assigns, :action, Routes.app_path(@conn, :create)) %> -<%= link "Back", to: Routes.app_path(@conn, :index) %> + <%= link "< Back", to: Routes.app_path(@conn, :index), + class: "fl pointer br2 ba b--orange bg-gold white pa3 f4 mt3 + shadow-hover bg-animate hover-bg-orange border-box no-underline", + data: + [confirm: "Are you sure you want to disguard this form? + (The data cannot be recovered!)"] + %> +
\ No newline at end of file