-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Website: add /customer-stories (#23837)
For: #23721 Changes: - Added /customer-stories, a page that displays the testimonials from testimonials.yml - Changed the /testimonials redirect to go to the /customer-stories page. - Updated the "What people are saying" link on the homepage and the header navigation. @mike-j-thomas FYI: To make this PR quickly, I did not implement the sort order in the wireframes or change the testimonials yaml.
- Loading branch information
Showing
9 changed files
with
698 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module.exports = { | ||
|
||
|
||
friendlyName: 'View testimonials', | ||
|
||
|
||
description: 'Display "Testimonials" page.', | ||
|
||
|
||
exits: { | ||
|
||
success: { | ||
viewTemplatePath: 'pages/testimonials' | ||
} | ||
|
||
}, | ||
|
||
|
||
fn: async function () { | ||
|
||
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.testimonials) || !sails.config.builtStaticContent.compiledPagePartialsAppPath) { | ||
throw {badConfig: 'builtStaticContent.testimonials'}; | ||
} | ||
// Get testimonials for the <scrolalble-tweets> component. | ||
let testimonials = _.clone(sails.config.builtStaticContent.testimonials); | ||
|
||
// Filter the testimonials by product category | ||
let testimonialsForMdm = _.filter(testimonials, (testimonial)=>{ | ||
return _.contains(testimonial.productCategories, 'Device management'); | ||
}); | ||
let testimonialsForSecurityEngineering = _.filter(testimonials, (testimonial)=>{ | ||
return _.contains(testimonial.productCategories, 'Vulnerability management'); | ||
}); | ||
let testimonialsForItEngineering = _.filter(testimonials, (testimonial)=>{ | ||
return _.contains(testimonial.productCategories, 'Endpoint operations'); | ||
}); | ||
let testimonialsWithVideoLinks = _.filter(testimonials, (testimonial)=>{ | ||
return testimonial.youtubeVideoUrl; | ||
}); | ||
|
||
return { | ||
testimonialsForMdm, | ||
testimonialsForSecurityEngineering, | ||
testimonialsForItEngineering, | ||
testimonialsWithVideoLinks, | ||
}; | ||
|
||
} | ||
|
||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
parasails.registerPage('testimonials', { | ||
// ╦╔╗╔╦╔╦╗╦╔═╗╦ ╔═╗╔╦╗╔═╗╔╦╗╔═╗ | ||
// ║║║║║ ║ ║╠═╣║ ╚═╗ ║ ╠═╣ ║ ║╣ | ||
// ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝ ╚═╝ ╩ ╩ ╩ ╩ ╚═╝ | ||
data: { | ||
selectedContent: 'mdm', | ||
modal: '', | ||
quotesWithVideoLinks: [], | ||
}, | ||
|
||
// ╦ ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╔═╗ | ||
// ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣ | ||
// ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝ | ||
beforeMount: function() { | ||
for(let quote of this.testimonialsWithVideoLinks) { | ||
if(quote.youtubeVideoUrl){ | ||
this.quotesWithVideoLinks.push({ | ||
modalId: _.kebabCase(quote.quoteAuthorName), | ||
embedId: quote.videoIdForEmbed, | ||
}); | ||
} | ||
} | ||
}, | ||
mounted: async function() { | ||
//… | ||
}, | ||
|
||
// ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗ | ||
// ║║║║ ║ ║╣ ╠╦╝╠═╣║ ║ ║║ ║║║║╚═╗ | ||
// ╩╝╚╝ ╩ ╚═╝╩╚═╩ ╩╚═╝ ╩ ╩╚═╝╝╚╝╚═╝ | ||
methods: { | ||
clickChangePageContent: function(option) { | ||
this.selectedContent = option; | ||
}, | ||
clickOpenVideoModal: function(modalName) { | ||
console.log(modalName); | ||
this.modal = _.kebabCase(modalName); | ||
}, | ||
|
||
closeModal: function() { | ||
this.modal = undefined; | ||
}, | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.