Skip to content

Commit

Permalink
Website: add /customer-stories (#23837)
Browse files Browse the repository at this point in the history
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
eashaw authored Nov 15, 2024
1 parent bead026 commit 4f03956
Show file tree
Hide file tree
Showing 9 changed files with 698 additions and 4 deletions.
51 changes: 51 additions & 0 deletions website/api/controllers/view-testimonials.js
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,
};

}


};
44 changes: 44 additions & 0 deletions website/assets/js/pages/testimonials.page.js
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;
},
}
});
1 change: 1 addition & 0 deletions website/assets/styles/importer.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@
@import 'pages/integrations.less';
@import 'pages/start.less';
@import 'pages/deals.less';
@import 'pages/testimonials.less';

Loading

0 comments on commit 4f03956

Please sign in to comment.