@ -1,7 +1,7 @@
import { GristLoadConfig } from 'app/common/gristUrls' ;
import { GristLoadConfig } from 'app/common/gristUrls' ;
import { styled } from 'grainjs' ;
import { styled } from 'grainjs' ;
export type ProductFlavor = 'grist' | ' efcr' | ' fieldlink';
export type ProductFlavor = 'grist' | ' fieldlink';
export interface CustomTheme {
export interface CustomTheme {
bodyClassName? : string ;
bodyClassName? : string ;
@ -20,8 +20,6 @@ export function getFlavor(org?: string): ProductFlavor {
}
}
if ( org === 'fieldlink' ) {
if ( org === 'fieldlink' ) {
return 'fieldlink' ;
return 'fieldlink' ;
} else if ( org && /^nioxus(-.*)?$/ . test ( org ) ) {
return 'efcr' ;
}
}
return 'grist' ;
return 'grist' ;
}
}
@ -33,25 +31,11 @@ export function getTheme(flavor: ProductFlavor): CustomTheme {
wideLogo : true ,
wideLogo : true ,
bodyClassName : cssFieldLinkBody.className ,
bodyClassName : cssFieldLinkBody.className ,
} ;
} ;
case 'efcr' :
return { bodyClassName : cssEfcrBody.className } ;
default :
default :
return { } ;
return { } ;
}
}
}
}
const cssEfcrBody = styled ( 'body' , `
-- icon - GristLogo : url ( "icons/logo-efcr.png" ) ;
-- grist - logo - bg : # 009975 ;
-- grist - color - light - green : # 009975 ;
-- grist - color - dark - green : # 007 F61 ;
-- grist - primary - fg : # 009975 ;
-- grist - primary - fg - hover : # 007 F61 ;
-- grist - control - fg : # 009975 ;
-- grist - color - darker - green : # 004 C38 ;
-- grist - color - dark - bg : # 004 C38 ;
` );
const cssFieldLinkBody = styled ( 'body' , `
const cssFieldLinkBody = styled ( 'body' , `
-- icon - GristLogo : url ( "icons/logo-fieldlink.png" ) ;
-- icon - GristLogo : url ( "icons/logo-fieldlink.png" ) ;
-- icon - GristWideLogo : url ( "icons/logo-fieldlink.png" ) ;
-- icon - GristWideLogo : url ( "icons/logo-fieldlink.png" ) ;