diff --git a/lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex b/lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex index 310bf2358..76e8b0baf 100644 --- a/lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex +++ b/lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex @@ -5,10 +5,19 @@ <% # Note: using hidden input with `unchecked_value` in order to distinguish user's empty selection from `scope` param being omitted %> <%= if scope in @scopes do %>
- <%= checkbox @form, :"scope_#{scope}", value: scope in @scopes && scope, checked_value: scope, unchecked_value: "", name: "authorization[scope][]" %> - <%= label @form, :"scope_#{scope}", String.capitalize(scope) %> + + <%= checkbox @form, :"scope_#{scope}", value: scope in @scopes && scope, checked_value: scope, unchecked_value: "", name: "authorization[scope][]" %> + <%= label @form, :"scope_#{scope}", String.capitalize(scope) %> + <%= if scope in @scopes && scope do %> - <%= scope %> <%= :"Elixir.Gettext".dgettext(Gettext, "oauth_scopes", scope) %> +
+
+ <%= :"Elixir.Gettext".dgettext(Gettext, "oauth_scopes", scope) %> +
+
+ <%= scope %> +
+
<% end %>
<% else %> 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 6bc8eb602..40f6035f0 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,7 +9,10 @@ <%= if @user do %>
-
+
+
+
+
<%= @user.name %>
@@ -18,7 +21,7 @@
<% end %> -
+
<%= if @app do %>

<%= raw Gettext.dpgettext("static_pages", "oauth authorize message", "Application %{client_name} is requesting access to your account.", client_name: safe_to_string(html_escape(@app.client_name))) %>

