Website: Update homepage hero & content (#32570)
Closes: https://github.com/fleetdm/confidential/issues/12074 Closes: https://github.com/fleetdm/confidential/issues/12018 Changes: - Updated the homepage hero to have a quote from Wes Whetstone - Updated the homepage layout to match the latest wireframes
This commit is contained in:
+47
-1
@@ -20,12 +20,58 @@ module.exports = {
|
||||
description: 'Requesting user is logged in, so redirect to the internal welcome page.'
|
||||
},
|
||||
|
||||
badConfig: {
|
||||
responseType: 'badConfig'
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
||||
fn: async function () {
|
||||
|
||||
return {};
|
||||
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 testimonialsForScrollableTweets = _.clone(sails.config.builtStaticContent.testimonials);
|
||||
|
||||
// Specify an order for the testimonials on this page using the last names of quote authors
|
||||
let testimonialOrderForThisPage = [
|
||||
'Bart Reardon',
|
||||
'Scott MacVicar',
|
||||
'Mike Meyer',
|
||||
'Luis Madrigal',
|
||||
'Tom Larkin',
|
||||
'Kenny Botelho',
|
||||
'Erik Gomez',
|
||||
'Chandra Majumdar',
|
||||
'Eric Tan',
|
||||
'Matt Carr',
|
||||
'Nico Waisman',
|
||||
'Dan Grzelak',
|
||||
'Philip Chotipradit',
|
||||
'Roger Cantrell',
|
||||
'Chayce O\'Neal'
|
||||
];
|
||||
|
||||
// Filter the testimonials by product category
|
||||
testimonialsForScrollableTweets = _.filter(testimonialsForScrollableTweets, (testimonial)=>{
|
||||
return _.contains(testimonial.productCategories, 'Device management') && _.contains(testimonialOrderForThisPage, testimonial.quoteAuthorName);
|
||||
});
|
||||
|
||||
testimonialsForScrollableTweets.sort((a, b)=>{
|
||||
if(testimonialOrderForThisPage.indexOf(a.quoteAuthorName) === -1){
|
||||
return 1;
|
||||
} else if(testimonialOrderForThisPage.indexOf(b.quoteAuthorName) === -1) {
|
||||
return -1;
|
||||
}
|
||||
return testimonialOrderForThisPage.indexOf(a.quoteAuthorName) - testimonialOrderForThisPage.indexOf(b.quoteAuthorName);
|
||||
});
|
||||
|
||||
|
||||
return {
|
||||
testimonialsForScrollableTweets
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user