Skip to content

Commit

Permalink
Merge pull request #33 from hack4impact-calpoly/calendar
Browse files Browse the repository at this point in the history
feat: calendar added
  • Loading branch information
javalosr2004 authored Feb 5, 2024
2 parents 0d033d7 + a47ea1a commit 732f6e2
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 117 deletions.
270 changes: 153 additions & 117 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@
"lint:fix": "next lint --fix"
},
"dependencies": {
"@fullcalendar/bootstrap5": "^6.1.10",
"@fullcalendar/core": "^6.1.10",
"@fullcalendar/daygrid": "^6.1.10",
"@fullcalendar/interaction": "^6.1.10",
"@fullcalendar/list": "^6.1.10",
"@fullcalendar/react": "^6.1.10",
"@fullcalendar/timegrid": "^6.1.10",
"@chakra-ui/react": "^2.8.2",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@heroicons/react": "^2.1.1",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.3",
"eslint-plugin-prettier": "^5.1.3",
"framer-motion": "^11.0.3",
"mongoose": "^7.6.8",
Expand Down
25 changes: 25 additions & 0 deletions src/app/calendar/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use client'
import React from 'react'
import Calendar from '@components/Calendar'
import style from "@styles/calendar/eventpage.module.css"




export default function Events() {
return (
<div className={style.page}>
<header className={style.header}>
<h1>Event Calendar</h1>
</header>
<main>
<div>
<Calendar
/>
</div>
</main>


</div>
)
}
47 changes: 47 additions & 0 deletions src/app/components/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react'
import FullCalendar from '@fullcalendar/react'
import dayGridPlugin from '@fullcalendar/daygrid'
import ineractionPlugin, {Draggable, DropArg} from '@fullcalendar/interaction'
import timeGridPlugin from '@fullcalendar/timegrid'
import listPlugin from "@fullcalendar/list"
import {IEvent} from '@database/eventSchema'
import style from "@styles/calendar/calendar.module.css"
import styled from 'styled-components'
import bootstrap5Plugin from '@fullcalendar/bootstrap5';

import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-icons/font/bootstrap-icons.css'; // needs additional webpack config!


export default function Calendar () {

return (
<div>
<div className={style.wrapper}>
<FullCalendar
plugins={[ dayGridPlugin, ineractionPlugin, timeGridPlugin, bootstrap5Plugin ]}
headerToolbar={{
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
}}
events={{}}
nowIndicator={true}
editable={true}
droppable={true}
selectable={true}
selectMirror={true}
// dateClick={{}}
// drop={}
// eventClick={}
initialView="dayGridMonth"
contentHeight = "600px"
themeSystem='bootstrap5'

/>
</div>

</div>
)

}
13 changes: 13 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
* {
margin: 0px;
}

:root{
@media (max-width: 767.98px) {
.fc .fc-toolbar.fc-header-toolbar {
display: block;
text-align: center;
}

.fc-header-toolbar .fc-toolbar-chunk {
display: block;
}
}
}
3 changes: 3 additions & 0 deletions src/app/styles/calendar/calendar.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.wrapper {
margin: 10px;
}
5 changes: 5 additions & 0 deletions src/app/styles/calendar/eventpage.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.header {
font-size: larger;
text-align: center;
}

0 comments on commit 732f6e2

Please sign in to comment.