SlideShare a Scribd company logo
1 of 42
Brand Your Community Using Less
and Gulp
Shuji Ui
Senior Technical Architect, 7summits
shuji.ui@7summitsinc.com
Twitter@shujiui
Shuji Ui
Senior Technical Architect
7summits
• How many people have built Community sites using Community cloud?
• How many people have used Salesforce Tabs + Visualforce Community template?
• How many people have used Less?
• How many people have used Gulp?
Have you used Community Cloud?
• Community Templates
• Configure Visualforce Template to Community
• Load Visualforce Header/Footer to OOTB pages
• Configure color code fields in “Community Configuration” custom object
• Less
• Gulp
• Generate CSS Visualforce component using Gulp
Demo
• Adding header to Customer and Partner communities
• Changing brand colors from internal SFDC tab without modifying code
Agenda
Community Templates
Community Builder Based (KOKUA, KOA, NAPILI, and ALOHA)
• Branding Editor to change colors and fonts
• Site.com Studio to adjust templates
• KOKUA, KOA for Knowledge and Cases
• NAPILI for Knowledge, Cases, and Q&A
• ALOHA App Launcher for Identity and Connected App
SALESFORCE TABS + VISUALFORCE
• OOTB tabs
• Use Visualforce Template + Header/ Footer components
Community Templates
Community Templates
Configure Visualforce Template
• Create Visualforce template and add header and footer Visualforce components to the template
Create Visualforce Template
• Configure the Visualforce template to community
Configure Visualforce Template in Community Site Details
OOTB Header / Footer
Salesforce Tabs + Visualforce template: OOTB pages
Configure Header / Footer html pages to the Salesforce Tabs +
Visualforce template
• Create Header / Footer html pages
• Upload them to a Document folder
• Configure them in Community Administration: Branding tab
• Create Header / Footer Visualforce pages
• Create jQuery script pages
• Load jQuery script pages in HTML Header / Footer pages
Using jQuery to load Visualforce Header / Footer
for OOTB pages
• Create Header / Footer Visualforce pages
• Add Header / Footer Visualforce components to the pages
Header Example: SC_HTMLHeader.page
<apex:page applyHtmlTag="false" applyBodyTag="false" showHeader="false" sidebar="false”
standardStylesheets="false”>
<c:SC_Header />
</apex:page>
Create Header / Footer Visualforce Pages
Header Example: SC_LoadHeader.page
<apex:page showHeader="false" sidebar="false" standardStylesheets="false" contentType="text/javascript" >
$j = $.noConflict();
$j(".header-wrap" ).load( "{!$Page.SC_HTMLHeader} #header" ,function(){
$j("div[role='banner']").remove();
$j(".zen-bodyZen").css("border-top", "0px");
});
</apex:page>
Using jQuery to load the Visalforce Header / Footer pages
Header Example: SC_CustomerHeader.html
<div class="header-wrap"></div>
<!-- Load jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Load Visualforce page as a script -->
<script type="text/javascript" src="/customer/SC_LoadHtmlHeader"></script>
Header.html / Footer.html
Community Configuration Object
• Create “Community Configuration“ custom object
• Add fields for Brand Primary Color, Brand Secondary Color…etc
Configure color code fields in “Community Configuration” object
• Query Community Configuration Record and assign values to properties
Apex controller
• Create an empty Visualforce component named “SC_CSSMain.component”
CSS Component
Less
CSS pre-processors. One of the most popular front-end development tools.
Mixins
.v-align {
display: inline-block;
vertical-align: middle;
}
#navbar{
.v-align;
}
Less
Nested Rule
#header-top{
.vertical-align;
.brand-color;
width: 100%;
height: 84px;
.header-left {
position: relative;
.vertical-align;
}
}
Less cont.
Variables
@brand-primary: #2084ba;
@brand-primary-dark: #165C82;
@brand-title-text-color: #F6F6F6;
#header-top{
.v-align;
background: radial-gradient(@brand-primary-color,@brand-primary-dark-color);
width: 100%;
height: 84px;
color: @brand-title-text-color;
}
Less cont.
• Map Visualforce merge fields to Less variables using ~
Map Visualforce merge fields to Less variables
Gulp
• One of the most popular JavaScript build tools (Grunt, Brunch…etc)
• Gulpfile.js, defines build tasks. Great thing about “Gulpfile.js” is JavaScript code not configuration file.
• Simple: 5 basic functions
• gulp.task: registers function
• gulp.run: run tasks
• gulp.watch: watch file changes and run tasks
• gulp.src: returns a readable stream
• gulp.dest: return a writable stream
Gulp
“compileCSS” task to dynamically generate
Visualforce SC_CSSMain.component and upload to SFDC org
Demo
Demonstrate changing brand colors from internal SFDC tab without modifying code
Steps
• 2 Communities (Customer and Partner) using one code base
• In “Community Configuration” custom object tab
 “Brand Customer Community” record
 “Brand Partner Community” record
