Last active
March 22, 2021 14:17
-
-
Save cgi-caesar/f7373cd20adc84ac6757a909ce8dfc66 to your computer and use it in GitHub Desktop.
aMember (site.php): align "login with" buttons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.am-google-button-wrapper.am-google-login-form-after::before { | |
content: none; | |
} | |
.am-google-button-wrapper.am-google-login-form-after { | |
border: none; | |
margin:0; | |
padding:0; | |
} | |
.am-fb-signup-button-wrapper { | |
padding:0; | |
} | |
.signup-items { | |
display: grid; | |
grid-template-columns: 1fr; | |
column-gap: 1rem; | |
align-items: center; | |
margin-bottom:1rem; | |
} | |
@media all and (min-width: 450px) { | |
.signup-items { | |
grid-template-columns: repeat(2, 1fr); | |
} | |
} | |
@media all and (min-width: 800px) { | |
.signup-items { | |
grid-template-columns: repeat(4, 1fr); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//signup page | |
$blocks = []; | |
foreach (['fb-signup', 'misc-google-signin-signup', 'misc-linkedin-signup', 'misc-yahoo-signin-signup'] as $id) | |
{ | |
if ($_ = Am_Di::getInstance()->blocks->getBlock($id)) { | |
Am_Di::getInstance()->blocks->remove($id); | |
Am_Di::getInstance()->blocks->add('signup-items', $_); | |
$blocks[] = $_; | |
} | |
} | |
if ($blocks) { | |
Am_Di::getInstance()->blocks->add('signup/form/before', new Am_Block_Base(null, 'signup', null, function(Am_View $v) { | |
return "<div class='signup-items'>" . $v->blocks('signup-items', "<div>%s</div>", ['record' => $v->record, 'code' => $v->code]) . "</div>"; | |
})); | |
} | |
//login page | |
$blocks = []; | |
foreach (['fb-login', 'misc-google-signin-signin', 'misc-linkedin-signin', 'misc-yahoo-signin-signin'] as $id) | |
{ | |
if ($_ = Am_Di::getInstance()->blocks->getBlock($id)) { | |
Am_Di::getInstance()->blocks->remove($id); | |
Am_Di::getInstance()->blocks->add('login-items', $_); | |
$blocks[] = $_; | |
} | |
} | |
if ($blocks) { | |
Am_Di::getInstance()->blocks->add('login/form/before', new Am_Block_Base(null, 'signup', null, function(Am_View $v) { | |
return "<div class='signup-items'>" . $v->blocks('login-items', "<div>%s</div>", ['record' => $v->record, 'code' => $v->code]) . "</div>"; | |
})); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment