From 8216060402b2f8fbd7ba816019bb0484f3f4b628 Mon Sep 17 00:00:00 2001 From: Robert Prehn Date: Sat, 22 Aug 2020 10:01:04 -0500 Subject: [PATCH] fix: Re-style sign in form --- .gitignore | 2 +- apps/admin/assets/js/app.js | 4 +- apps/app/assets/js/app.js | 4 +- apps/auth_web/assets/js/app.js | 2 +- .../templates/pow/session/new.html.eex | 67 +- apps/content/assets/js/app.js | 4 +- .../controllers/posts_controller.ex | 2 +- .../posts/static_pages/index.html.eex | 870 ++- apps/core/assets/.stylelintrc | 82 + apps/core/assets/css/app.css | 5 + apps/core/assets/css/app.scss | 8 - apps/core/assets/js/app.js | 13 +- apps/core/assets/package-lock.json | 4696 +++++++---------- apps/core/assets/package.json | 13 +- apps/core/assets/postcss.config.js | 10 + apps/core/assets/tailwind.config.js | 11 + apps/core/assets/webpack.config.js | 40 +- .../core_web/templates/layout/_menu.html.eex | 58 +- .../templates/layout/_side_menu.html.eex | 16 - .../core_web/templates/layout/app.html.eex | 6 +- apps/core/lib/core_web/views/helpers.ex | 48 +- config/config.exs | 2 +- 22 files changed, 2758 insertions(+), 3205 deletions(-) create mode 100644 apps/core/assets/.stylelintrc create mode 100644 apps/core/assets/css/app.css delete mode 100644 apps/core/assets/css/app.scss create mode 100644 apps/core/assets/postcss.config.js create mode 100644 apps/core/assets/tailwind.config.js delete mode 100644 apps/core/lib/core_web/templates/layout/_side_menu.html.eex diff --git a/.gitignore b/.gitignore index 83ed4a3e..64c37718 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ legendary-*.tar npm-debug.log # The directory NPM downloads your dependencies sources to. -/assets/node_modules/ +node_modules # Since we are building assets from assets/, # we ignore priv/static. You may want to comment diff --git a/apps/admin/assets/js/app.js b/apps/admin/assets/js/app.js index 8c02de5f..478f01b1 100644 --- a/apps/admin/assets/js/app.js +++ b/apps/admin/assets/js/app.js @@ -1,7 +1,7 @@ // We need to import the CSS so that webpack will load it. // The MiniCssExtractPlugin is used to separate it out into // its own CSS file. -import "../css/app.scss" +import "../css/app.css" // webpack automatically bundles all modules in your // entry points. Those entry points can be configured @@ -12,4 +12,4 @@ import "../css/app.scss" // import {Socket} from "phoenix" // import socket from "./socket" // -import "phoenix_html" \ No newline at end of file +import "phoenix_html" diff --git a/apps/app/assets/js/app.js b/apps/app/assets/js/app.js index 8c02de5f..478f01b1 100644 --- a/apps/app/assets/js/app.js +++ b/apps/app/assets/js/app.js @@ -1,7 +1,7 @@ // We need to import the CSS so that webpack will load it. // The MiniCssExtractPlugin is used to separate it out into // its own CSS file. -import "../css/app.scss" +import "../css/app.css" // webpack automatically bundles all modules in your // entry points. Those entry points can be configured @@ -12,4 +12,4 @@ import "../css/app.scss" // import {Socket} from "phoenix" // import socket from "./socket" // -import "phoenix_html" \ No newline at end of file +import "phoenix_html" diff --git a/apps/auth_web/assets/js/app.js b/apps/auth_web/assets/js/app.js index af005964..478f01b1 100644 --- a/apps/auth_web/assets/js/app.js +++ b/apps/auth_web/assets/js/app.js @@ -1,7 +1,7 @@ // We need to import the CSS so that webpack will load it. // The MiniCssExtractPlugin is used to separate it out into // its own CSS file. -import "../css/app.scss" +import "../css/app.css" // webpack automatically bundles all modules in your // entry points. Those entry points can be configured diff --git a/apps/auth_web/lib/auth_web/templates/pow/session/new.html.eex b/apps/auth_web/lib/auth_web/templates/pow/session/new.html.eex index c9f48d74..5031634f 100644 --- a/apps/auth_web/lib/auth_web/templates/pow/session/new.html.eex +++ b/apps/auth_web/lib/auth_web/templates/pow/session/new.html.eex @@ -1,41 +1,38 @@ -
-
-

-
- Log-in To My Account -
-

- <%= flash_block(@conn) %> - <%= changeset_error_block(@changeset) %> - <%= form_for @changeset, @action, [as: :user, class: "ui large form"], fn f -> %> -
-
-
- - <%= text_input f, Pow.Ecto.Schema.user_id_field(@changeset), placeholder: "E-mail address" %> +
+
+
+
+
+