• Add SC_Header.component
• Style SC_Header.component in header.less
• Configure VF merge fields in variable.less
• Using Less and Gulp generating SC_MainCSS.component
• Change branding colors from internal SFDC tab without modifying code.
Demo: Adding header to customer and partner communities
using less and gulp
• Gulp monitors file changes
• Gulp compiled less files
• Because of the less variables, merge fields were generated to a css file
background: radial-gradient({!BrandPrimaryColor}, {!BrandPrimaryDarkColor});
• Gulp constructed SC_MainCSS.component
• Gulp executed MavensMate command to saved SC_MainCSS.component to SFDC org.
• SC_MainCSSCotroller read the brand colors in Community Configuration records based on the community
name.
Here is what happened.
“compileCSS” task to dynamically generate
Visualforce SC_CSSMain.component and upload to SFDC org
Summary
• Community Templates: SALESFORCE TABS + VISUALFORCE
• Visualforce Template
• JQuery loading Visualforce Header/Footer Components to OOTB pages
• “Community Configuration” custom object
• Using Less + Gulp to generate SC_CSSMain.component
• Add header to customer and partner communities
• Changing brand colors from internal SFDC tab without modifying code
Summary
• Multiple Communities with same code base
• Managed Package
These techniques are useful when
• Twitter: @shujiui (Blog, Slides)
• Github: https://github.com/shujiui
Call to Action
Q&A
Thank you
Share Your Feedback, and Win a GoPro!
3
Earn a GoPro prize entry for each completed
survey
Tap the bell to take a survey2Enroll in a session1

More Related Content

What's hot

Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016Stefan Bauer
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpSalesforce Developers
 
SharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingSharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingBill Wolff
 
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...Anindita Bhattacharya
 
Responsive Web Design and SharePoint
Responsive Web Design and SharePointResponsive Web Design and SharePoint
Responsive Web Design and SharePointStefan Bauer
 
Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePointEric Overfield
 
Introduction to JSLink in 2013
Introduction to JSLink in 2013Introduction to JSLink in 2013
Introduction to JSLink in 2013Sparkhound Inc.
 
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSerge van den Oever
 
Bringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointBringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointChad Schroeder
 
Enhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEnhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEric Overfield
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopEric Overfield
 
A Look at New Features in DNN 7.3
A Look at New Features in DNN 7.3A Look at New Features in DNN 7.3
A Look at New Features in DNN 7.3DNN
 
Create your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsCreate your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsEric Overfield
 
Thoughts on Component Resuse
Thoughts on Component ResuseThoughts on Component Resuse
Thoughts on Component ResuseJustin Edelson
 
How to use word
How to use wordHow to use word
How to use wordSean
 
Make SharePoint Look Not Like SharePoint - SPSNashville - Cathy Dew
Make SharePoint Look Not Like SharePoint - SPSNashville - Cathy DewMake SharePoint Look Not Like SharePoint - SPSNashville - Cathy Dew
Make SharePoint Look Not Like SharePoint - SPSNashville - Cathy DewCathy Dew
 
