forked from corowne/lorekeeper
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: calendar for prompts/news/sales
- Loading branch information
1 parent
5cd820c
commit 36dcdd7
Showing
6 changed files
with
159 additions
and
0 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
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,46 @@ | ||
@extends('world.layout') | ||
|
||
@section('title') | ||
Calendar | ||
@endsection | ||
|
||
@section('sidebar') | ||
<ul> | ||
<li class="sidebar-header"><a href="{{ url('/calendar') }}" class="card-link">Calendar</a></li> | ||
<li class="sidebar-section"> | ||
<div class="sidebar-section-header">Items</div> | ||
<div class="sidebar-item"><a href="{{ url('prompts') }}" class="{{ set_active('prompts') }}">Prompts</a></div> | ||
<div class="sidebar-item"><a href="{{ url('news') }}" class="{{ set_active('news') }}">News</a></div> | ||
<div class="sidebar-item"><a href="{{ url('sales') }}" class="{{ set_active('sales') }}">Sales</a></div> | ||
</li> | ||
</ul> | ||
@endsection | ||
|
||
@section('content') | ||
{!! breadcrumbs(['World' => 'world', 'Calendar' => 'world/calendar']) !!} | ||
<h1>Calendar</h1> | ||
|
||
<div id='calendar'></div> | ||
|
||
<script src="{{ asset('js/calendar.min.js') }}"></script> | ||
<script> | ||
document.addEventListener('DOMContentLoaded', function() { | ||
const calendarEl = document.getElementById('calendar') | ||
const calendar = new FullCalendar.Calendar(calendarEl, { | ||
initialView: 'dayGridMonth', | ||
lazyFetching: true, | ||
timeZone: "{{ config('app.timezone') }}", | ||
headerToolbar: { | ||
left: 'prev,next', | ||
center: 'title', | ||
right: 'dayGridMonth multiMonthYear listWeek', | ||
}, | ||
eventSources: [{ | ||
url: "{{ url('calendar/events') }}", | ||
format: 'json', | ||
}] | ||
}) | ||
calendar.render() | ||
}) | ||
</script> | ||
@endsection |
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