generated from hack4impact-calpoly/nextjs-app-template
-
Notifications
You must be signed in to change notification settings - Fork 3
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 #33 from hack4impact-calpoly/calendar
feat: calendar added
- Loading branch information
Showing
7 changed files
with
255 additions
and
117 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,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> | ||
) | ||
} |
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,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> | ||
) | ||
|
||
} |
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 |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} |
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,3 @@ | ||
.wrapper { | ||
margin: 10px; | ||
} |
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,5 @@ | ||
|
||
.header { | ||
font-size: larger; | ||
text-align: center; | ||
} |