json.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../fullcalendar.min.css' rel='stylesheet' />
  6. <link href='../fullcalendar.print.min.css' rel='stylesheet' media='print' />
  7. <script src='../lib/moment.min.js'></script>
  8. <script src='../lib/jquery.min.js'></script>
  9. <script src='../fullcalendar.min.js'></script>
  10. <script>
  11. $(document).ready(function() {
  12. $('#calendar').fullCalendar({
  13. header: {
  14. left: 'prev,next today',
  15. center: 'title',
  16. right: 'month,agendaWeek,agendaDay,listWeek'
  17. },
  18. defaultDate: '2020-05-12',
  19. editable: true,
  20. navLinks: true, // can click day/week names to navigate views
  21. eventLimit: true, // allow "more" link when too many events
  22. events: {
  23. url: 'php/get-events.php',
  24. error: function() {
  25. $('#script-warning').show();
  26. }
  27. },
  28. loading: function(bool) {
  29. $('#loading').toggle(bool);
  30. }
  31. });
  32. });
  33. </script>
  34. <style>
  35. body {
  36. margin: 0;
  37. padding: 0;
  38. font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  39. font-size: 14px;
  40. }
  41. #script-warning {
  42. display: none;
  43. background: #eee;
  44. border-bottom: 1px solid #ddd;
  45. padding: 0 10px;
  46. line-height: 40px;
  47. text-align: center;
  48. font-weight: bold;
  49. font-size: 12px;
  50. color: red;
  51. }
  52. #loading {
  53. display: none;
  54. position: absolute;
  55. top: 10px;
  56. right: 10px;
  57. }
  58. #calendar {
  59. max-width: 900px;
  60. margin: 40px auto;
  61. padding: 0 10px;
  62. }
  63. </style>
  64. </head>
  65. <body>
  66. <div id='script-warning'>
  67. <code>php/get-events.php</code> must be running.
  68. </div>
  69. <div id='loading'>loading...</div>
  70. <div id='calendar'></div>
  71. </body>
  72. </html>