theming.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='https://use.fontawesome.com/releases/v5.0.6/css/all.css' rel='stylesheet'>
  6. <link href='../lib/main.css' rel='stylesheet' />
  7. <script src='../lib/main.js'></script>
  8. <script src='js/theme-chooser.js'></script>
  9. <script>
  10. document.addEventListener('DOMContentLoaded', function() {
  11. var calendarEl = document.getElementById('calendar');
  12. var calendar;
  13. initThemeChooser({
  14. init: function(themeSystem) {
  15. calendar = new FullCalendar.Calendar(calendarEl, {
  16. themeSystem: themeSystem,
  17. headerToolbar: {
  18. left: 'prev,next today',
  19. center: 'title',
  20. right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
  21. },
  22. initialDate: '2020-06-12',
  23. weekNumbers: true,
  24. navLinks: true, // can click day/week names to navigate views
  25. editable: true,
  26. selectable: true,
  27. nowIndicator: true,
  28. dayMaxEvents: true, // allow "more" link when too many events
  29. // showNonCurrentDates: false,
  30. events: [
  31. {
  32. title: 'All Day Event',
  33. start: '2020-06-01'
  34. },
  35. {
  36. title: 'Long Event',
  37. start: '2020-06-07',
  38. end: '2020-06-10'
  39. },
  40. {
  41. groupId: 999,
  42. title: 'Repeating Event',
  43. start: '2020-06-09T16:00:00'
  44. },
  45. {
  46. groupId: 999,
  47. title: 'Repeating Event',
  48. start: '2020-06-16T16:00:00'
  49. },
  50. {
  51. title: 'Conference',
  52. start: '2020-06-11',
  53. end: '2020-06-13'
  54. },
  55. {
  56. title: 'Meeting',
  57. start: '2020-06-12T10:30:00',
  58. end: '2020-06-12T12:30:00'
  59. },
  60. {
  61. title: 'Lunch',
  62. start: '2020-06-12T12:00:00'
  63. },
  64. {
  65. title: 'Meeting',
  66. start: '2020-06-12T14:30:00'
  67. },
  68. {
  69. title: 'Happy Hour',
  70. start: '2020-06-12T17:30:00'
  71. },
  72. {
  73. title: 'Dinner',
  74. start: '2020-06-12T20:00:00'
  75. },
  76. {
  77. title: 'Birthday Party',
  78. start: '2020-06-13T07:00:00'
  79. },
  80. {
  81. title: 'Click for Google',
  82. url: 'http://google.com/',
  83. start: '2020-06-28'
  84. }
  85. ]
  86. });
  87. calendar.render();
  88. },
  89. change: function(themeSystem) {
  90. calendar.setOption('themeSystem', themeSystem);
  91. }
  92. });
  93. });
  94. </script>
  95. <style>
  96. body {
  97. margin: 0;
  98. padding: 0;
  99. font-size: 14px;
  100. }
  101. #top,
  102. #calendar.fc-theme-standard {
  103. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  104. }
  105. #calendar.fc-theme-bootstrap {
  106. font-size: 14px;
  107. }
  108. #top {
  109. background: #eee;
  110. border-bottom: 1px solid #ddd;
  111. padding: 0 10px;
  112. line-height: 40px;
  113. font-size: 12px;
  114. color: #000;
  115. }
  116. #top .selector {
  117. display: inline-block;
  118. margin-right: 10px;
  119. }
  120. #top select {
  121. font: inherit; /* mock what Boostrap does, don't compete */
  122. }
  123. .left { float: left }
  124. .right { float: right }
  125. .clear { clear: both }
  126. #calendar {
  127. max-width: 1100px;
  128. margin: 40px auto;
  129. padding: 0 10px;
  130. }
  131. </style>
  132. </head>
  133. <body>
  134. <div id='top'>
  135. <div class='left'>
  136. <div id='theme-system-selector' class='selector'>
  137. Theme System:
  138. <select>
  139. <option value='bootstrap' selected>Bootstrap 4</option>
  140. <option value='standard'>unthemed</option>
  141. </select>
  142. </div>
  143. <div data-theme-system="bootstrap" class='selector' style='display:none'>
  144. Theme Name:
  145. <select>
  146. <option value='' selected>Default</option>
  147. <option value='cerulean'>Cerulean</option>
  148. <option value='cosmo'>Cosmo</option>
  149. <option value='cyborg'>Cyborg</option>
  150. <option value='darkly'>Darkly</option>
  151. <option value='flatly'>Flatly</option>
  152. <option value='journal'>Journal</option>
  153. <option value='litera'>Litera</option>
  154. <option value='lumen'>Lumen</option>
  155. <option value='lux'>Lux</option>
  156. <option value='materia'>Materia</option>
  157. <option value='minty'>Minty</option>
  158. <option value='pulse'>Pulse</option>
  159. <option value='sandstone'>Sandstone</option>
  160. <option value='simplex'>Simplex</option>
  161. <option value='sketchy'>Sketchy</option>
  162. <option value='slate'>Slate</option>
  163. <option value='solar'>Solar</option>
  164. <option value='spacelab'>Spacelab</option>
  165. <option value='superhero'>Superhero</option>
  166. <option value='united'>United</option>
  167. <option value='yeti'>Yeti</option>
  168. </select>
  169. </div>
  170. <span id='loading' style='display:none'>loading theme...</span>
  171. </div>
  172. <div class='right'>
  173. <span class='credits' data-credit-id='bootstrap-standard' style='display:none'>
  174. <a href='https://getbootstrap.com/docs/3.3/' target='_blank'>Theme by Bootstrap</a>
  175. </span>
  176. <span class='credits' data-credit-id='bootstrap-custom' style='display:none'>
  177. <a href='https://bootswatch.com/' target='_blank'>Theme by Bootswatch</a>
  178. </span>
  179. </div>
  180. <div class='clear'></div>
  181. </div>
  182. <div id='calendar'></div>
  183. </body>
  184. </html>