From 71ac91050815549eea9e03c4f3abd6bb8ae24881 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 27 Jul 2020 18:18:15 -0500 Subject: [PATCH] OAuth form: revamp account header styles --- .../web/templates/o_auth/o_auth/show.html.eex | 71 +++++++++++----------- priv/static/instance/static.css | 50 +++++++++------ 2 files changed, 69 insertions(+), 52 deletions(-) diff --git a/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex b/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex index d7efbf184..68b095c87 100644 --- a/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex +++ b/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex @@ -9,46 +9,47 @@ <%= if @user do %>
-
- -
-
- Signed in as: -
@<%= @user.nickname %>
+ + +
<% end %> -<%= if @app do %> -

Application <%= @app.client_name %> is requesting access to your account.

- <%= render @view_module, "_scopes.html", Map.merge(assigns, %{form: f}) %> -<% end %> - -<%= if @user do %> - <%= submit "Authorize" %> -<% else %> - <%= if @params["registration"] in ["true", true] do %> -

This is the first time you visit! Please enter your Pleroma handle.

-

Choose carefully! You won't be able to change this later. You will be able to change your display name, though.

-
- <%= label f, :nickname, "Pleroma Handle" %> - <%= text_input f, :nickname, placeholder: "lain" %> -
- <%= hidden_input f, :name, value: @params["name"] %> - <%= hidden_input f, :password, value: @params["password"] %> -
- <% else %> -
- <%= label f, :name, "Username" %> - <%= text_input f, :name %> -
-
- <%= label f, :password, "Password" %> - <%= password_input f, :password %> -
- <%= submit "Log In" %> +
+ <%= if @app do %> +

Application <%= @app.client_name %> is requesting access to your account.

+ <%= render @view_module, "_scopes.html", Map.merge(assigns, %{form: f}) %> <% end %> -<% end %> + + <%= if @user do %> + <%= submit "Authorize" %> + <% else %> + <%= if @params["registration"] in ["true", true] do %> +

This is the first time you visit! Please enter your Pleroma handle.

+

Choose carefully! You won't be able to change this later. You will be able to change your display name, though.

+
+ <%= label f, :nickname, "Pleroma Handle" %> + <%= text_input f, :nickname, placeholder: "lain" %> +
+ <%= hidden_input f, :name, value: @params["name"] %> + <%= hidden_input f, :password, value: @params["password"] %> +
+ <% else %> +
+ <%= label f, :name, "Username" %> + <%= text_input f, :name %> +
+
+ <%= label f, :password, "Password" %> + <%= password_input f, :password %> +
+ <%= submit "Log In" %> + <% end %> + <% end %> +
<%= hidden_input f, :client_id, value: @client_id %> <%= hidden_input f, :response_type, value: @response_type %> diff --git a/priv/static/instance/static.css b/priv/static/instance/static.css index ccc48c294..1531a759c 100644 --- a/priv/static/instance/static.css +++ b/priv/static/instance/static.css @@ -46,14 +46,18 @@ body { .container { max-width: 400px; - padding: 20px; background-color: var(--foreground-color); border-radius: 4px; + overflow: hidden; margin: auto; margin-top: 35px; box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.5); } +.container__content { + padding: 0 20px; +} + h1 { margin: 0; font-size: 24px; @@ -208,26 +212,38 @@ button:hover { font-size: 16px; } -.account-header { - display: flex; -} - -.account-header .avatar { - display: flex; - max-width: 60px; - margin-right: 10px; -} - -.account-header .avatar img { +.account-header__banner { width: 100%; - border-radius: 4px; + height: 112px; + background-size: cover; + background-position: center; +} + +.account-header__avatar { + width: 94px; + height: 94px; + background-size: cover; + background-position: center; + margin: -47px 10px 0; + border: 6px solid var(--foreground-color); + border-radius: 999px; +} + +.account-header__meta { + padding: 6px 20px 17px; +} + +.account-header__display-name { + font-size: 20px; + font-weight: bold; +} + +.account-header__nickname { + font-size: 14px; + color: var(--muted-text-color); } @media all and (max-width: 440px) { - .container { - margin-top: 0 - } - .scope { flex-basis: 0%; }