<%= render Phoenix.Controller.view_module(@conn), "_scopes.html", Map.merge(assigns, %{form: f}) %> diff --git a/priv/static/instance/static.css b/priv/static/instance/static.css index 48c74c125..f222fc2e2 100644 --- a/priv/static/instance/static.css +++ b/priv/static/instance/static.css @@ -3,206 +3,83 @@ } :root { - --brand-color: #d8a070; - --background-color: #121a24; - --foreground-color: #182230; - --primary-text-color: #b9b9ba; - --muted-text-color: #89898a; + --bg: rgba(18, 26, 36, 1); + --fg: rgba(24, 34, 48, 1); + --text: rgba(185, 185, 186, 1); + --link: rgba(216, 160, 112, 1); + --accent: rgba(216, 160, 112, 1); + --cRed: rgba(211, 16, 20, 1); + --cBlue: rgba(0, 149, 255, 1); + --cGreen: rgba(15, 160, 15, 1); + --cOrange: rgba(255, 165, 0, 1); + --font: sans-serif; + --monoFont: monospace; + --wallpaper: rgba(14, 21, 29, 1); + --selectionBackground: rgba(216, 160, 112, 1); + --selectionText: rgba(0, 0, 0, 1); + --badgeNotification: rgba(211, 16, 20, 1); } body { - background-color: var(--background-color); + background-color: var(--wallpaper); font-family: sans-serif; - color: var(--primary-text-color); + color: var(--text); padding: 0; margin: 0; -} - -.instance-header { - height: 60px; - padding: 10px; - background: var(--foreground-color); - box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.5); -} - -.instance-header__content { display: flex; + flex-direction: column; align-items: center; - max-width: 400px; - margin: 0 auto; -} - -.instance-header__thumbnail { - max-width: 40px; - border-radius: 4px; - margin-right: 12px; -} - -.instance-header__title { - font-size: 16px; - font-weight: bold; - color: var(--primary-text-color); -} - -.container { - max-width: 400px; - background-color: var(--foreground-color); - border-radius: 4px; - overflow: hidden; - margin: 35px auto; - box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.5); - padding: 0em 1em 0em 1em; -} - -.container__content { - padding: 0 20px; -} - -h1 { - margin: 0; - font-size: 24px; - text-align: center; -} - -h2 { - color: var(--primary-text-color); - font-weight: normal; - font-size: 18px; - margin-bottom: 20px; } a { - color: var(--brand-color); + color: var(--link); text-decoration: none; } -form { - width: 100%; -} - -.input { - color: var(--muted-text-color); - display: flex; - flex-direction: column; -} - -input { - padding: 10px; - margin-top: 5px; - margin-bottom: 10px; - background-color: var(--background-color); - color: var(--primary-text-color); - border: 0; - transition-property: border-bottom; - transition-duration: 0.35s; - border-bottom: 2px solid #2a384a; - font-size: 14px; - width: inherit; - box-sizing: border-box; -} - -.scopes-input { - display: flex; - flex-direction: column; - margin: 1em 0; - color: var(--muted-text-color); -} - -.scopes-input label:first-child { - height: 2em; -} - -.scopes { - display: flex; - flex-wrap: wrap; - color: var(--primary-text-color); -} - -.scope { - display: flex; - flex-basis: 100%; - height: 2em; - align-items: center; -} - -.scope:before { - color: var(--primary-text-color); - content: "✔\fe0e"; - margin-left: 1em; - margin-right: 1em; -} - -[type="checkbox"] + label { - display: none; - cursor: pointer; - margin: 0.5em; -} - -[type="checkbox"] { - display: none; -} - -[type="checkbox"] + label:before { - cursor: pointer; - display: inline-block; - color: white; - background-color: var(--background-color); - border: 4px solid var(--background-color); - box-shadow: 0px 0px 1px 0 var(--brand-color); - width: 1.2em; - height: 1.2em; - margin-right: 1.0em; - content: ""; - transition-property: background-color; - transition-duration: 0.35s; - color: var(--background-color); - margin-bottom: -0.2em; - border-radius: 2px; -} - -[type="checkbox"]:checked + label:before { - background-color: var(--brand-color); -} - -input:focus { - outline: none; - border-bottom: 2px solid var(--brand-color); -} - -.actions { - display: flex; - justify-content: flex-end; -} - -.actions button, -.actions a.button { - width: auto; - margin-left: 10px; -} - -a.button, -button { +.button { width: 100%; background-color: #1c2a3a; color: var(--primary-text-color); border-radius: 4px; border: none; - padding: 10px 16px; - margin-top: 20px; - margin-bottom: 20px; + padding: 0 1em; + line-height: 2; + margin-top: 2em; text-transform: uppercase; - font-size: 16px; - box-shadow: 0px 0px 2px 0px black, - 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset, - 0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset; + font-size: 1em; + cursor: pointer; + box-shadow: + 0 0 2px 0 black, + 0 1px 0 0 rgba(255, 255, 255, 0.2) inset, + 0 -1px 0 0 rgba(0, 0, 0, 0.2) inset; } -a.button:hover, -button:hover { - cursor: pointer; - box-shadow: 0px 0px 0px 1px var(--brand-color), - 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset, - 0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset; +.button:hover { + box-shadow: + 0 0 1px 2px rgba(185, 185, 186, 0.4), + 0 1px 0 0 rgba(255, 255, 255, 0.2) inset, + 0 -1px 0 0 rgba(0, 0, 0, 0.2) inset; +} + +.button:active { + transform: translate(1px, 1px); + box-shadow: + 0 0 2px 0 black, + 0 -1px 0 0 rgba(255, 255, 255, 0.2) inset, + 0 1px 0 0 rgba(0, 0, 0, 0.2) inset; +} + +.button:hover:active { + box-shadow: + 0 0 1px 2px rgba(185, 185, 186, 0.4), + 0 -1px 0 0 rgba(255, 255, 255, 0.2) inset, + 0 1px 0 0 rgba(0, 0, 0, 0.2) inset; +} + +.input { + color: var(--text); + display: flex; + flex-direction: column; } .alert-danger { @@ -226,35 +103,118 @@ button:hover { font-size: 16px; } -.account-header__banner { +.instance-header { + display: flex; + height: 3.5rem; + background: var(--fg); + box-shadow: + 0 1px 4px 0 rgba(0, 0, 0, 0.4), + 0 2px 7px 0 rgba(0, 0, 0, 0.3); + justify-content: center; + align-self: stretch; + padding: 0; + margin-bottom: 1rem; +} + +.instance-header__content { + line-height: 3.5rem; + display: flex; + flex: 1; + align-items: center; + max-width: 25em; +} + +.instance-header__thumbnail { + max-width: 3.5em; + border-radius: 0.25em; + margin-right: 0.75em; +} + +.instance-header__title { + font-weight: bold; + color: var(--text); + font-size: 1rem; +} + +.panel { + color: var(--text); + position: relative; + max-width: 25em; + border-radius: 0.5em; + overflow: hidden; + margin: 0; + box-shadow: + 0 0 3px 0 rgba(0, 0, 0, 0.5), + 0 4px 6px 3px rgba(0, 0, 0, 0.3); + padding: 0; +} + +.panel-heading { + padding: 0 1em; + background-color: var(--bg); +} + +.actions { + display: flex; + justify-content: flex-end; + padding-bottom: 1em; +} + +.actions .button { + width: auto; + margin-left: 0.5em; +} + +.account-header { + display: flex; + align-items: end; width: 100%; - height: 112px; + aspect-ratio: 3; + /* REMOVE */ + text-shadow: 0 0 3px black; +} + +.account-header__banner { + position: absolute; + inset: 0; + z-index: -1; + aspect-ratio: 3; background-size: cover; background-position: center; } .account-header__avatar { - width: 94px; - height: 94px; + width: 6em; + height: 6em; + flex: 0 0 6em; + z-index: 2; background-size: cover; background-position: center; - margin: -47px 10px 0; - border: 6px solid var(--foreground-color); - border-radius: 999px; + margin: 0 0.6em 0; } .account-header__meta { - padding: 6px 20px 17px; + flex: 1 1 0; + display: flex; + flex-direction: column; + min-width: 10em; } +.account-header__nickname, .account-header__display-name { - font-size: 20px; + font-size: 1.25em; + white-space: nowrap; + overflow-x: hidden; + text-overflow: ellipsis; +} + +.acocunt-header__display-name { font-weight: bold; } .account-header__nickname { - font-size: 14px; - color: var(--muted-text-color); + font-size: 0.75em; + color: var(--link); } @media all and (max-width: 420px) { @@ -289,10 +249,12 @@ button:hover { .form-row { display: flex; } + .form-row > label { line-height: 47px; flex: 1; } + .form-row > input { flex: 2; }