-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from ECE444-2023Fall/jhanavi-calendar
Organise Events in Calendar Layout
- Loading branch information
Showing
6 changed files
with
180 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
var eventData = JSON.parse(event_data_json.innerText); | ||
console.log(eventData); | ||
var calendarEl = document.getElementById('calendar'); | ||
var calendar = new FullCalendar.Calendar(calendarEl, { | ||
initialView: 'dayGridMonth', // Default view is set to list | ||
|
||
views: { | ||
dayGridMonth: { | ||
buttonText: 'Month' | ||
}, | ||
dayGridWeek: { | ||
type: 'dayGridWeek', | ||
duration: { weeks: 1 }, | ||
buttonText: 'Week' | ||
}, | ||
list: { | ||
type: 'listMonth', // This will give you a list view with a monthly format | ||
buttonText: 'Day' | ||
} | ||
}, | ||
|
||
headerToolbar: { | ||
left: 'prev,next today', | ||
center: 'title', | ||
right: 'dayGridMonth,dayGridWeek,listMonth' | ||
}, | ||
|
||
eventClick: function(info) { | ||
eventKey = info.event.extendedProps.key; | ||
window.location.href = `/events/${eventKey}` ; | ||
}, | ||
|
||
events: eventData, | ||
|
||
}); | ||
|
||
calendar.render(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,10 @@ | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Aclonica&display=swap"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=ADLaM+Display&family=Aclonica&display=swap"> | ||
<link rel="stylesheet" href="{{ url_for ('static', filename='style.css')}}"> | ||
|
||
{% import "bootstrap/wtf.html" as wtf %} | ||
|
||
{% import "bootstrap/wtf.html" as wtf %} | ||
<script src='https://cdn.jsdelivr.net/npm/[email protected]/index.global.min.js'></script> | ||
<script src='https://cdn.jsdelivr.net/npm/[email protected]/index.global.js'></script> | ||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}"> | ||
|
||
</head> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters