diff --git a/_config.yml b/_config.yml
index cd5b40a..f9eeede 100644
--- a/_config.yml
+++ b/_config.yml
@@ -118,7 +118,8 @@ author:
# - label: "GitHub"
# icon: "fab fa-fw fa-github"
# # url: "https://github.com/"
-
+head_scripts:
+ - /assets/js/ics.js
# Site Footer
footer:
links:
diff --git a/_data/authors.yml b/_data/authors.yml
index e196432..abb7615 100644
--- a/_data/authors.yml
+++ b/_data/authors.yml
@@ -671,6 +671,15 @@ sp5xmi:
## end SP5XMI
+## begin SP6SP
+sp6sp:
+ name : Marcin
+ callsign : SP6SP
+ constructor : no
+ speaker : yes
+
+## end SP6SP
+
## begin Alek
alek:
name : Alek Zawada
diff --git a/_pages/talks.html b/_pages/talks.html
index d3f078a..e7d815a 100644
--- a/_pages/talks.html
+++ b/_pages/talks.html
@@ -198,7 +198,7 @@
Stołówka
{%if talk.where_exactly %}
{%if talk.where_exactly_geourl %}
- Gdzie: {{ talk.where_exactly }}
+ Gdzie: {{ talk.where_exactly }}
{% else %}
Gdzie: {{ talk.where_exactly }}
@@ -213,7 +213,14 @@ Stołówka
{% endif %}
{% endfor %}
- Kiedy: {{ talk.starttime | date: "%H:%M" }} - {{ talk.endtime | date: "%H:%M" }}
+ Kiedy: {{ talk.starttime | date: "%H:%M" }} - {{ talk.endtime | date: "%H:%M" }}
+ Dodaj do kalendarza
{% endfor %}
@@ -255,6 +262,13 @@ Inne
{% endfor %}
Kiedy: {{ talk.starttime | date: "%H:%M" }} - {{ talk.endtime | date: "%H:%M" }}
+ Dodaj do kalendarza
{% endfor %}
diff --git a/_sass/minimal-mistakes/_talks.scss b/_sass/minimal-mistakes/_talks.scss
index 73bccf1..91131ff 100644
--- a/_sass/minimal-mistakes/_talks.scss
+++ b/_sass/minimal-mistakes/_talks.scss
@@ -25,20 +25,36 @@
&.breakfast {
background-color: #81ff7f24;
color: #787878;
+
+ strong:before {
+ content: "🥐 ";
+ }
}
&.dinner {
background-color: rgb(149 140 90 / 14%);
color: #787878;
+
+ strong:before {
+ content: "🍽️ ";
+ }
}
&.tba {
background-color: rgb(67 87 243 / 14%);
+ strong:before {
+ content: "🔜 ";
+ }
+
}
&.puk {
- background-color: #fffb7f24
+ background-color: #fffb7f24;
+
+ strong:before {
+ content: "🛠️ ";
+ }
}
}
diff --git a/assets/js/ics.js b/assets/js/ics.js
new file mode 100644
index 0000000..2f7f69b
--- /dev/null
+++ b/assets/js/ics.js
@@ -0,0 +1,51 @@
+ document.querySelectorAll('.download-ics').forEach(link => {
+ link.addEventListener('click', function (event) {
+ event.preventDefault();
+
+ // Get event details from data attributes
+ const eventDetails = {
+ start: this.getAttribute('data-start'),
+ end: this.getAttribute('data-end'),
+ title: this.getAttribute('data-title'),
+ description: this.getAttribute('data-description'),
+ location: this.getAttribute('data-location'),
+ url: this.getAttribute('data-url')
+ };
+
+ // Create iCal string
+ const icalString = `
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Sample Corp//NONSGML Event//EN
+BEGIN:VEVENT
+UID:${new Date().toISOString()}@sample.com
+DTSTAMP:${new Date().toISOString().replace(/[-:]/g, '').split('.')[0]}Z
+DTSTART:${eventDetails.start}
+DTEND:${eventDetails.end}
+SUMMARY:${eventDetails.title}
+DESCRIPTION:${eventDetails.description}
+LOCATION:${eventDetails.location}
+URL:${eventDetails.url}
+END:VEVENT
+END:VCALENDAR
+ `.trim();
+
+ // Encode iCal string in Base64
+ const base64String = btoa(icalString);
+
+ // Create a download link
+ const downloadLink = document.createElement('a');
+ downloadLink.href = 'data:text/calendar;base64,' + base64String;
+ downloadLink.download = `${eventDetails.title.replace(/[^a-z0-9]/gi, '_').toLowerCase()}.ics`;
+ downloadLink.style.display = 'none';
+
+ // Append the link to the body
+ document.body.appendChild(downloadLink);
+
+ // Programmatically click the download link
+ downloadLink.click();
+
+ // Remove the link from the document
+ document.body.removeChild(downloadLink);
+ });
+ });
\ No newline at end of file