SharePoint 2013 Design manager – from HTML to SharePoint
SharePoint 2013 Design manager – from HTML to SharePointSharePoint 2013 Design manager – from HTML to SharePoint
SharePoint 2013 Design manager – from HTML to SharePointEric Overfield
 
AEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentAEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentGabriel Walt
 
SharePoint master pages in 2013 and managed metadata magic
SharePoint master pages in 2013 and managed metadata magicSharePoint master pages in 2013 and managed metadata magic
SharePoint master pages in 2013 and managed metadata magicFrancois Pienaar
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 Fabio Franzini
 

What's hot (20)

Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and Gulp
 
SharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingSharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side Rendering
 
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...
SUG Bangalore - Overview of Sitecore Experience Accelerator with Pratik Satik...
 
Responsive Web Design and SharePoint
Responsive Web Design and SharePointResponsive Web Design and SharePoint
Responsive Web Design and SharePoint
 
Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePoint
 
Introduction to JSLink in 2013
Introduction to JSLink in 2013Introduction to JSLink in 2013
Introduction to JSLink in 2013
 
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
 
Bringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointBringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePoint
 
Enhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEnhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web Design
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - Workshop
 
A Look at New Features in DNN 7.3
A Look at New Features in DNN 7.3A Look at New Features in DNN 7.3
A Look at New Features in DNN 7.3
 
Create your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsCreate your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page Layouts
 
Thoughts on Component Resuse
Thoughts on Component ResuseThoughts on Component Resuse
Thoughts on Component Resuse
 
How to use word
How to use wordHow to use word
How to use word
 
Make SharePoint Look Not Like SharePoint - SPSNashville - Cathy Dew
Make SharePoint Look Not Like SharePoint - SPSNashville - Cathy DewMake SharePoint Look Not Like SharePoint - SPSNashville - Cathy Dew
Make SharePoint Look Not Like SharePoint - SPSNashville - Cathy Dew
 
SharePoint 2013 Design manager – from HTML to SharePoint
SharePoint 2013 Design manager – from HTML to SharePointSharePoint 2013 Design manager – from HTML to SharePoint
SharePoint 2013 Design manager – from HTML to SharePoint
 
AEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentAEM Best Practices for Component Development
AEM Best Practices for Component Development
 
SharePoint master pages in 2013 and managed metadata magic
SharePoint master pages in 2013 and managed metadata magicSharePoint master pages in 2013 and managed metadata magic
SharePoint master pages in 2013 and managed metadata magic
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365
 

Viewers also liked

Salesforce.com Community Cloud Spring'16 Update
Salesforce.com Community Cloud Spring'16 UpdateSalesforce.com Community Cloud Spring'16 Update
Salesforce.com Community Cloud Spring'16 UpdateYamase Hiroaki
 
Views from Europe
Views from EuropeViews from Europe
Views from Europerado_fun
 
Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...
Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...
Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...Salesforce Deutschland
 
Lightningのコンポーネントフレームワークの概要
Lightningのコンポーネントフレームワークの概要Lightningのコンポーネントフレームワークの概要
Lightningのコンポーネントフレームワークの概要Salesforce Developers Japan
 
Community Cloud APAC Webinar (September 7, 2016)
Community Cloud APAC Webinar (September 7, 2016)Community Cloud APAC Webinar (September 7, 2016)
Community Cloud APAC Webinar (September 7, 2016)Salesforce Partners
 
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDKQuickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDKMichael Welburn
 
Salesforce Communities
Salesforce CommunitiesSalesforce Communities
Salesforce CommunitiesSunil kumar
 
Creating a Salesforce Community: Code vs Configuration
Creating a Salesforce Community: Code vs ConfigurationCreating a Salesforce Community: Code vs Configuration
Creating a Salesforce Community: Code vs ConfigurationMichael Welburn
 
