mirror of
https://github.com/netz39/www.netz39.de.git
synced 2025-01-31 09:33:18 +01:00
Merge pull request #28 from netz39/6-page-veranstaltungenkalender
Add built-in calender by using fullcalendar.io
This commit is contained in:
commit
6dfce388c7
9 changed files with 105 additions and 1 deletions
|
@ -46,6 +46,10 @@ collections:
|
|||
portfolio:
|
||||
output: true
|
||||
permalink: /:collection/:name
|
||||
events:
|
||||
output: true
|
||||
permalink: /events/:path
|
||||
title: Events
|
||||
|
||||
# BUILD SETTINGS
|
||||
sass:
|
||||
|
|
7
_events/stammtisch_kw42.md
Normal file
7
_events/stammtisch_kw42.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
layout: event
|
||||
title: "Stammtisch KW42"
|
||||
event_date: 2023-10-18
|
||||
---
|
||||
|
||||
Heute ist Stammtisch!
|
33
_layouts/event.liquid
Normal file
33
_layouts/event.liquid
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
<article {% if page.feature-img or page.color %}class="feature-image" {% endif %}>
|
||||
<header id="main" style="">
|
||||
<div class="title-padder">
|
||||
{% if page.hide_title %}
|
||||
<div class="feature-image-padding"></div>
|
||||
{% else %}
|
||||
<h1 id="{{ page.title | cgi_escape }}" class="title">{{ page.title }}</h1>
|
||||
{% include blog/post_info.liquid author=page.author date=page.event_date %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="post-content">
|
||||
{% if page.bootstrap %}
|
||||
<div class="bootstrap-iso">
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
{% if page.bootstrap %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<!-- Social media shares -->
|
||||
{% include social/share_buttons.liquid %}
|
||||
|
||||
<!-- Tag list -->
|
||||
{% capture tag_list %}{{ page.tags | join: "|"}}{% endcapture %}
|
||||
{% include default/tags_list.liquid tags=tag_list %}
|
||||
|
||||
</article>
|
|
@ -157,7 +157,6 @@ table {
|
|||
word-wrap: break-word;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
td,
|
||||
|
|
6
assets/js/vendor/fullcalendar/de.global.min.js
vendored
Normal file
6
assets/js/vendor/fullcalendar/de.global.min.js
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
/*!
|
||||
FullCalendar Core v6.1.9
|
||||
Docs & License: https://fullcalendar.io
|
||||
(c) 2023 Adam Shaw
|
||||
*/
|
||||
!function(e){"use strict";function t(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var n={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${t(e)} ${e}`,next:e=>`Nächste${t(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${t(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};FullCalendar.globalLocales.push(n)}();
|
6
assets/js/vendor/fullcalendar/index.global.min.js
vendored
Normal file
6
assets/js/vendor/fullcalendar/index.global.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
calendar-data.html
Normal file
17
calendar-data.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
layout:
|
||||
title:
|
||||
permalink: /calendar-data/
|
||||
---
|
||||
|
||||
[
|
||||
{% for event in site.events %}
|
||||
{
|
||||
"title":"{{event.title}}",
|
||||
"start": "{{event.event_date}}",
|
||||
"allDay":true,
|
||||
"url":"{{event.url}}"
|
||||
}
|
||||
{%unless forloop.last %},{%endunless%}
|
||||
{% endfor %}
|
||||
]
|
32
pages/01_events.md
Normal file
32
pages/01_events.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
layout: default
|
||||
title: Events
|
||||
permalink: /events
|
||||
icon: "far fa-calendar"
|
||||
---
|
||||
|
||||
<center>
|
||||
<h2 class="title"> <i class="far fa-calendar"></i> Events </h2>
|
||||
</center>
|
||||
|
||||
<html lang='de'>
|
||||
<head>
|
||||
<meta charset='utf-8' />
|
||||
<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, {
|
||||
initialView: 'dayGridMonth', height: "auto", locale: 'de', events: '/calendar-data'
|
||||
});
|
||||
calendar.render();
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='calendar' style="width:80%; margin: auto;"></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue