diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2019-09-11 07:32:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-11 07:32:17 +0200 |
commit | 0cc780ec0a94e6ea2103ee667b111cc38fe81f12 (patch) | |
tree | 6cdf0f7121b3f924b27cd19acf43d780ac343b67 | |
parent | adbd3591d2f0660a9faa1f1b40a4814a6256bc6b (diff) | |
parent | e2df446ca4cd73e4f9b3f2c3af98ea17b270423e (diff) | |
download | nextcloud-server-0cc780ec0a94e6ea2103ee667b111cc38fe81f12.tar.gz nextcloud-server-0cc780ec0a94e6ea2103ee667b111cc38fe81f12.zip |
Add tab if alternate login present (#16832)
Add tab if alternate login present
-rw-r--r-- | core/css/guest.css | 58 | ||||
-rw-r--r-- | core/templates/login.php | 19 |
2 files changed, 62 insertions, 15 deletions
diff --git a/core/css/guest.css b/core/css/guest.css index 4d7df8b8996..4cfca9cc6dd 100644 --- a/core/css/guest.css +++ b/core/css/guest.css @@ -95,21 +95,21 @@ body { max-width: 100%; max-height: 200px; } + .wrapper { - width: 300px; + max-width: 100%; margin-top: 10vh; } /* Default FORM */ form { position: relative; - width: 280px; margin: auto; padding: 0; } form fieldset { - margin-bottom: 20px; - text-align: left; + width: 260px; + margin: auto auto 20px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; @@ -143,7 +143,8 @@ form #datadirField legend { /* Buttons and input */ #submit-wrapper, -#reset-password-wrapper { +#reset-password-wrapper, +#alternative-logins { display: flex; align-items: center; justify-content: center; @@ -151,6 +152,49 @@ form #datadirField legend { absolutely positioned descendant icons */ } +#alternative-logins { + margin: 30px 15px 20px; + display: block; + min-width: 260px; + max-width: 400px; + overflow: hidden; +} + +#alternative-logins a { + margin: 10px 5px; + display: block; + font-size: 15px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +#alternative-logins a.button::before { + content: ""; + background-repeat: no-repeat; + background-size: contain; + width: 0; + margin-right: 0; + height: 18px; + display: inline-block; + vertical-align: bottom; +} + +#alternative-logins .button { + color: #0082c9; + padding: 12px 20px; +} + +@media only screen and (max-width: 1024px) { + .wrapper { + margin-top: 0; + } + #alternative-logins { + margin: 30px 15px 10px; + } +} + + #submit-wrapper .submit-icon, #reset-password-wrapper .submit-icon { position: absolute; @@ -163,6 +207,10 @@ form #datadirField legend { applied to the button instead. */ } +#submit-wrapper { + margin: 0 auto; +} + #submit-wrapper input.login:hover ~ .submit-icon.icon-confirm-white, #submit-wrapper input.login:focus ~ .submit-icon.icon-confirm-white, #submit-wrapper input.login:active ~ .submit-icon.icon-confirm-white { diff --git a/core/templates/login.php b/core/templates/login.php index 548216d4620..9c6a81fe1ea 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -4,14 +4,13 @@ script('core', 'dist/login'); ?> <div id="login"></div> + <?php if (!empty($_['alt_login'])) { ?> -<form id="alternative-logins"> - <fieldset> - <ul> - <?php foreach($_['alt_login'] as $login): ?> - <li><a class="button" href="<?php print_unescaped($login['href']); ?>" ><?php p($login['name']); ?></a></li> - <?php endforeach; ?> - </ul> - </fieldset> -</form> -<?php } + <div id="alternative-logins"> + <?php foreach($_['alt_login'] as $login): ?> + <a class="button <?php p($login['style'] ?? ''); ?>" href="<?php print_unescaped($login['href']); ?>" > + <?php p($login['name']); ?> + </a> + <?php endforeach; ?> + </div> +<?php } ?> |