Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text and urls added for the default brand #217

Merged
26 changes: 24 additions & 2 deletions includes/Data/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,29 @@
final class Brands {

/**
* Brand specific data - Bluehost, Bluhost India, Webcom
* Default Brand Data
*
* @return array
*/
public static function get_default_brand() {
return array(
'brand' => 'wordpress',
'name' => __( 'your web host', 'wp-module-onboarding' ),
'pluginDashboardPage' => \admin_url(),
'hireExpertsInfo' => array(
'defaultLink' => 'https://www.bluehost.com/wp-live',
'queryParameters' => array(
'page' => 'bluehost',
'utm_source' => 'wp-onboarding',
'utm_medium' => 'brand-plugin',
'utm_campaign' => 'wp-setup',
),
),
);
}

/**
* Brand specific data - Bluehost, Bluehost India, Webcom
*
* @return array
*/
Expand Down Expand Up @@ -252,7 +274,7 @@ public static function set_current_brand( $container ) {
if ( ! defined( 'NFD_ONBOARDING_PLUGIN_BRAND' ) ) {
$brand = $container->plugin()->brand;
if ( empty( $brand ) ) {
$brand = 'newfold';
$brand = 'wordpress';
}
define( 'NFD_ONBOARDING_PLUGIN_BRAND', sanitize_title_with_dashes( str_replace( '_', '-', $brand ) ) );
}
Expand Down
3 changes: 2 additions & 1 deletion includes/Data/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ public static function runtime() {
*/
public static function current_brand() {
$brands = Brands::get_brands();
// $default_brand = Brands::get_default_brand();
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved

return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ?
$brands[ NFD_ONBOARDING_PLUGIN_BRAND ] :
array( 'brand' => NFD_ONBOARDING_PLUGIN_BRAND );
array_replace( $brands['bluehost'], Brands::get_default_brand() );
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved
}


Expand Down
72 changes: 37 additions & 35 deletions src/OnboardingSPA/styles/_branding.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,43 @@ body {


// Default WP based Styles
--wp-admin-theme-color: #007cba;
--wp-admin-theme-color--rgb: 0, 124, 186;
--wp-admin-theme-color-darker-10: #006ba1;
--wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
--wp-admin-theme-color-darker-20: #1e1e1e;
--wp-admin-theme-color-darker-20--rgb: 0, 30, 30;
--nfd-onboarding-dark-icon: url(../../Brands/wordpress/dark.svg);
--nfd-onboarding-icon: url(../../Brands/wordpress/icon.svg);
--nfd-onboarding-logo: url(../../Brands/wordpress/logo.svg);
--nfd-onboarding-primary: var(--wp-admin-theme-color);
--nfd-onboarding-highlighted--rgb: var(--wp-admin-theme-color-darker-10--rgb);
--nfd-onboarding-primary-alt: var(--wp-admin-theme-color-darker-10);
--nfd-onboarding-secondary: var(--wp-admin-theme-color-darker-10);
--nfd-onboarding-secondary-alt: var(--wp-admin-theme-color-darker-20);
--nfd-onboarding-tertiary: var(--nfd-onboarding-primary);
--nfd-onboarding-tertiary-alt: var(--nfd-onboarding-primary-alt);
--nfd-onboarding-light: #fff;
--nfd-onboarding-light-gray: #f0f0f0;
--nfd-onboarding-light-gray-2: #efefef;
--nfd-onboarding-light-gray-3: #f2f2f2;
--nfd-onboarding-light-gray-4: #a7a7a7;
--nfd-onboarding-light-gray-5: #eee;
--nfd-onboarding-light-gray-highlighted: #e2e9f4;
--nfd-onboarding-dark: var(--wp-admin-theme-color-darker-20);
--nfd-onboarding-border: 219, 219, 219;
--nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary);
--nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light);
--nfd-onboarding-loader-start: var(--nfd-onboarding-primary);
--nfd-onboarding-loader-end: var(--nfd-onboarding-secondary);
--nfd-onboarding-step-loader-icon: url(../../Brands/wordpress/step-loader-logo.svg);
--nfd-onboarding-step-error-icon: url(../../Brands/wordpress/step-error-logo.svg);
--nfd-onboarding-step-what-next-img-3: url(../../Brands/wordpress/full-service.png);
--nfd-onboarding-step-what-next-img-1: url(../../Brands/wordpress/wp-admin.png);
--nfd-onboarding-step-what-next-img-2: url(../static/images/help.png);

&.nfd-brand-wordpress {
--wp-admin-theme-color: #007cba;
--wp-admin-theme-color--rgb: 0, 124, 186;
--wp-admin-theme-color-darker-10: #006ba1;
--wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
--wp-admin-theme-color-darker-20: #1e1e1e;
--wp-admin-theme-color-darker-20--rgb: 0, 30, 30;
--nfd-onboarding-dark-icon: url(../../Brands/wordpress/dark.svg);
--nfd-onboarding-icon: url(../../Brands/wordpress/icon.svg);
--nfd-onboarding-logo: url(../../Brands/wordpress/logo.svg);
--nfd-onboarding-primary: var(--wp-admin-theme-color);
--nfd-onboarding-highlighted--rgb: var(--wp-admin-theme-color-darker-10--rgb);
--nfd-onboarding-primary-alt: var(--wp-admin-theme-color-darker-10);
--nfd-onboarding-secondary: var(--wp-admin-theme-color-darker-10);
--nfd-onboarding-secondary-alt: var(--wp-admin-theme-color-darker-20);
--nfd-onboarding-tertiary: var(--nfd-onboarding-primary);
--nfd-onboarding-tertiary-alt: var(--nfd-onboarding-primary-alt);
--nfd-onboarding-light: #fff;
--nfd-onboarding-light-gray: #f0f0f0;
--nfd-onboarding-light-gray-2: #efefef;
--nfd-onboarding-light-gray-3: #f2f2f2;
--nfd-onboarding-light-gray-4: #a7a7a7;
--nfd-onboarding-light-gray-5: #eee;
--nfd-onboarding-light-gray-highlighted: #e2e9f4;
--nfd-onboarding-dark: var(--wp-admin-theme-color-darker-20);
--nfd-onboarding-border: 219, 219, 219;
--nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary);
--nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light);
--nfd-onboarding-loader-start: var(--nfd-onboarding-primary);
--nfd-onboarding-loader-end: var(--nfd-onboarding-secondary);
--nfd-onboarding-step-loader-icon: url(../../Brands/wordpress/step-loader-logo.svg);
--nfd-onboarding-step-error-icon: url(../../Brands/wordpress/step-error-logo.svg);
--nfd-onboarding-step-what-next-img-3: url(../../Brands/wordpress/full-service.png);
--nfd-onboarding-step-what-next-img-1: url(../../Brands/wordpress/wp-admin.png);
--nfd-onboarding-step-what-next-img-2: url(../static/images/help.png);
}

