From 455e50c9a893cd5fcdc5781a5b3cbaaaa192420b Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 19 Aug 2020 15:14:29 -0400 Subject: [PATCH] Use branded OAuth buttons This includes the platform mark with each login button and uses brand colors. It also uses the same style on the Account Settings page. And it wraps buttons on login / signup pages. --- less/login.less | 50 ++++++++++++++++++++++++++++-- static/img/mark/writeas-white.png | Bin 0 -> 2733 bytes templates/include/oauth.tmpl | 15 +++++++-- templates/user/settings.tmpl | 22 ++++++------- 4 files changed, 71 insertions(+), 16 deletions(-) create mode 100644 static/img/mark/writeas-white.png diff --git a/less/login.less b/less/login.less index b756a6a..fefeb12 100644 --- a/less/login.less +++ b/less/login.less @@ -9,17 +9,63 @@ */ .row.signinbtns { - justify-content: space-evenly; + justify-content: center; font-size: 1em; margin-top: 2em; margin-bottom: 1em; + flex-wrap: wrap; .loginbtn { height: 40px; + margin: 0.5em; - &.btn.cta { + &.btn { box-sizing: border-box; font-size: 17px; + white-space: nowrap; + + img { + height: 1.5em; + vertical-align: middle; + } + } + + &#writeas-login, &#slack-login { + img { + margin-top: -0.2em; + } + } + + &#gitlab-login { + background-color: #fc6d26; + border-color: #fc6d26; + &:hover { + background-color: darken(#fc6d26, 5%); + border-color: darken(#fc6d26, 5%); + } + } + + &#gitea-login { + background-color: #2ecc71; + border-color: #2ecc71; + &:hover { + background-color: #2cc26b; + border-color: #2cc26b; + } + } + + &#slack-login, &#gitlab-login, &#gitea-login, &#generic-oauth-login { + font-size: 0.86em; + font-family: @sansFont; + } + + &#slack-login, &#generic-oauth-login { + color: @lightTextColor; + background-color: @lightNavBG; + border-color: @lightNavBorder; + &:hover { + background-color: @lightNavHoverBG; + } } } } diff --git a/static/img/mark/writeas-white.png b/static/img/mark/writeas-white.png new file mode 100644 index 0000000000000000000000000000000000000000..6c9b2cd5f3fa33f19aa79f30d071820d6f72ba5e GIT binary patch literal 2733 zcmb_e`#aN%AOCD~uThjs2uX!AtVQLLj@!vCA}Kn#EafyClDS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zMjd!59eo6uwb2%}d8)cE#dwo$ARw$Am-K&WeZ>W%g8O;2E0KleJO*RYF2T2_I=)&A zZ(iKmVyRu#&$0#Yxz6Ta-gtME{1ee_NF9#yVpx(cw^2NI5y!G~Cl*p{E8+VU7OO(b z#zk$&@iDni%Xu?{9|*gN0YXs2>ry@PN>G)hP!FrZlifILy~qzrSNU)badS5jf*+;b z*DmbJdNDTra{81DnqcQB-qGbNQ+>V)*j|r6w_l2%&x#SNn3|!yWCPKx76XNE(;+bu zlpOO_TP#w+5a_6GgZNv`PUwcB7$MycNLFc(ez*0id0$jpN?9gaR1P&6s-ey{sya{I zC1rIcoQc$$v6A24wCkeOx}^>;3bt(YJ)~I<6e(U+nI+k6RGj|oqjEu$wyk!Nxr^C~ zI4m;*!3n2Bo~;E;pve*vlu+tq;_q8mu)goR?Z+I8_NK|yC+Pk1h*h8!zM>pJV(p#v zT8?^U;p;HgM1HPHWQzmtIL&xHoNvl+$a1ySJba)X#!qfgr?ie8a5!-_+)(5>)Jq=x zWe^e^wqGCk9(!%mPD*;9wpjod;PHM)LBn+Vo&T}k_AmMc5!@vT0xeiuk0sz}f7-6j H#y{ylH@ie% literal 0 HcmV?d00001 diff --git a/templates/include/oauth.tmpl b/templates/include/oauth.tmpl index 6617fd0..9a8d05e 100644 --- a/templates/include/oauth.tmpl +++ b/templates/include/oauth.tmpl @@ -5,13 +5,22 @@ Sign in with Slack {{ end }} {{ if .WriteAsEnabled }} - Sign in with Write.as + + + Sign in with Write.as + {{ end }} {{ if .GitLabEnabled }} - Sign in with {{.GitLabDisplayName}} + + + Sign in with {{.GitLabDisplayName}} + {{ end }} {{ if .GiteaEnabled }} - Sign in with {{.GiteaDisplayName}} + + + Sign in with {{.GiteaDisplayName}} + {{ end }} {{ if .GenericEnabled }} Sign in with {{.GenericDisplayName}} diff --git a/templates/user/settings.tmpl b/templates/user/settings.tmpl index 95c57c4..22de3d8 100644 --- a/templates/user/settings.tmpl +++ b/templates/user/settings.tmpl @@ -107,47 +107,47 @@ h3 { font-weight: normal; }

Link External Accounts

Connect additional accounts to enable logging in with those providers, instead of using your username and password.

-
+
{{ if .OauthWriteAs }} {{ end }} {{ if .OauthSlack }} {{ end }} {{ if .OauthGitLab }} {{ end }} {{ if .OauthGitea }} {{ end }} -
{{ if .OauthGeneric }} -
{{ end }} {{ end }}