Ingen beskrivning

theming.html 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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/core/main.css' rel='stylesheet' />
  7. <link href='../packages/bootstrap/main.css' rel='stylesheet' />
  8. <link href='../packages/timegrid/main.css' rel='stylesheet' />
  9. <link href='../packages/daygrid/main.css' rel='stylesheet' />
  10. <link href='../packages/list/main.css' rel='stylesheet' />
  11. <script src='../packages/core/main.js'></script>
  12. <script src='../packages/interaction/main.js'></script>
  13. <script src='../packages/bootstrap/main.js'></script>
  14. <script src='../packages/daygrid/main.js'></script>
  15. <script src='../packages/timegrid/main.js'></script>
  16. <script src='../packages/list/main.js'></script>
  17. <script src='js/theme-chooser.js'></script>
  18. <script>
  19. document.addEventListener('DOMContentLoaded', function() {
  20. var calendarEl = document.getElementById('calendar');
  21. var calendar;
  22. initThemeChooser({
  23. init: function(themeSystem) {
  24. calendar = new FullCalendar.Calendar(calendarEl, {
  25. plugins: [ 'bootstrap', 'interaction', 'dayGrid', 'timeGrid', 'list' ],
  26. themeSystem: themeSystem,
  27. header: {
  28. left: 'prev,next today',
  29. center: 'title',
  30. right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
  31. },
  32. defaultDate: '2019-08-12',
  33. weekNumbers: true,
  34. navLinks: true, // can click day/week names to navigate views
  35. editable: true,
  36. eventLimit: true, // allow "more" link when too many events
  37. events: [
  38. {
  39. title: 'All Day Event',
  40. start: '2019-08-01'
  41. },
  42. {
  43. title: 'Long Event',
  44. start: '2019-08-07',
  45. end: '2019-08-10'
  46. },
  47. {
  48. groupId: 999,
  49. title: 'Repeating Event',
  50. start: '2019-08-09T16:00:00'
  51. },
  52. {
  53. groupId: 999,
  54. title: 'Repeating Event',
  55. start: '2019-08-16T16:00:00'
  56. },
  57. {
  58. title: 'Conference',
  59. start: '2019-08-11',
  60. end: '2019-08-13'
  61. },
  62. {
  63. title: 'Meeting',
  64. start: '2019-08-12T10:30:00',
  65. end: '2019-08-12T12:30:00'
  66. },
  67. {
  68. title: 'Lunch',
  69. start: '2019-08-12T12:00:00'
  70. },
  71. {
  72. title: 'Meeting',
  73. start: '2019-08-12T14:30:00'
  74. },
  75. {
  76. title: 'Happy Hour',
  77. start: '2019-08-12T17:30:00'
  78. },
  79. {
  80. title: 'Dinner',
  81. start: '2019-08-12T20:00:00'
  82. },
  83. {
  84. title: 'Birthday Party',
  85. start: '2019-08-13T07:00:00'
  86. },
  87. {
  88. title: 'Click for Google',
  89. url: 'http://google.com/',
  90. start: '2019-08-28'
  91. }
  92. ]
  93. });
  94. calendar.render();
  95. },
  96. change: function(themeSystem) {
  97. calendar.setOption('themeSystem', themeSystem);
  98. }
  99. });
  100. });
  101. </script>
  102. <style>
  103. body {
  104. margin: 0;
  105. padding: 0;
  106. font-size: 14px;
  107. }
  108. #top,
  109. #calendar.fc-unthemed {
  110. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  111. }
  112. #top {
  113. background: #eee;
  114. border-bottom: 1px solid #ddd;
  115. padding: 0 10px;
  116. line-height: 40px;
  117. font-size: 12px;
  118. color: #000;
  119. }
  120. #top .selector {
  121. display: inline-block;
  122. margin-right: 10px;
  123. }
  124. #top select {
  125. font: inherit; /* mock what Boostrap does, don't compete */
  126. }
  127. .left { float: left }
  128. .right { float: right }
  129. .clear { clear: both }
  130. #calendar {
  131. max-width: 900px;
  132. margin: 40px auto;
  133. padding: 0 10px;
  134. }
  135. </style>
  136. </head>
  137. <body>
  138. <div id='top'>
  139. <div class='left'>
  140. <div id='theme-system-selector' class='selector'>
  141. Theme System:
  142. <select>
  143. <option value='bootstrap' selected>Bootstrap 4</option>
  144. <option value='standard'>unthemed</option>
  145. </select>
  146. </div>
  147. <div data-theme-system="bootstrap" 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>