- commit
- 23b4192227f944b704dbcfe0e08248a9b9123722
- parent
- 4aa91e045434696143b33dcf6599feb810d520c0
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2022-02-04 16:58
setup fullcalendar
Diffstat
| M | index.html | 5 | +++++ |
| A | main.js | 18 | ++++++++++++++++++ |
| M | package.json | 4 | +++- |
| A | style.css | 13 | +++++++++++++ |
4 files changed, 39 insertions, 1 deletions
diff --git a/index.html b/index.html
@@ -4,9 +4,14 @@ 4 4 <meta charset="utf-8"> 5 5 <title>Kububu</title> 6 6 <meta http-equiv="Content-Security-Policy" content="default-src 'self'"> -1 7 <link rel="stylesheet" type="text/css" href="node_modules/fullcalendar-scheduler/main.css"> 7 8 <link rel="stylesheet" type="text/css" href="style.css"> 8 9 </head> 9 10 <body> -1 11 <div class="calendar"></div> -1 12 -1 13 <script src="node_modules/fullcalendar-scheduler/main.js"></script> -1 14 <script src="node_modules/fullcalendar-scheduler/locales/de.js"></script> 10 15 <script src="main.js" type="module"></script> 11 16 </body> 12 17 </html>
diff --git a/main.js b/main.js
@@ -0,0 +1,18 @@
-1 1 var calendar = new FullCalendar.Calendar(
-1 2 document.querySelector('.calendar'),
-1 3 {
-1 4 schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
-1 5 locale: navigator.language,
-1 6 scrollTime: '07:00',
-1 7 nowIndicator: true,
-1 8 weekNumberCalculation: 'ISO',
-1 9 height: '100%',
-1 10 headerToolbar: {
-1 11 left: 'timeGridWeek,dayGridMonth',
-1 12 center: 'title',
-1 13 right: 'today prev,next',
-1 14 },
-1 15 initialView: 'timeGridWeek',
-1 16 }
-1 17 );
-1 18 calendar.render();
diff --git a/package.json b/package.json
@@ -4,5 +4,7 @@ 4 4 "description": "caldav frontend", 5 5 "author": "Tobias Bengfort <tobias.bengfort@posteo.de>", 6 6 "license": "MIT",7 -1 "dependencies": {}-1 7 "dependencies": { -1 8 "fullcalendar-scheduler": "^5.10.1" -1 9 } 8 10 }
diff --git a/style.css b/style.css
@@ -0,0 +1,13 @@
-1 1 body {
-1 2 height: 100vh;
-1 3 box-sizing: border-box;
-1 4 margin: 0;
-1 5 padding: 0.5rem;
-1 6 }
-1 7
-1 8 .fc-icon-chevron-left::before {
-1 9 content: "\2190";
-1 10 }
-1 11 .fc-icon-chevron-right::before {
-1 12 content: "\2192";
-1 13 }