Salesforce Communities for Sales: 10 Questions You Should Ask Yourself
Salesforce Communities for Sales: 10 Questions You Should Ask YourselfSalesforce Communities for Sales: 10 Questions You Should Ask Yourself
Salesforce Communities for Sales: 10 Questions You Should Ask YourselfRelayware, Inc.
 

Viewers also liked (10)

Salesforce.com Community Cloud Spring'16 Update
Salesforce.com Community Cloud Spring'16 UpdateSalesforce.com Community Cloud Spring'16 Update
Salesforce.com Community Cloud Spring'16 Update
 
Views from Europe
Views from EuropeViews from Europe
Views from Europe
 
Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...
Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...
Community Cloud - Gemeinsam geht alles Besser - Kundenbindung stärken mit de...
 
Lightningのコンポーネントフレームワークの概要
Lightningのコンポーネントフレームワークの概要Lightningのコンポーネントフレームワークの概要
Lightningのコンポーネントフレームワークの概要
 
Community Cloud APAC Webinar (September 7, 2016)
Community Cloud APAC Webinar (September 7, 2016)Community Cloud APAC Webinar (September 7, 2016)
Community Cloud APAC Webinar (September 7, 2016)
 
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDKQuickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
 
Community cloud運用開発の基礎
Community cloud運用開発の基礎Community cloud運用開発の基礎
Community cloud運用開発の基礎
 
Salesforce Communities
Salesforce CommunitiesSalesforce Communities
Salesforce Communities
 
Creating a Salesforce Community: Code vs Configuration
Creating a Salesforce Community: Code vs ConfigurationCreating a Salesforce Community: Code vs Configuration
Creating a Salesforce Community: Code vs Configuration
 
Salesforce Communities for Sales: 10 Questions You Should Ask Yourself
Salesforce Communities for Sales: 10 Questions You Should Ask YourselfSalesforce Communities for Sales: 10 Questions You Should Ask Yourself
Salesforce Communities for Sales: 10 Questions You Should Ask Yourself
 

Similar to Brand Your Community Using Less and Gulp

Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
SharePoint 2013 Branding
SharePoint 2013 BrandingSharePoint 2013 Branding
SharePoint 2013 BrandingKashif Imran
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixPeter Nazarov
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance OptimizationChen-Tien Tsai
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...SPTechCon
 
Writing an extensible web testing framework ready for the cloud slide share
Writing an extensible web testing framework ready for the cloud   slide shareWriting an extensible web testing framework ready for the cloud   slide share
Writing an extensible web testing framework ready for the cloud slide shareMike Ensor
 
Your Intranet, Your Way
Your Intranet, Your WayYour Intranet, Your Way
Your Intranet, Your WayD'arce Hess
 
Creating a Documentation Portal
Creating a Documentation PortalCreating a Documentation Portal
Creating a Documentation PortalSteve Anderson
 
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019Drew Madelung
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxsilvers5
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]David Wesst
 
Designing True Cross-Platform Apps
Designing True Cross-Platform AppsDesigning True Cross-Platform Apps
Designing True Cross-Platform AppsFITC
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSZoe Gillenwater
 
Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsEric Overfield
 
Things you can do to brand Office 365 now
Things you can do to brand Office 365 nowThings you can do to brand Office 365 now
Things you can do to brand Office 365 nowThomas Daly
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedGil Fink
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webpartsPrabhu Nehru
 
Share point 2013 Building Websites
Share point 2013 Building WebsitesShare point 2013 Building Websites
Share point 2013 Building WebsitesSuhas R Satish
 

Similar to Brand Your Community Using Less and Gulp (20)

Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
SharePoint 2013 Branding
SharePoint 2013 BrandingSharePoint 2013 Branding
SharePoint 2013 Branding
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance Optimization
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
 
Writing an extensible web testing framework ready for the cloud slide share
Writing an extensible web testing framework ready for the cloud   slide shareWriting an extensible web testing framework ready for the cloud   slide share
Writing an extensible web testing framework ready for the cloud slide share
 
