theming.html 5.3 KB

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