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
28 changes: 26 additions & 2 deletions includes/Data/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,31 @@
final class Brands {

/**
* Brand specific data - Bluehost, Bluhost India, Webcom
* Default Brand Data
*
* @return array
*/
public static function get_default_brand() {
$default_brand_data = 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',
),
),
);

return array_replace( self::get_brands()['bluehost'], $default_brand_data );
}

/**
* Brand specific data - Bluehost, Bluehost India, Webcom
*
* @return array
*/
Expand Down Expand Up @@ -252,7 +276,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
2 changes: 1 addition & 1 deletion includes/Data/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function current_brand() {

return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ?
$brands[ NFD_ONBOARDING_PLUGIN_BRAND ] :
array( 'brand' => NFD_ONBOARDING_PLUGIN_BRAND );
Brands::get_default_brand();
}


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