theming.html 5.7 KB

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