&.nfd-brand-bluehost,
&.nfd-brand-bluehost-india {
--wp-admin-theme-color: #3575d3;
Expand Down
32 changes: 13 additions & 19 deletions src/OnboardingSPA/styles/_interface.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,6 @@ html.wp-toolbar {
}

body {
--nfd-onboarding-icon: url(../../Brands/newfold/icon.svg);
--nfd-onboarding-logo: url(../../Brands/newfold/logo.svg);
--nfd-onboarding-primary: #dd5228;
--nfd-onboarding-light: #f2f2f2;
--nfd-onboarding-dark: #1e2223;
--nfd-onboarding-white: #fff;
--nfd-onboarding-white-rgb: 255, 255, 255;
--nfd-onboarding-black: #000;
--nfd-onboarding-header-bg: var(--nfd-onboarding-light);
--nfd-onboarding-header-fg: var(--nfd-onboarding-dark);
--nfd-onboarding-content-bg: var(--nfd-onboarding-light);
--nfd-onboarding-content-fg: var(--nfd-onboarding-dark);
--nfd-onboarding-drawer-bg: var(--nfd-onboarding-dark);
--nfd-onboarding-drawer-fg: var(--nfd-onboarding-light);
--nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-dark);
--nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light);
--nfd-onboarding-footer-fg: var(--nfd-onboarding-dark);
--nfd-onboarding-footer-bg: var(--nfd-onboarding-light);
--nfd-onboarding-light-gray-5: #eee;

&:not(.is-fullscreen-mode) {
opacity: 0;
Expand All @@ -39,4 +20,17 @@ body {

@include wp-admin-reset(".nfd-onboarding-container");
}

// Common Components across Brands
--nfd-onboarding-white: #fff;
--nfd-onboarding-white-rgb: 255, 255, 255;
--nfd-onboarding-black: #000;
--nfd-onboarding-header-bg: var(--nfd-onboarding-light);
--nfd-onboarding-header-fg: var(--nfd-onboarding-dark);
--nfd-onboarding-content-bg: var(--nfd-onboarding-light);
--nfd-onboarding-content-fg: var(--nfd-onboarding-dark);
--nfd-onboarding-drawer-bg: var(--nfd-onboarding-dark);
--nfd-onboarding-drawer-fg: var(--nfd-onboarding-light);
--nfd-onboarding-footer-fg: var(--nfd-onboarding-dark);
--nfd-onboarding-footer-bg: var(--nfd-onboarding-light);
}