Website: rename Gitops workshop page to Workshops, update content (#48827)
Changes: - updated the URL for the /gitops-workshop page to be /workshops, and added a redirect - Updated the workshops page to render cards for "Apple administrator workshop" events - Updated the content and layout of the /workshops page to match the latest wireframes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Launched a new **Workshops** page with a refreshed hero and carousel-driven experience. * Updated upcoming workshops to label event type (e.g., GitOps vs Apple administrator) and display event details with correct links. * **Bug Fixes** * Updated routing so the new Workshops page is the primary destination. * Kept the old workshop URL working by redirecting it to the new page (and ensured the page remains accessible without needing to be signed in). <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Vendored
+12
-5
@@ -1,16 +1,16 @@
|
||||
module.exports = {
|
||||
|
||||
|
||||
friendlyName: 'View gitops workshop',
|
||||
friendlyName: 'View workshops',
|
||||
|
||||
|
||||
description: 'Display "Gitops workshop" page.',
|
||||
description: 'Display "Workshops" page.',
|
||||
|
||||
|
||||
exits: {
|
||||
|
||||
success: {
|
||||
viewTemplatePath: 'pages/gitops-workshop'
|
||||
viewTemplatePath: 'pages/workshops'
|
||||
}
|
||||
|
||||
},
|
||||
@@ -22,7 +22,7 @@ module.exports = {
|
||||
|
||||
|
||||
let futureGitopsEvents = await sails.helpers.http.get.with({
|
||||
url: `https://www.eventbriteapi.com/v3/organizations/${sails.config.custom.eventbriteOrgId}/events/?name_filter=gitops&show_series_parent=true&page_size=200&time_filter=current_future&status=live`,
|
||||
url: `https://www.eventbriteapi.com/v3/organizations/${sails.config.custom.eventbriteOrgId}/events/?show_series_parent=true&page_size=200&time_filter=current_future&status=live`,
|
||||
headers: {
|
||||
authorization: `Bearer ${sails.config.custom.eventbriteApiToken}`
|
||||
},
|
||||
@@ -36,6 +36,13 @@ module.exports = {
|
||||
let eventsToGetDetailsFor = futureGitopsEvents.events;
|
||||
|
||||
await sails.helpers.flow.simultaneouslyForEach(eventsToGetDetailsFor, async (event)=>{
|
||||
// Determine if this event is a GitOps workshop or an Apple administrator workshop.
|
||||
let eventType = _.contains(event.name.text.toLowerCase(), 'gitops') ? 'GitOps workshop' : _.contains(event.name.text.toLowerCase(), 'apple administrator') ? 'Apple administrator workshop' : undefined;
|
||||
// If it is not one of those types of events, skip it.
|
||||
if(!eventType) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Convert the ISO timestamps that represent the start and end time of the event into a formatted string.
|
||||
// Create new Date objects from the start and end times.
|
||||
let eventStartsOn = new Date(event.start.utc);
|
||||
@@ -60,7 +67,6 @@ module.exports = {
|
||||
let shortenedTimeZone = _.find(partsOfTimezone, {type: 'timeZoneName'});
|
||||
let abbreviatedTimeZoneString = shortenedTimeZone.value;
|
||||
|
||||
|
||||
let startTime = new Intl.DateTimeFormat('en-US', {
|
||||
timeZone: eventTimeZone,
|
||||
hour: 'numeric',
|
||||
@@ -85,6 +91,7 @@ module.exports = {
|
||||
eventbriteLink: event.url,
|
||||
eventTime: eventTimeDetailsString,
|
||||
startsAt: eventStartsAt,
|
||||
type: eventType,
|
||||
};
|
||||
|
||||
// If an event has a venue_id, we'll send a request to the Eventbrite API to get details about the venue.
|
||||
Reference in New Issue
Block a user