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:
Eric
2025-09-04 12:12:24 +09:00
committed by GitHub
parent 990eb3041b
commit 2cb83a1cd5
4 changed files with 200 additions and 252 deletions
+47 -1
View File
@@ -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
};
}