@@ -354,10 +354,6 @@ export async function registrationList (context: AuthenticationContext, options:
354354 return context
355355} // registrationList
356356
357- function getDefaultSignInButtonStyle ( ) : string {
358- return 'padding: 1em; border-radius:0.5em; font-size: 100%;'
359- }
360-
361357/**
362358 * Bootstrapping identity
363359 * (Called by `loginStatusBox()`)
@@ -375,7 +371,7 @@ function signInOrSignUpBox (
375371 } = { }
376372) : HTMLElement {
377373 options = options || { }
378- const signInButtonStyle = options . buttonStyle || getDefaultSignInButtonStyle ( )
374+ const signInButtonStyle = options . buttonStyle || style . signInAndUpButtonStyle
379375
380376 const box : any = dom . createElement ( 'div' )
381377 const magicClassName = 'SolidSignInOrSignUpBox'
@@ -389,7 +385,7 @@ function signInOrSignUpBox (
389385 box . appendChild ( signInPopUpButton )
390386 signInPopUpButton . setAttribute ( 'type' , 'button' )
391387 signInPopUpButton . setAttribute ( 'value' , 'Log in' )
392- signInPopUpButton . setAttribute ( 'style' , `${ signInButtonStyle } background-color: #eef; ${ style . headerBannerLoginInput } ` )
388+ signInPopUpButton . setAttribute ( 'style' , `${ signInButtonStyle } ${ style . headerBannerLoginInput } ` + style . signUpBackground )
393389
394390 authSession . onLogin ( ( ) => {
395391 const me = authn . currentUser ( )
@@ -437,7 +433,7 @@ function signInOrSignUpBox (
437433 box . appendChild ( signupButton )
438434 signupButton . setAttribute ( 'type' , 'button' )
439435 signupButton . setAttribute ( 'value' , 'Sign Up for Solid' )
440- signupButton . setAttribute ( 'style' , `${ signInButtonStyle } background-color: #efe; ${ style . headerBannerLoginInput } ` )
436+ signupButton . setAttribute ( 'style' , `${ signInButtonStyle } ${ style . headerBannerLoginInput } ` + style . signInBackground )
441437
442438 signupButton . addEventListener (
443439 'click' ,
@@ -653,7 +649,7 @@ export function loginStatusBox (
653649 }
654650
655651 function logoutButton ( me , options ) {
656- const signInButtonStyle = options . buttonStyle || getDefaultSignInButtonStyle ( )
652+ const signInButtonStyle = options . buttonStyle || style . signInAndUpButtonStyle
657653 let logoutLabel = 'WebID logout'
658654 if ( me ) {
659655 const nick =
@@ -667,7 +663,7 @@ export function loginStatusBox (
667663 // signOutButton.className = 'WebIDCancelButton'
668664 signOutButton . setAttribute ( 'type' , 'button' )
669665 signOutButton . setAttribute ( 'value' , logoutLabel )
670- signOutButton . setAttribute ( 'style' , `${ signInButtonStyle } background-color: #eee; ` )
666+ signOutButton . setAttribute ( 'style' , `${ signInButtonStyle } ` )
671667 signOutButton . addEventListener ( 'click' , logoutButtonHandler , false )
672668 return signOutButton
673669 }
0 commit comments