www.netz39.de/pages/01_events.md

73 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

---
2023-10-20 14:30:55 +02:00
layout: default
title: Events
permalink: /events
icon: "far fa-calendar"
---
2023-10-20 14:30:55 +02:00
<center>
<h2 class="title"> <i class="far fa-calendar"></i> Events </h2>
</center>
<html lang='de'>
<head>
<meta charset='utf-8' />
2023-10-20 15:22:28 +02:00
<script src='/assets/js/vendor/fullcalendar/index.global.min.js'></script>
<script src='/assets/js/vendor/fullcalendar/de.global.min.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
2023-10-22 13:44:23 +02:00
initialView: 'dayGridMonth',
height: "auto",
locale: 'de',
events: '/calendar-data',
weekNumbers: true,
headerToolbar:
{
left: 'today',
center: 'title',
right: 'prev,next'
}
});
calendar.render();
});
</script>
</head>
<body>
2023-11-04 14:55:33 +01:00
<div id='calendar' style="width:95%; margin: auto;"></div>
2023-11-06 15:06:41 +01:00
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px">
<div style="display: flex; align-items: center; margin-top: 50px">
<p>iCal-Feed:
<code id="icalFeedUrl" style="box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1); font-family: monospace;"></code>
</p>
<a id="copyButton" class="button" style="margin-left: 10px; margin-top: 0px">
<i class="fas fa-copy" title="In Zwischenablage kopieren"></i>
</a>
</div>
</div>
<script>
const ICAL_FEED_URL = "{{site.url}}/feed/eo-events/events.ics";
// set text in HTML element "icalFeedUrl" to the URL
document.getElementById("icalFeedUrl").textContent = ICAL_FEED_URL;
const copyButton = document.getElementById('copyButton');
const urlToCopy = ICAL_FEED_URL;
copyButton.addEventListener('click', () => {
const tempInput = document.createElement('input');
tempInput.value = urlToCopy;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
alert('URL wurde in die Zwischenablage kopiert!');
});
</script>
</body>
</html>