@@ -17,19 +17,6 @@ <h1 class="page-title">Speaking Engagements</h1>
1717 </ a >
1818 </ div >
1919
20- <!-- Next Speaking Engagement -->
21- < section class ="next-speaking-section " id ="next-speaking ">
22- < div class ="next-speaking-header ">
23- < svg class ="section-svg-icon " viewBox ="0 0 24 24 " width ="48 " height ="48 " fill ="currentColor ">
24- < path d ="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z "/>
25- </ svg >
26- < h2 > Next Speaking Engagement</ h2 >
27- </ div >
28- < div id ="next-event-container " class ="next-event-card ">
29- < div class ="loading "> Loading next event...</ div >
30- </ div >
31- </ section >
32-
3320 <!-- Places I'm Speaking At -->
3421 < section class ="speaking-section events-section ">
3522 < div class ="section-header ">
@@ -200,139 +187,11 @@ <h3>Interested in having me speak at your event?</h3>
200187 transform : scale (1.1 ) rotate (5deg );
201188 }
202189
203- /* Next Speaking Engagement */
204- .next-speaking-section {
205- margin-bottom : 60px ;
206- padding : 50px 40px ;
207- background : rgba (26 , 26 , 26 , 0.6 );
208- backdrop-filter : blur (10px );
209- -webkit-backdrop-filter : blur (10px );
210- border-radius : 20px ;
211- border : 2px solid rgba (255 , 215 , 0 , 0.3 );
212- box-shadow : 0 8px 32px rgba (0 , 0 , 0 , 0.4 );
213- animation : fadeInUp 0.8s ease-out 0.4s backwards;
214- }
215-
216- .next-speaking-header {
217- display : flex;
218- align-items : center;
219- gap : 20px ;
220- margin-bottom : 30px ;
221- }
222-
223- .next-speaking-header h2 {
224- font-size : 2.2rem ;
225- color : var (--gold-primary );
226- margin : 0 ;
227- font-weight : 700 ;
228- letter-spacing : -0.5px ;
229- }
230-
231190 .section-svg-icon {
232191 color : var (--gold-primary );
233192 filter : drop-shadow (0 4px 8px rgba (255 , 215 , 0 , 0.3 ));
234193 }
235194
236- .next-event-card {
237- background : rgba (42 , 42 , 42 , 0.6 );
238- backdrop-filter : blur (10px );
239- -webkit-backdrop-filter : blur (10px );
240- border-radius : 16px ;
241- padding : 35px ;
242- box-shadow : 0 8px 32px rgba (0 , 0 , 0 , 0.5 );
243- border : 1px solid rgba (255 , 215 , 0 , 0.2 );
244- border-left : 4px solid var (--gold-primary );
245- transition : all 0.3s ease;
246- }
247-
248- .next-event-card : hover {
249- transform : translateX (5px );
250- border-left-color : var (--gold-secondary );
251- box-shadow : 0 12px 40px rgba (0 , 0 , 0 , 0.6 );
252- }
253-
254- .event-main-info {
255- margin-bottom : 20px ;
256- }
257-
258- .event-title {
259- font-size : 1.8rem ;
260- color : var (--gold-primary );
261- margin : 0 0 15px 0 ;
262- font-weight : 600 ;
263- }
264-
265- .event-description {
266- color : var (--text-secondary );
267- line-height : 1.6 ;
268- margin : 0 ;
269- }
270-
271- .event-meta {
272- display : flex;
273- flex-wrap : wrap;
274- gap : 20px ;
275- margin-bottom : 15px ;
276- padding : 15px 0 ;
277- border-top : 1px solid rgba (218 , 165 , 32 , 0.2 );
278- border-bottom : 1px solid rgba (218 , 165 , 32 , 0.2 );
279- }
280-
281- .event-date ,
282- .event-time ,
283- .event-room {
284- display : flex;
285- align-items : center;
286- gap : 8px ;
287- color : var (--gold-secondary );
288- font-weight : 600 ;
289- }
290-
291- .event-date svg ,
292- .event-time svg ,
293- .event-room svg {
294- flex-shrink : 0 ;
295- }
296-
297- .event-tags {
298- display : flex;
299- flex-wrap : wrap;
300- gap : 8px ;
301- margin-top : 15px ;
302- }
303-
304- .event-tag {
305- background : rgba (255 , 215 , 0 , 0.15 );
306- backdrop-filter : blur (5px );
307- -webkit-backdrop-filter : blur (5px );
308- color : var (--gold-primary );
309- padding : 8px 16px ;
310- border-radius : 50px ;
311- font-size : 0.9rem ;
312- border : 1px solid rgba (255 , 215 , 0 , 0.3 );
313- font-weight : 500 ;
314- transition : all 0.3s ease;
315- }
316-
317- .event-tag : hover {
318- background : rgba (255 , 215 , 0 , 0.25 );
319- border-color : var (--gold-primary );
320- transform : translateY (-2px );
321- }
322-
323- .loading ,
324- .no-events ,
325- .error-message {
326- text-align : center;
327- padding : 30px ;
328- color : var (--text-secondary );
329- font-size : 1.1rem ;
330- }
331-
332- .error-message {
333- color : # ff6b6b ;
334- }
335-
336195 .speaking-section {
337196 margin-bottom : 80px ;
338197 animation : fadeInUp 0.8s ease-out 0.6s backwards;
@@ -660,113 +519,3 @@ <h3>Interested in having me speak at your event?</h3>
660519 }
661520 }
662521</ style >
663-
664- < script >
665- // Fetch and display next speaking engagement from Sessionize view-source API
666- fetch ( 'https://sessionize.com/api/v2/8zkgq232gg/view/Sessions' )
667- . then ( response => response . json ( ) )
668- . then ( data => {
669- console . log ( 'Sessionize API response:' , data ) ; // Debug log
670- const container = document . getElementById ( 'next-event-container' ) ;
671-
672- let nextEvent = null ;
673- const now = new Date ( ) ;
674- let upcomingItems = [ ] ;
675-
676- // Parse the response - it could be an array or nested object
677- let sessions = [ ] ;
678-
679- // Try different possible structures
680- if ( Array . isArray ( data ) ) {
681- // If data is directly an array
682- sessions = data ;
683- } else if ( data . sessions && Array . isArray ( data . sessions ) ) {
684- sessions = data . sessions ;
685- } else if ( data . groupedSessions && Array . isArray ( data . groupedSessions ) ) {
686- // Flatten grouped sessions
687- sessions = data . groupedSessions . flatMap ( group => group . sessions || [ ] ) ;
688- } else if ( data . data && Array . isArray ( data . data ) ) {
689- sessions = data . data ;
690- }
691-
692- // Find upcoming sessions
693- sessions . forEach ( session => {
694- // Check various date field names that Sessionize might use
695- const dateStr = session . startsAt || session . startTime || session . sessionStartTime ||
696- session . startDate || session . starts || session . date ;
697-
698- if ( dateStr ) {
699- try {
700- const sessionDate = new Date ( dateStr ) ;
701- if ( sessionDate >= now && ! isNaN ( sessionDate . getTime ( ) ) ) {
702- upcomingItems . push ( {
703- title : session . title || session . name || session . sessionTitle || 'Untitled Session' ,
704- description : session . description || session . sessionDescription || '' ,
705- startsAt : dateStr ,
706- room : session . room || session . roomName || session . location || '' ,
707- categories : session . categories || session . tags || [ ]
708- } ) ;
709- }
710- } catch ( e ) {
711- console . warn ( 'Error parsing date:' , dateStr , e ) ;
712- }
713- }
714- } ) ;
715-
716- // Sort by date and get the next one
717- if ( upcomingItems . length > 0 ) {
718- upcomingItems . sort ( ( a , b ) => new Date ( a . startsAt ) - new Date ( b . startsAt ) ) ;
719- nextEvent = upcomingItems [ 0 ] ;
720- }
721-
722- if ( nextEvent ) {
723- const eventDate = new Date ( nextEvent . startsAt ) ;
724- const dateOptions = { year : 'numeric' , month : 'long' , day : 'numeric' } ;
725- const timeOptions = { hour : '2-digit' , minute : '2-digit' } ;
726-
727- container . innerHTML = `
728- <div class="event-main-info">
729- <h3 class="event-title">${ nextEvent . title } </h3>
730- ${ nextEvent . description ? `<p class="event-description">${ nextEvent . description } </p>` : '' }
731- </div>
732- <div class="event-meta">
733- <div class="event-date">
734- <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
735- <path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/>
736- </svg>
737- <span>${ eventDate . toLocaleDateString ( 'en-US' , dateOptions ) } </span>
738- </div>
739- <div class="event-time">
740- <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
741- <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
742- </svg>
743- <span>${ eventDate . toLocaleTimeString ( 'en-US' , timeOptions ) } </span>
744- </div>
745- ${ nextEvent . room ? `
746- <div class="event-room">
747- <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
748- <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>
749- </svg>
750- <span>${ nextEvent . room } </span>
751- </div>` : '' }
752- </div>
753- ${ nextEvent . categories && nextEvent . categories . length > 0 ? `
754- <div class="event-tags">
755- ${ nextEvent . categories . map ( cat => {
756- if ( typeof cat === 'string' ) return `<span class="event-tag">${ cat } </span>` ;
757- if ( cat . categoryItems ) return cat . categoryItems . map ( item => `<span class="event-tag">${ item . name || item } </span>` ) . join ( '' ) ;
758- if ( cat . name ) return `<span class="event-tag">${ cat . name } </span>` ;
759- return '' ;
760- } ) . join ( '' ) }
761- </div>` : '' }
762- ` ;
763- } else {
764- container . innerHTML = '<p class="no-events">No upcoming speaking engagements scheduled at the moment. Check back soon!</p>' ;
765- }
766- } )
767- . catch ( error => {
768- console . error ( 'Error fetching speaking data:' , error ) ;
769- document . getElementById ( 'next-event-container' ) . innerHTML =
770- '<p class="error-message">Unable to load upcoming events. Please check back later.</p>' ;
771- } ) ;
772- </ script >
0 commit comments