Skip to content

Commit 8f7e97b

Browse files
committed
cleanup: live now functionality, calendar blockers, etc
1 parent 457fd34 commit 8f7e97b

File tree

3 files changed

+14
-280
lines changed

3 files changed

+14
-280
lines changed

static/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<div class="head-container">
9999

100100
<div>
101-
<h1>Join us at re>≡CAP 2025 conference!</h1>
101+
<h1>Thanks for joining us at reCAP 2025!</h1>
102102

103103
<p>
104104
The awesome developer conference all around the SAP Cloud Application Programming Model (CAP). The time of the year
@@ -450,6 +450,8 @@ <h2 class="section-heading">
450450
<script src="./components/nav-section.component.js"></script>
451451
<script src="./components/nav-section-mobile.component.js"></script>
452452
<script src="./components/footer-section.component.js"></script>
453+
<script src="https://unpkg.com/axios@1.6.7/dist/axios.min.js"></script>
454+
<script src="./js/luxon.min.js"></script>
453455
<script src="./js/main.js"></script>
454456
</body>
455457
</html>

static/js/main.js

Lines changed: 5 additions & 245 deletions
Original file line numberDiff line numberDiff line change
@@ -37,101 +37,10 @@ var nav = new Vue({
3737
var header = new Vue({
3838
el: '#header',
3939
data() {
40-
return {
41-
isCalendarsVisible: false
42-
};
43-
},
44-
mounted() {
45-
// console.log(this.createCalendars());
40+
return {};
4641
},
47-
methods: {
48-
toggleCalendars() {
49-
this.isCalendarsVisible = !this.isCalendarsVisible;
50-
},
51-
createCalendars() {
52-
53-
let newStartTime = "2025-07-09T00:00:00.000";
54-
let newEndTime = "2025-07-10T00:00:00.000";
55-
56-
let calendarStartDate = new Date(newStartTime).toISOString().replace(/-|:|\.\d+/g, '');
57-
let calendarEndDate = new Date(newEndTime).toISOString().replace(/-|:|\.\d+/g, '');
58-
59-
let officeStartDate = new Date(newStartTime).toISOString();
60-
let officeEndDate = new Date(newEndTime).toISOString();
61-
62-
const forbiddenCharacters = new RegExp('#', 'g')
63-
const removeForbiddenCharachters = (text) => {
64-
if (typeof text === 'string') {
65-
let formattedText = text.replace(/(&amp;|&)/g, " and ");
66-
return formattedText.replace(forbiddenCharacters, '');
67-
}
68-
return ''
69-
}
70-
71-
const removeForbiddenCharachtersOutlook = (text) => {
72-
if (typeof text === 'string') {
73-
let formattedText = text.replace(/(?:\r\n|\r|\n)/g, "\\n");
74-
return formattedText.replace(forbiddenCharacters, '');
75-
}
76-
return ''
77-
}
78-
79-
let description =
80-
"Join the awesome developer conference all around the SAP Cloud Application Programming Model (CAP). The time of the year where our vivid communities, customers, and partners meet the CAP Product Team and exchange best practices, technical concepts, current projects, ideas for the future, and way more.\n\nFind more information here: https://recap-conf.dev/\n(Links to live streams and recordings will be available there)\n\nImportant Dates:\nCall for Content: until March 10, 2025\nRegistration for Onsite Attendees: Opens on April 10, 2025\nEarly Bird Ticket Application: Ends March 10, 2025\nGet in contact with us in case of further questions: recap.conf@gmail.com.\n\nYour re>≡CAP orga team";
81-
82-
let descriptionOffice = `Join the awesome developer conference all around the SAP Cloud Application Programming Model (CAP). The time of the year where our vivid communities, customers, and partners meet the CAP Product Team and exchange best practices, technical concepts, current projects, ideas for the future, and way more…
83-
<br><br>Find more information here: https://recap-conf.dev/
84-
<br>(Links to live streams and recordings will be available there)
85-
<br><br> Important Dates: <br> Call for Content: until March 10, 2025 <br> Registration for Onsite Attendees: Opens on April 10, 2025 <br> Early Bird Ticket Application: Ends March 10, 2025 <br><br>Get in contact with us in case of further questions: recap.conf@gmail.com.<br><br> Your re>≡CAP orga team`;
86-
87-
let descriptionGoogle = `<br>Join the awesome developer conference all around the SAP Cloud Application Programming Model (CAP). The time of the year where our vivid communities, customers, and partners meet the CAP Product Team and exchange best practices, technical concepts, current projects, ideas for the future, and way more…
88-
<br><br>Find more information here: https://recap-conf.dev/
89-
<br>(Links to live streams and recordings will be available there)
90-
<br><br>Important Dates:<br>Call for Content: until March 10, 2025<br>Registration for Onsite Attendees: Opens on April 10, 2025<br>Early Bird Ticket Application: Ends March 10, 2025<br><br>Get in contact with us in case of further questions: <a href="mailto:recap.conf@gmail.com">recap.conf@gmail.com</a>.<br><br>Your re>≡CAP orga team`;
91-
92-
let cal = [
93-
'BEGIN:VCALENDAR',
94-
'VERSION:2.0',
95-
'BEGIN:VEVENT',
96-
'DTSTART:' + calendarStartDate,
97-
'DTEND:' + calendarEndDate,
98-
'SUMMARY:' + 'Save the Date: reCAP 2025',
99-
'LOCATION:' + 'SAP SE (ROT03), SAP-Allee 27, 68789 St. Leon-Rot (Germany)',
100-
'DESCRIPTION:' + removeForbiddenCharachtersOutlook(description),
101-
'UID:' + '1',
102-
'END:VEVENT',
103-
'END:VCALENDAR'
104-
].join('\n');
105-
106-
return {
107-
calendars: [
108-
{
109-
google: encodeURI([
110-
'https://www.google.com/calendar/render',
111-
'?action=TEMPLATE',
112-
'&text=' + 'Save the Date: reCAP 2025',
113-
'&dates=' + calendarStartDate ,
114-
'/' + calendarEndDate,
115-
'&location='+'SAP SE (ROT03), SAP-Allee 27, 68789 St. Leon-Rot (Germany)',
116-
'&details=' + removeForbiddenCharachters(descriptionGoogle),
117-
'&sprop=&sprop=name:'
118-
].join('')),
119-
office365: encodeURI([
120-
'https://outlook.office365.com/owa/',
121-
'?path=/calendar/action/compose',
122-
'&rru=addevent',
123-
'&subject=' + 'Save the Date: reCAP 2025',
124-
'&startdt=' + officeStartDate,
125-
'&enddt=' + officeEndDate,
126-
'&location=' + 'SAP SE (ROT03), SAP-Allee 27, 68789 St. Leon-Rot (Germany)',
127-
'&body=' + removeForbiddenCharachters(descriptionOffice)
128-
].join('')),
129-
ics: encodeURI('data:text/calendar;charset=utf8,' + cal)
130-
}
131-
]
132-
}
133-
},
134-
}
42+
mounted() {},
43+
methods: {}
13544
});
13645

13746
var main = new Vue({
@@ -239,31 +148,6 @@ var main = new Vue({
239148
);
240149
this.groupExpertCornerTopics();
241150
});
242-
243-
this.updateLiveSession();
244-
245-
let interval;
246-
247-
let timeNow = new Date().toISOString();
248-
249-
const startCounterTime = new Date(
250-
"2025-07-09T00:50:00.000+02:00"
251-
).toISOString();
252-
253-
const endCounterTime = new Date(
254-
"2025-07-09T18:10:00.000+02:00"
255-
).toISOString();
256-
257-
if (timeNow > startCounterTime && timeNow <= endCounterTime) {
258-
interval = setInterval(() => {
259-
timeNow = new Date().toISOString();
260-
if (timeNow > endCounterTime) {
261-
clearInterval(interval);
262-
return;
263-
}
264-
this.updateLiveSession();
265-
}, 30000);
266-
}
267151
},
268152
methods: {
269153
openSpeakerInfoModal(speakers, id) {
@@ -473,123 +357,10 @@ var main = new Vue({
473357
let newStartTime = "2025-07-09T" + start + ":00.000+02:00";
474358
let newEndTime = "2025-07-09T" + end + ":00.000+02:00";
475359

476-
let calendarStartDate = new Date(newStartTime)
477-
.toISOString()
478-
.replace(/-|:|\.\d+/g, "");
479-
let calendarEndDate = new Date(newEndTime)
480-
.toISOString()
481-
.replace(/-|:|\.\d+/g, "");
482-
483-
let officeStartDate = new Date(newStartTime).toISOString();
484-
let officeEndDate = new Date(newEndTime).toISOString();
485-
486-
const forbiddenCharacters = new RegExp("#", "g");
487-
const removeForbiddenCharachters = (text) => {
488-
if (typeof text === "string") {
489-
let formattedText = text.replace(/(&amp;|&)/g, " and ");
490-
return formattedText.replace(forbiddenCharacters, "");
491-
}
492-
return "";
493-
};
494-
495-
const removeForbiddenCharachtersOutlook = (text) => {
496-
if (typeof text === "string") {
497-
let formattedText = text.replace(/(?:\r\n|\r|\n)/g, "\\n");
498-
formattedText = formattedText.replace(/<br>/g, "\\n");
499-
formattedText = formattedText.replace(/(&amp;|&)/g, " and ");
500-
return formattedText.replace(forbiddenCharacters, "");
501-
}
502-
return "";
503-
};
504-
const sessionLocation = (location) => {
505-
if (location.toLowerCase().includes("audimax")) {
506-
return "Yellow Room";
507-
} else if (
508-
location.toLowerCase().includes("w1") ||
509-
location.toLowerCase().includes("w2")
510-
) {
511-
return "Blue Room";
512-
} else if (location.toLowerCase().includes("w3")) {
513-
return "Orange Room";
514-
} else {
515-
return location;
516-
}
517-
};
518-
519-
let cal = [
520-
"BEGIN:VCALENDAR",
521-
"VERSION:2.0",
522-
"BEGIN:VEVENT",
523-
"DTSTART:" + calendarStartDate,
524-
"DTEND:" + calendarEndDate,
525-
"SUMMARY:" +
526-
"reCAP: " +
527-
removeForbiddenCharachtersOutlook(session.title),
528-
"LOCATION:" + sessionLocation(session.location),
529-
"DESCRIPTION:" +
530-
removeForbiddenCharachtersOutlook(session.description),
531-
"UID:" + session.id,
532-
"END:VEVENT",
533-
"END:VCALENDAR",
534-
].join("\n");
535-
536-
let calDescription = "";
537-
538-
if (session.description) {
539-
let formattedDescription = session.description.replace(/&amp;/g, "&");
540-
calDescription = formattedDescription.replace(
541-
/(?:\r\n|\r|\n)/g,
542-
"<br>"
543-
);
544-
}
545-
546-
let timeNow = new Date().toISOString();
547-
let sessionTimeStart = new Date(newStartTime).toISOString();
548-
let sessionTimeEnd = new Date(newEndTime).toISOString();
549-
let sessionLiveStatus = false;
550-
551-
if (timeNow > sessionTimeStart && timeNow < sessionTimeEnd) {
552-
sessionLiveStatus = true;
553-
}
554-
555360
return {
556361
...session,
557362
startTime: newStartTime,
558-
endTime: newEndTime,
559-
isLive: sessionLiveStatus,
560-
calendars: [
561-
{
562-
google: encodeURI(
563-
[
564-
"https://www.google.com/calendar/render",
565-
"?action=TEMPLATE",
566-
"&text=" +
567-
"reCAP: " +
568-
removeForbiddenCharachters(session.title),
569-
"&dates=" + calendarStartDate,
570-
"/" + calendarEndDate,
571-
"&location=" + sessionLocation(session.location),
572-
"&details=" + removeForbiddenCharachters(calDescription),
573-
"&sprop=&sprop=name:",
574-
].join("")
575-
),
576-
office365: encodeURI(
577-
[
578-
"https://outlook.office365.com/owa/",
579-
"?path=/calendar/action/compose",
580-
"&rru=addevent",
581-
"&subject=" +
582-
"reCAP: " +
583-
removeForbiddenCharachters(session.title),
584-
"&startdt=" + officeStartDate,
585-
"&enddt=" + officeEndDate,
586-
"&location=" + sessionLocation(session.location),
587-
"&body=" + removeForbiddenCharachters(calDescription),
588-
].join("")
589-
),
590-
ics: encodeURI("data:text/calendar;charset=utf8," + cal),
591-
},
592-
],
363+
endTime: newEndTime
593364
};
594365
});
595366

@@ -733,15 +504,6 @@ var main = new Vue({
733504

734505
return decoded;
735506
},
736-
updateLiveSession() {
737-
return this.formattedLineup.map((session) => {
738-
let timeNow = new Date().toISOString();
739-
let sessionTimeStart = new Date(session.startTime).toISOString();
740-
let sessionTimeEnd = new Date(session.endTime).toISOString();
741-
742-
session.isLive = timeNow >= sessionTimeStart && timeNow < sessionTimeEnd;
743-
});
744-
},
745507
},
746508
filters: {
747509
formatLocation: function (value) {
@@ -802,9 +564,7 @@ var main = new Vue({
802564
var footer = new Vue({
803565
el: '#footer',
804566
data() {
805-
return {
806-
807-
};
567+
return {};
808568
},
809569
});
810570

static/program.html

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,8 @@ <h2 class="section-heading">
115115
<div class="agenda-slot-header">
116116
<div>
117117
<p class="agenda-slot-details">
118-
<span
119-
class="agenda-time"
120-
:class="{ live:
121-
(
122-
event.location.toLowerCase().includes('audimax') ||
123-
event.location.toLowerCase().includes('w1') ||
124-
event.location.toLowerCase().includes('w2')
125-
) && event.isLive}">
126-
127-
<template v-if="(
128-
event.location.toLowerCase().includes('audimax') ||
129-
event.location.toLowerCase().includes('w1') ||
130-
event.location.toLowerCase().includes('w2')
131-
) && event.isLive">LIVE NOW</template>
132-
<template v-else>{{event.startTime | trimTime}} {{event.endTime | trimTime}}</template>
118+
<span class="agenda-time" >
119+
{{event.startTime | trimTime}} {{event.endTime | trimTime}}
133120
</span>
134121

135122
<span
@@ -144,14 +131,6 @@ <h2 class="section-heading">
144131
>
145132
{{ event.location | formatLocation }}
146133
</span>
147-
148-
<!-- <span
149-
class="agenda-level" v-if="event.proficiencyLevel"
150-
:class="{ beginner: event.proficiencyLevel === 'beginner', intermediate: event.proficiencyLevel === 'intermediate', advanced: event.proficiencyLevel === 'advanced' }"
151-
:title="formatProficiencyLevel(event.proficiencyLevel)"
152-
>
153-
{{ event.proficiencyLevel | formatLevel}}
154-
</span> -->
155134
</p>
156135
</div>
157136
</div>
@@ -204,19 +183,12 @@ <h2 class="agenda-slot-title">
204183
<p class="agenda-slot-description">{{event.description | decodeHtml}}</p>
205184
</div>
206185

207-
<div class="agenda-links">
208-
<a v-if="event.location.toLowerCase().includes('audimax')" href="https://broadcast.co.sap.com/go/reCAP" class="agenda-slot-linkitem" :class="{livestream: event.isLive}" rel="noopener noreferrer" target="_blank" hreflang="en">Livestream</a>
186+
<!-- <div class="agenda-links">
187+
<a v-if="event.location.toLowerCase().includes('audimax')" href="https://broadcast.co.sap.com/go/reCAP" class="agenda-slot-linkitem" rel="noopener noreferrer" target="_blank" hreflang="en">Livestream</a>
209188
210189
<a v-if="event.location.toLowerCase().includes('w1') || event.location.toLowerCase().includes('w2')" href="https://teams.microsoft.com/l/meetup-join/19%3ameeting_YjljYWQzNTEtNzkwNC00NDQ2LWE5MDAtYmEzODA3ZGNmZjIw%40thread.v2/0?context=%7b%22Tid%22%3a%2242f7676c-f455-423c-82f6-dc2d99791af7%22%2c%22Oid%22%3a%223d4d6882-45a1-41ce-9418-35a35744348f%22%7d"
211-
class="agenda-slot-linkitem" :class="{livestream: event.isLive}" rel="noopener noreferrer" target="_blank" hreflang="en">Livestream</a>
212-
213-
214-
<ul class="calendar-list is-calendar" v-if="showSessionCalendars(event)">
215-
<calendar-link :type="'google'" :link="event.calendars[0].google" :cal="true">Google</calendar-link>
216-
<calendar-link :type="'office'" :link="event.calendars[0].office365" :cal="true">Office 365</calendar-link>
217-
<calendar-link :type="'outlook'" :link="event.calendars[0].ics" download='reCAP2025.ics' :cal="true">Outlook</calendar-link>
218-
</ul>
219-
</div>
190+
class="agenda-slot-linkitem" rel="noopener noreferrer" target="_blank" hreflang="en">Livestream</a>
191+
</div> -->
220192

221193
<template v-if="event.presentationLinks.length > 0">
222194
<template v-if="!(event.presentationLinks.length == 1 && event.presentationLinks[0].linkType.toLowerCase() == 'feedback')">

0 commit comments

Comments
 (0)