Nenhuma descrição

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../packages/core/main.css' rel='stylesheet' />
  6. <link href='../packages/daygrid/main.css' rel='stylesheet' />
  7. <link href='../packages/timegrid/main.css' rel='stylesheet' />
  8. <link href='../packages/list/main.css' rel='stylesheet' />
  9. <script src='../packages/core/main.js'></script>
  10. <script src='../packages/interaction/main.js'></script>
  11. <script src='../packages/daygrid/main.js'></script>
  12. <script src='../packages/timegrid/main.js'></script>
  13. <script src='../packages/list/main.js'></script>
  14. <script>
  15. document.addEventListener('DOMContentLoaded', function() {
  16. var calendarEl = document.getElementById('calendar');
  17. var calendar = new FullCalendar.Calendar(calendarEl, {
  18. plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
  19. header: {
  20. left: 'prev,next today',
  21. center: 'title',
  22. right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
  23. },
  24. defaultDate: '2019-08-12',
  25. editable: true,
  26. navLinks: true, // can click day/week names to navigate views
  27. eventLimit: true, // allow "more" link when too many events
  28. events: {
  29. url: 'php/get-events.php',
  30. failure: function() {
  31. document.getElementById('script-warning').style.display = 'block'
  32. }
  33. },
  34. loading: function(bool) {
  35. document.getElementById('loading').style.display =
  36. bool ? 'block' : 'none';
  37. }
  38. });
  39. calendar.render();
  40. });
  41. </script>
  42. <style>
  43. body {
  44. margin: 0;
  45. padding: 0;
  46. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  47. font-size: 14px;
  48. }
  49. #script-warning {
  50. display: none;
  51. background: #eee;
  52. border-bottom: 1px solid #ddd;
  53. padding: 0 10px;
  54. line-height: 40px;
  55. text-align: center;
  56. font-weight: bold;
  57. font-size: 12px;
  58. color: red;
  59. }
  60. #loading {
  61. display: none;
  62. position: absolute;
  63. top: 10px;
  64. right: 10px;
  65. }
  66. #calendar {
  67. max-width: 900px;
  68. margin: 40px auto;
  69. padding: 0 10px;
  70. }
  71. </style>
  72. </head>
  73. <body>
  74. <div id='script-warning'>
  75. <code>php/get-events.php</code> must be running.
  76. </div>
  77. <div id='loading'>loading...</div>
  78. <div id='calendar'></div>
  79. </body>
  80. </html>