341 def _brnd_update_styles(_brand_mammoth):
342 """Map mammoth branding css content to Odyssey 345 /app/web/monitor/scriptssiteSetColor{.prg, .data} 346 /homecu/public_html/bankingIncludes/css/brand.css 349 _brand_mammoth: dictionary of css attributes from Mammoth brand content 352 Formatted update result of what values changed from Mammoth to Odyssey 354 Example report: (it would be a compressed, single line json string to 355 make it easier to deal with it in log monitoring services.) 356 [Mammoth] .cu-primary-color -> background-color ===> 357 [Odyssey] 'headerBackground' (default '#24417A') -> '#01707B' 358 [Mammoth] .cu-primary-color -> background-color ===> 359 [Odyssey] 'footerBackground' (default '#E7E8EA') -> '#01707B' 360 [Mammoth] .cu-primary-color -> color ===> 361 [Odyssey] 'headerForeground' (default '#FFFFFF') -> '#df1313' 362 [Mammoth] .cu-primary-color -> color ===> 363 [Odyssey] 'footerForeground' (default '#777777') -> '#df1313' 364 [Mammoth] body -> font-family ===> 365 [Odyssey] 'fontFamily' (default 'Helvetica, "Helvetica Neue", 366 Arial, sans-serif') -> 'helvetica, verdana, sans-serif' 367 [Mammoth] body -> background-color ===> 368 [Odyssey] 'menuBackground' (default '#F8F8F8') -> '#eaeaea' 369 [Mammoth] body -> color ===> 370 [Odyssey] 'menuForeground' (default '#337AB7') -> '#303030' 371 [Mammoth] #content -> background ===> 372 [Odyssey] 'contentBackground' (default '#FFFFFF') -> '#fff' 373 [Mammoth] #content -> color ===> 374 [Odyssey] 'contentForeground' (default '#333333') -> '#000000' 375 [Mammoth] #content -> border ===> 376 [Odyssey] 'contentBorderWidth' (default '0px') -> '1px' 377 [Mammoth] #content -> border ===> 378 [Odyssey] 'contentBorderStyle' (default 'solid') -> 'solid' 379 [Mammoth] #content -> border ===> 380 [Odyssey] 'contentBorderColor' (default '#000000') -> '#afafaf' 381 [Mammoth] #homecuBannerArea -> background-color ===> 382 [Odyssey] 'bannerBackground' (default '#161620') -> '#333333' 383 [Mammoth] #homecuBannerArea -> height ===> 384 [Odyssey] 'bannerHeight' (default '60px') -> '60px' 385 [Mammoth] #logo_wrapper .logo_content -> background ===> 386 [Odyssey] 'logoBackground' (default 'transparent') -> '#FFFFFF' 387 [Mammoth] #logo_wrapper .logo_content -> background-size ===> 388 [Odyssey] 'logoHeightDesktop' (default '75px') -> '80px' 389 [Mammoth] .cu-secondary-color -> background-color ===> 390 [Odyssey] 'menuGroupBackground' (default '#1B8DD6') -> '#76B84B' 391 [Mammoth] .cu-secondary-color -> background-color ===> 392 [Odyssey] 'menuGroupBackgroundLighter' 393 (default '#2198E3') -> '#76B84B' 394 [Mammoth] .cu-secondary-color -> color ===> 395 [Odyssey] 'menuGroupForeground' (default '#FFFFFF') -> '#FFFFFF' 398 updated_branding_attrs = BRANDING_DEFAULTS.copy()
400 for _mammoth_rule, _mammoth_attrs
in _brand_mammoth.items():
402 if _mammoth_rule ==
"body":
404 m_attr_key =
"font-family" 408 _mammoth_attrs[m_attr_key],
411 updated_branding_attrs
414 m_attr_key =
"background-color" 418 _mammoth_attrs[m_attr_key],
421 updated_branding_attrs
428 _mammoth_attrs[m_attr_key],
431 updated_branding_attrs
434 elif _mammoth_rule ==
".cu-primary-color":
436 m_attr_key =
"background-color" 440 _mammoth_attrs[m_attr_key],
443 updated_branding_attrs
448 _mammoth_attrs[m_attr_key],
451 updated_branding_attrs
458 _mammoth_attrs[m_attr_key],
461 updated_branding_attrs
466 _mammoth_attrs[m_attr_key],
469 updated_branding_attrs
472 elif _mammoth_rule ==
"#logo_wrapper .logo_content":
475 m_attr_key =
"background" 476 m_attr_val = _mammoth_attrs[m_attr_key].split()[0].strip()
483 updated_branding_attrs
487 m_attr_key =
"background-size" 488 m_attr_val = _mammoth_attrs[m_attr_key].split()[1].strip()
495 updated_branding_attrs
498 elif _mammoth_rule ==
"#content":
500 m_attr_key =
"background" 504 _mammoth_attrs[m_attr_key],
507 updated_branding_attrs
514 _mammoth_attrs[m_attr_key],
517 updated_branding_attrs
520 m_attr_key =
"border" 521 m_attr_val = _mammoth_attrs[m_attr_key].split()
525 m_attr_val[0].strip(),
526 "contentBorderWidth",
528 updated_branding_attrs
533 m_attr_val[1].strip(),
534 "contentBorderStyle",
536 updated_branding_attrs
541 m_attr_val[2].strip(),
542 "contentBorderColor",
544 updated_branding_attrs
547 elif _mammoth_rule ==
".cu-secondary-color":
549 m_attr_key =
"background-color" 553 _mammoth_attrs[m_attr_key],
554 "menuGroupBackground",
556 updated_branding_attrs
561 _mammoth_attrs[m_attr_key],
562 "menuGroupBackgroundLighter",
564 updated_branding_attrs
571 _mammoth_attrs[m_attr_key],
572 "menuGroupForeground",
574 updated_branding_attrs
577 elif _mammoth_rule ==
"#homecuBannerArea":
579 m_attr_key =
"background-color" 583 _mammoth_attrs[m_attr_key],
586 updated_branding_attrs
589 m_attr_key =
"height" 593 _mammoth_attrs[m_attr_key],
596 updated_branding_attrs
599 return get_valid_json(update_report), updated_branding_attrs