Log In

+ <%= changeset_error_block(@changeset) %> +
+
+ <%= form_for @changeset, @action, [as: :user, class: "ui large form"], fn f -> %> + <%= styled_input f, Pow.Ecto.Schema.user_id_field(@changeset), icon: "user", placeholder: "joe@example.org" %> + <%= styled_input f, :password, icon: "lock", type: "password" %> + <%= hidden_input f, :persistent_session, value: "true" %> +
+ <%= submit "Sign In", class: "bg-gray-900 text-white active:bg-gray-700 text-sm font-bold uppercase px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 w-full" %> +
+ <% end %>
- <%= error_tag f, Pow.Ecto.Schema.user_id_field(@changeset), class: "ui error message" %>
-
-
- - <%= password_input f, :password, placeholder: "Password" %> +
+
+ New to us? <%= link "Register", to: Routes.pow_registration_path(@conn, :new) %>
- <%= error_tag f, :password, class: "ui error message" %> -
- <%= hidden_input f, :persistent_session, value: "true" %> - <%= submit "Login", class: "ui fluid large teal submit button" %> -
- <% end %> -
- New to us? <%= link "Register", to: Routes.pow_registration_path(@conn, :new) %> + <%= if pow_extension_enabled?(PowResetPassword) do %> +
+ Forgot your password? <%= link("Reset password", to: Routes.pow_reset_password_reset_password_path(@conn, :new)) %> +
+ <% end %> +
+
- - <%= if pow_extension_enabled?(PowResetPassword) do %> -
- Forgot your password? <%= link("Reset password", to: Routes.pow_reset_password_reset_password_path(@conn, :new)) %> -
- <% end %>
-
+
diff --git a/apps/content/assets/js/app.js b/apps/content/assets/js/app.js index 8c02de5f..478f01b1 100644 --- a/apps/content/assets/js/app.js +++ b/apps/content/assets/js/app.js @@ -1,7 +1,7 @@ // We need to import the CSS so that webpack will load it. // The MiniCssExtractPlugin is used to separate it out into // its own CSS file. -import "../css/app.scss" +import "../css/app.css" // webpack automatically bundles all modules in your // entry points. Those entry points can be configured @@ -12,4 +12,4 @@ import "../css/app.scss" // import {Socket} from "phoenix" // import socket from "./socket" // -import "phoenix_html" \ No newline at end of file +import "phoenix_html" diff --git a/apps/content/lib/content_web/controllers/posts_controller.ex b/apps/content/lib/content_web/controllers/posts_controller.ex index 4a439759..4b2c6f82 100644 --- a/apps/content/lib/content_web/controllers/posts_controller.ex +++ b/apps/content/lib/content_web/controllers/posts_controller.ex @@ -72,7 +72,7 @@ defmodule Content.PostsController do defp try_static_post(conn, id) do path = "static_pages/#{id}.html" try do - render(conn, path) + render(conn |> put_flash(:error, "Tits!"), path) rescue e in Phoenix.Template.UndefinedError -> case e do diff --git a/apps/content/lib/content_web/templates/posts/static_pages/index.html.eex b/apps/content/lib/content_web/templates/posts/static_pages/index.html.eex index 3e6e859f..cd677aec 100644 --- a/apps/content/lib/content_web/templates/posts/static_pages/index.html.eex +++ b/apps/content/lib/content_web/templates/posts/static_pages/index.html.eex @@ -1,180 +1,700 @@ - - -
-
-
-

- Imagine-a-Company -

-

Do whatever you want when you want to.

-
Get Started
+
+
+
+
-
-
- -
-
-
-
-

We Help Companies and Companions

-

We can give your company superpowers to do things that they never thought possible. Let us delight your customers and empower your needs...through pure data analytics.

-

We Make Bananas That Can Dance

-

Yes that's right, you thought it was the stuff of dreams, but even bananas can be bioengineered.

-
-
- -
-
-
- -
-
-
- - -
-
-
-
-

"What a Company"

-

That is what they all say about us

-
-
-

"I shouldn't have gone with their competitor."

-

- Nan Chief Fun Officer Acme Toys -

-
-
-
-
- -
-
-

Breaking The Grid, Grabs Your Attention

-

Instead of focusing on content creation and hard work, we have learned how to master the art of doing nothing by providing massive amounts of whitespace and generic content that can seem massive, monolithic and worth your attention.

- Read More -

- Case Studies -

-

Did We Tell You About Our Bananas?

-

Yes I know you probably disregarded the earlier boasts as non-sequitur filler content, but its really true. It took years of gene splicing and combinatory DNA research, but our bananas can really dance.

- I'm Still Quite Interested -
-
- - -