Your Intranet, Your Way
Your Intranet, Your WayYour Intranet, Your Way
Your Intranet, Your Way
 
Creating a Documentation Portal
Creating a Documentation PortalCreating a Documentation Portal
Creating a Documentation Portal
 
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
Getting Started with Site Designs and Site Scripts - NACollabSummit 2019
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
 
Designing True Cross-Platform Apps
Designing True Cross-Platform AppsDesigning True Cross-Platform Apps
Designing True Cross-Platform Apps
 
qooxdoo 3.5
qooxdoo 3.5qooxdoo 3.5
qooxdoo 3.5
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSS
 
Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding options
 
Things you can do to brand Office 365 now
Things you can do to brand Office 365 nowThings you can do to brand Office 365 now
Things you can do to brand Office 365 now
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
web development
web developmentweb development
web development
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
 
Share point 2013 Building Websites
Share point 2013 Building WebsitesShare point 2013 Building Websites
Share point 2013 Building Websites
 

Recently uploaded

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 

Recently uploaded (20)

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 

Brand Your Community Using Less and Gulp

  • 1. Brand Your Community Using Less and Gulp Shuji Ui Senior Technical Architect, 7summits shuji.ui@7summitsinc.com Twitter@shujiui
  • 2. Shuji Ui Senior Technical Architect 7summits
  • 3. • How many people have built Community sites using Community cloud? • How many people have used Salesforce Tabs + Visualforce Community template? • How many people have used Less? • How many people have used Gulp? Have you used Community Cloud?
  • 4. • Community Templates • Configure Visualforce Template to Community • Load Visualforce Header/Footer to OOTB pages • Configure color code fields in “Community Configuration” custom object • Less • Gulp • Generate CSS Visualforce component using Gulp Demo • Adding header to Customer and Partner communities • Changing brand colors from internal SFDC tab without modifying code Agenda
  • 6. Community Builder Based (KOKUA, KOA, NAPILI, and ALOHA) • Branding Editor to change colors and fonts • Site.com Studio to adjust templates • KOKUA, KOA for Knowledge and Cases • NAPILI for Knowledge, Cases, and Q&A • ALOHA App Launcher for Identity and Connected App SALESFORCE TABS + VISUALFORCE • OOTB tabs • Use Visualforce Template + Header/ Footer components Community Templates
  • 9. • Create Visualforce template and add header and footer Visualforce components to the template Create Visualforce Template
  • 10. • Configure the Visualforce template to community Configure Visualforce Template in Community Site Details
  • 11. OOTB Header / Footer
  • 12. Salesforce Tabs + Visualforce template: OOTB pages
  • 13.
  • 14. Configure Header / Footer html pages to the Salesforce Tabs + Visualforce template • Create Header / Footer html pages • Upload them to a Document folder • Configure them in Community Administration: Branding tab
  • 15. • Create Header / Footer Visualforce pages • Create jQuery script pages • Load jQuery script pages in HTML Header / Footer pages Using jQuery to load Visualforce Header / Footer for OOTB pages
  • 16. • Create Header / Footer Visualforce pages • Add Header / Footer Visualforce components to the pages Header Example: SC_HTMLHeader.page <apex:page applyHtmlTag="false" applyBodyTag="false" showHeader="false" sidebar="false” standardStylesheets="false”> <c:SC_Header /> </apex:page> Create Header / Footer Visualforce Pages
  • 17. Header Example: SC_LoadHeader.page <apex:page showHeader="false" sidebar="false" standardStylesheets="false" contentType="text/javascript" > $j = $.noConflict(); $j(".header-wrap" ).load( "{!$Page.SC_HTMLHeader} #header" ,function(){ $j("div[role='banner']").remove(); $j(".zen-bodyZen").css("border-top", "0px"); }); </apex:page> Using jQuery to load the Visalforce Header / Footer pages
  • 18. Header Example: SC_CustomerHeader.html <div class="header-wrap"></div> <!-- Load jQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Load Visualforce page as a script --> <script type="text/javascript" src="/customer/SC_LoadHtmlHeader"></script> Header.html / Footer.html
  • 19.
  • 21. • Create “Community Configuration“ custom object • Add fields for Brand Primary Color, Brand Secondary Color…etc Configure color code fields in “Community Configuration” object
  • 22. • Query Community Configuration Record and assign values to properties Apex controller
  • 23. • Create an empty Visualforce component named “SC_CSSMain.component” CSS Component
  • 24. Less
  • 25. CSS pre-processors. One of the most popular front-end development tools. Mixins .v-align { display: inline-block; vertical-align: middle; } #navbar{ .v-align; } Less
  • 26. Nested Rule #header-top{ .vertical-align; .brand-color; width: 100%; height: 84px; .header-left { position: relative; .vertical-align; } } Less cont.
  • 27. Variables @brand-primary: #2084ba; @brand-primary-dark: #165C82; @brand-title-text-color: #F6F6F6; #header-top{ .v-align; background: radial-gradient(@brand-primary-color,@brand-primary-dark-color); width: 100%; height: 84px; color: @brand-title-text-color; } Less cont.
  • 28. • Map Visualforce merge fields to Less variables using ~ Map Visualforce merge fields to Less variables
  • 29. Gulp
  • 30. • One of the most popular JavaScript build tools (Grunt, Brunch…etc) • Gulpfile.js, defines build tasks. Great thing about “Gulpfile.js” is JavaScript code not configuration file. • Simple: 5 basic functions • gulp.task: registers function • gulp.run: run tasks • gulp.watch: watch file changes and run tasks • gulp.src: returns a readable stream • gulp.dest: return a writable stream Gulp
  • 31. “compileCSS” task to dynamically generate Visualforce SC_CSSMain.component and upload to SFDC org
  • 32. Demo
  • 33. Demonstrate changing brand colors from internal SFDC tab without modifying code Steps • 2 Communities (Customer and Partner) using one code base • In “Community Configuration” custom object tab  “Brand Customer Community” record  “Brand Partner Community” record • Add SC_Header.component • Style SC_Header.component in header.less • Configure VF merge fields in variable.less • Using Less and Gulp generating SC_MainCSS.component • Change branding colors from internal SFDC tab without modifying code. Demo: Adding header to customer and partner communities using less and gulp
  • 34. • Gulp monitors file changes • Gulp compiled less files • Because of the less variables, merge fields were generated to a css file background: radial-gradient({!BrandPrimaryColor}, {!BrandPrimaryDarkColor}); • Gulp constructed SC_MainCSS.component • Gulp executed MavensMate command to saved SC_MainCSS.component to SFDC org. • SC_MainCSSCotroller read the brand colors in Community Configuration records based on the community name. Here is what happened.
  • 35. “compileCSS” task to dynamically generate Visualforce SC_CSSMain.component and upload to SFDC org
  • 37. • Community Templates: SALESFORCE TABS + VISUALFORCE • Visualforce Template • JQuery loading Visualforce Header/Footer Components to OOTB pages • “Community Configuration” custom object • Using Less + Gulp to generate SC_CSSMain.component • Add header to customer and partner communities • Changing brand colors from internal SFDC tab without modifying code Summary
  • 38. • Multiple Communities with same code base • Managed Package These techniques are useful when
  • 39. • Twitter: @shujiui (Blog, Slides) • Github: https://github.com/shujiui Call to Action
  • 40. Q&A
  • 42. Share Your Feedback, and Win a GoPro! 3 Earn a GoPro prize entry for each completed survey Tap the bell to take a survey2Enroll in a session1

Editor's Notes

  1. 7Summits Community Expert Focus on Community We have done many community implementations using community cloud Especially using Visualforce Strong UI/UX team and we build beautiful community sites. Responsive design I wan to share some techniques Development process
  2. I want to talk about demo first.
  3. When you use Visualforce mix with OOTB pages Consistent Header Footer
  4. It is function
  5. We did one more step further