stylish 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (458) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -10
  3. data/ARCHITECTURE.md +96 -0
  4. data/Gemfile +8 -0
  5. data/README.md +25 -29
  6. data/Rakefile +24 -0
  7. data/bin/stylish +33 -0
  8. data/lib/stylish.rb +36 -1
  9. data/lib/stylish/configuration.rb +37 -0
  10. data/lib/stylish/core_ext.rb +20 -0
  11. data/lib/stylish/developer.rb +13 -0
  12. data/lib/stylish/developer/config.rb +19 -0
  13. data/lib/stylish/developer/environment.rb +75 -0
  14. data/lib/stylish/developer/listing.rb +85 -0
  15. data/lib/stylish/developer/model_delegator.rb +51 -0
  16. data/lib/stylish/developer/modification.rb +139 -0
  17. data/lib/stylish/developer/path.rb +168 -0
  18. data/lib/stylish/developer/route.rb +97 -0
  19. data/lib/stylish/developer/server.rb +40 -0
  20. data/lib/stylish/engine.rb +12 -0
  21. data/lib/stylish/fs.rb +59 -0
  22. data/lib/stylish/manifest.rb +100 -0
  23. data/lib/stylish/models.rb +119 -0
  24. data/lib/stylish/models/component.rb +19 -0
  25. data/lib/stylish/models/layout.rb +19 -0
  26. data/lib/stylish/models/library.rb +134 -0
  27. data/lib/stylish/models/package.rb +156 -0
  28. data/lib/stylish/models/script.rb +10 -0
  29. data/lib/stylish/models/stylesheet.rb +9 -0
  30. data/lib/stylish/models/template.rb +9 -0
  31. data/lib/stylish/models/theme.rb +8 -0
  32. data/lib/stylish/util.rb +20 -0
  33. data/lib/stylish/version.rb +1 -1
  34. data/library/config.json +4 -0
  35. data/library/second-theme/manifest.json +8 -0
  36. data/library/second-theme/manifest.yml +6 -0
  37. data/library/second-theme/templates/footers/footer-01.html +3 -0
  38. data/library/second-theme/templates/footers/footer-02.html +3 -0
  39. data/library/second-theme/templates/headers/header-01.html +3 -0
  40. data/library/second-theme/templates/headers/header-02.html +3 -0
  41. data/library/second-theme/templates/landing-page-blocks/landing-page-block-01.html +3 -0
  42. data/library/second-theme/templates/landing-page-blocks/landing-page-block-02.html +3 -0
  43. data/library/test-theme/components/footers/footer-01.json +5 -0
  44. data/library/test-theme/components/footers/footer-02.json +5 -0
  45. data/library/test-theme/components/headers/header-01.json +5 -0
  46. data/library/test-theme/components/headers/header-02.json +5 -0
  47. data/library/test-theme/components/landing-page-blocks/landing-page-01.json +5 -0
  48. data/library/test-theme/components/landing-page-blocks/landing-page-02.json +5 -0
  49. data/library/test-theme/manifest.json +8 -0
  50. data/library/test-theme/manifest.yml +6 -0
  51. data/library/test-theme/pages/page-01.json +11 -0
  52. data/library/test-theme/templates/footers/footer-01.html +3 -0
  53. data/library/test-theme/templates/footers/footer-02.html +3 -0
  54. data/library/test-theme/templates/headers/header-01.html +3 -0
  55. data/library/test-theme/templates/headers/header-02.html +3 -0
  56. data/library/test-theme/templates/landing-page-blocks/landing-page-block-01.html +3 -0
  57. data/library/test-theme/templates/landing-page-blocks/landing-page-block-02.html +3 -0
  58. data/library/test-theme/templates/layouts/standard-layout.html +10 -0
  59. data/spec/acceptance/listing_assets_spec.rb +20 -0
  60. data/spec/acceptance/model_browsing_spec.rb +21 -0
  61. data/spec/acceptance/model_creation_spec.rb +16 -0
  62. data/spec/acceptance/model_deleting_spec.rb +10 -0
  63. data/spec/acceptance/model_updating_spec.rb +12 -0
  64. data/spec/acceptance/modifying_assets_spec.rb +50 -0
  65. data/spec/acceptance/server_info_spec.rb +10 -0
  66. data/spec/dummy/README.rdoc +28 -0
  67. data/spec/dummy/Rakefile +6 -0
  68. data/spec/dummy/app/assets/images/.keep +0 -0
  69. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  70. data/spec/dummy/app/assets/javascripts/test.coffee +4 -0
  71. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  72. data/spec/dummy/app/assets/stylesheets/test.css.scss +6 -0
  73. data/spec/dummy/app/assets/stylesheets/writable/existing.scss.css +0 -0
  74. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  75. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  76. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  77. data/spec/dummy/app/mailers/.keep +0 -0
  78. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  79. data/spec/dummy/bin/bundle +3 -0
  80. data/spec/dummy/bin/rails +4 -0
  81. data/spec/dummy/bin/rake +4 -0
  82. data/spec/dummy/config.ru +4 -0
  83. data/spec/dummy/config/application.rb +30 -0
  84. data/spec/dummy/config/boot.rb +5 -0
  85. data/spec/dummy/config/database.yml +25 -0
  86. data/spec/dummy/config/environment.rb +5 -0
  87. data/spec/dummy/config/environments/development.rb +37 -0
  88. data/spec/dummy/config/environments/production.rb +82 -0
  89. data/spec/dummy/config/environments/test.rb +39 -0
  90. data/spec/dummy/config/initializers/assets.rb +8 -0
  91. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  92. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  93. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  94. data/spec/dummy/config/initializers/inflections.rb +16 -0
  95. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  96. data/spec/dummy/config/initializers/session_store.rb +3 -0
  97. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  98. data/spec/dummy/config/locales/en.yml +23 -0
  99. data/spec/dummy/config/routes.rb +3 -0
  100. data/spec/dummy/config/secrets.yml +22 -0
  101. data/spec/dummy/db/migrate/20140822065900_create_books.rb +11 -0
  102. data/spec/dummy/db/migrate/20140822065916_create_authors.rb +9 -0
  103. data/spec/dummy/db/migrate/20140824215902_create_users.rb +10 -0
  104. data/spec/dummy/db/migrate/20140826193259_create_libraries.rb +10 -0
  105. data/spec/dummy/db/schema.rb +37 -0
  106. data/spec/dummy/db/test.sqlite3 +0 -0
  107. data/spec/dummy/lib/assets/.keep +0 -0
  108. data/spec/dummy/log/.keep +0 -0
  109. data/spec/dummy/public/404.html +67 -0
  110. data/spec/dummy/public/422.html +67 -0
  111. data/spec/dummy/public/500.html +66 -0
  112. data/spec/dummy/public/favicon.ico +0 -0
  113. data/spec/fixtures/config.json +3 -0
  114. data/spec/fixtures/test-theme/components/footers/footer-01.json +5 -0
  115. data/spec/fixtures/test-theme/components/footers/footer-02.json +5 -0
  116. data/spec/fixtures/test-theme/components/headers/header-01.json +5 -0
  117. data/spec/fixtures/test-theme/components/headers/header-02.json +5 -0
  118. data/spec/fixtures/test-theme/components/landing-page-blocks/landing-page-01.json +5 -0
  119. data/spec/fixtures/test-theme/components/landing-page-blocks/landing-page-02.json +5 -0
  120. data/spec/fixtures/test-theme/manifest.json +8 -0
  121. data/spec/fixtures/test-theme/manifest.yml +6 -0
  122. data/spec/fixtures/test-theme/pages/page-01.json +11 -0
  123. data/spec/fixtures/test-theme/templates/footers/footer-01.html +3 -0
  124. data/spec/fixtures/test-theme/templates/footers/footer-02.html +3 -0
  125. data/spec/fixtures/test-theme/templates/headers/header-01.html +3 -0
  126. data/spec/fixtures/test-theme/templates/headers/header-02.html +3 -0
  127. data/spec/fixtures/test-theme/templates/landing-page-blocks/landing-page-block-01.html +3 -0
  128. data/spec/fixtures/test-theme/templates/landing-page-blocks/landing-page-block-02.html +3 -0
  129. data/spec/fixtures/test-theme/templates/layouts/standard-01.html +9 -0
  130. data/spec/lib/stylish/configuration_spec.rb +8 -0
  131. data/spec/lib/stylish/developer/path_spec.rb +36 -0
  132. data/spec/lib/stylish/developer/route_spec.rb +5 -0
  133. data/spec/lib/stylish/manifest_spec.rb +48 -0
  134. data/spec/lib/stylish/models/library_spec.rb +38 -0
  135. data/spec/lib/stylish/models/package_spec.rb +35 -0
  136. data/spec/lib/stylish/models_spec.rb +12 -0
  137. data/spec/spec_helper.rb +38 -0
  138. data/spec/support/json_helper.rb +7 -0
  139. data/spec/test.css.scss +6 -0
  140. data/stylish.gemspec +17 -2
  141. data/support/editor-app/.gitignore +2 -0
  142. data/support/editor-app/development/bower.json +9 -0
  143. data/support/editor-app/development/package.json +28 -0
  144. data/support/editor-app/development/semantic/components/accordion.css +257 -0
  145. data/support/editor-app/development/semantic/components/accordion.js +558 -0
  146. data/support/editor-app/development/semantic/components/accordion.min.css +11 -0
  147. data/support/editor-app/development/semantic/components/accordion.min.js +11 -0
  148. data/support/editor-app/development/semantic/components/ad.css +277 -0
  149. data/support/editor-app/development/semantic/components/ad.min.css +11 -0
  150. data/support/editor-app/development/semantic/components/api.js +851 -0
  151. data/support/editor-app/development/semantic/components/api.min.js +11 -0
  152. data/support/editor-app/development/semantic/components/breadcrumb.css +125 -0
  153. data/support/editor-app/development/semantic/components/breadcrumb.min.css +11 -0
  154. data/support/editor-app/development/semantic/components/button.css +2391 -0
  155. data/support/editor-app/development/semantic/components/button.min.css +11 -0
  156. data/support/editor-app/development/semantic/components/card.css +758 -0
  157. data/support/editor-app/development/semantic/components/card.min.css +11 -0
  158. data/support/editor-app/development/semantic/components/checkbox.css +514 -0
  159. data/support/editor-app/development/semantic/components/checkbox.js +507 -0
  160. data/support/editor-app/development/semantic/components/checkbox.min.css +11 -0
  161. data/support/editor-app/development/semantic/components/checkbox.min.js +11 -0
  162. data/support/editor-app/development/semantic/components/comment.css +260 -0
  163. data/support/editor-app/development/semantic/components/comment.min.css +11 -0
  164. data/support/editor-app/development/semantic/components/dimmer.css +187 -0
  165. data/support/editor-app/development/semantic/components/dimmer.js +627 -0
  166. data/support/editor-app/development/semantic/components/dimmer.min.css +11 -0
  167. data/support/editor-app/development/semantic/components/dimmer.min.js +11 -0
  168. data/support/editor-app/development/semantic/components/divider.css +244 -0
  169. data/support/editor-app/development/semantic/components/divider.min.css +11 -0
  170. data/support/editor-app/development/semantic/components/dropdown.css +1085 -0
  171. data/support/editor-app/development/semantic/components/dropdown.js +1757 -0
  172. data/support/editor-app/development/semantic/components/dropdown.min.css +11 -0
  173. data/support/editor-app/development/semantic/components/dropdown.min.js +11 -0
  174. data/support/editor-app/development/semantic/components/feed.css +277 -0
  175. data/support/editor-app/development/semantic/components/feed.min.css +11 -0
  176. data/support/editor-app/development/semantic/components/flag.css +1017 -0
  177. data/support/editor-app/development/semantic/components/flag.min.css +11 -0
  178. data/support/editor-app/development/semantic/components/form.css +875 -0
  179. data/support/editor-app/development/semantic/components/form.js +1039 -0
  180. data/support/editor-app/development/semantic/components/form.min.css +11 -0
  181. data/support/editor-app/development/semantic/components/form.min.js +11 -0
  182. data/support/editor-app/development/semantic/components/grid.css +1816 -0
  183. data/support/editor-app/development/semantic/components/grid.min.css +11 -0
  184. data/support/editor-app/development/semantic/components/header.css +572 -0
  185. data/support/editor-app/development/semantic/components/header.min.css +11 -0
  186. data/support/editor-app/development/semantic/components/icon.css +2127 -0
  187. data/support/editor-app/development/semantic/components/icon.min.css +11 -0
  188. data/support/editor-app/development/semantic/components/image.css +275 -0
  189. data/support/editor-app/development/semantic/components/image.min.css +11 -0
  190. data/support/editor-app/development/semantic/components/input.css +455 -0
  191. data/support/editor-app/development/semantic/components/input.min.css +11 -0
  192. data/support/editor-app/development/semantic/components/item.css +458 -0
  193. data/support/editor-app/development/semantic/components/item.min.css +11 -0
  194. data/support/editor-app/development/semantic/components/label.css +930 -0
  195. data/support/editor-app/development/semantic/components/label.min.css +11 -0
  196. data/support/editor-app/development/semantic/components/list.css +879 -0
  197. data/support/editor-app/development/semantic/components/list.min.css +11 -0
  198. data/support/editor-app/development/semantic/components/loader.css +279 -0
  199. data/support/editor-app/development/semantic/components/loader.min.css +11 -0
  200. data/support/editor-app/development/semantic/components/menu.css +1596 -0
  201. data/support/editor-app/development/semantic/components/menu.min.css +11 -0
  202. data/support/editor-app/development/semantic/components/message.css +422 -0
  203. data/support/editor-app/development/semantic/components/message.min.css +11 -0
  204. data/support/editor-app/development/semantic/components/modal.css +431 -0
  205. data/support/editor-app/development/semantic/components/modal.js +860 -0
  206. data/support/editor-app/development/semantic/components/modal.min.css +11 -0
  207. data/support/editor-app/development/semantic/components/modal.min.js +11 -0
  208. data/support/editor-app/development/semantic/components/nag.css +149 -0
  209. data/support/editor-app/development/semantic/components/nag.js +477 -0
  210. data/support/editor-app/development/semantic/components/nag.min.css +11 -0
  211. data/support/editor-app/development/semantic/components/nag.min.js +11 -0
  212. data/support/editor-app/development/semantic/components/popup.css +294 -0
  213. data/support/editor-app/development/semantic/components/popup.js +1187 -0
  214. data/support/editor-app/development/semantic/components/popup.min.css +11 -0
  215. data/support/editor-app/development/semantic/components/popup.min.js +11 -0
  216. data/support/editor-app/development/semantic/components/progress.css +449 -0
  217. data/support/editor-app/development/semantic/components/progress.js +785 -0
  218. data/support/editor-app/development/semantic/components/progress.min.css +11 -0
  219. data/support/editor-app/development/semantic/components/progress.min.js +11 -0
  220. data/support/editor-app/development/semantic/components/rail.css +125 -0
  221. data/support/editor-app/development/semantic/components/rail.min.css +11 -0
  222. data/support/editor-app/development/semantic/components/rating.css +262 -0
  223. data/support/editor-app/development/semantic/components/rating.js +451 -0
  224. data/support/editor-app/development/semantic/components/rating.min.css +11 -0
  225. data/support/editor-app/development/semantic/components/rating.min.js +11 -0
  226. data/support/editor-app/development/semantic/components/reset.css +430 -0
  227. data/support/editor-app/development/semantic/components/reset.min.css +11 -0
  228. data/support/editor-app/development/semantic/components/reveal.css +294 -0
  229. data/support/editor-app/development/semantic/components/reveal.min.css +11 -0
  230. data/support/editor-app/development/semantic/components/search.css +330 -0
  231. data/support/editor-app/development/semantic/components/search.js +1055 -0
  232. data/support/editor-app/development/semantic/components/search.min.css +11 -0
  233. data/support/editor-app/development/semantic/components/search.min.js +11 -0
  234. data/support/editor-app/development/semantic/components/segment.css +590 -0
  235. data/support/editor-app/development/semantic/components/segment.min.css +11 -0
  236. data/support/editor-app/development/semantic/components/shape.css +155 -0
  237. data/support/editor-app/development/semantic/components/shape.js +830 -0
  238. data/support/editor-app/development/semantic/components/shape.min.css +11 -0
  239. data/support/editor-app/development/semantic/components/shape.min.js +11 -0
  240. data/support/editor-app/development/semantic/components/sidebar.css +621 -0
  241. data/support/editor-app/development/semantic/components/sidebar.js +1084 -0
  242. data/support/editor-app/development/semantic/components/sidebar.min.css +11 -0
  243. data/support/editor-app/development/semantic/components/sidebar.min.js +11 -0
  244. data/support/editor-app/development/semantic/components/site.css +147 -0
  245. data/support/editor-app/development/semantic/components/site.js +487 -0
  246. data/support/editor-app/development/semantic/components/site.min.css +11 -0
  247. data/support/editor-app/development/semantic/components/site.min.js +11 -0
  248. data/support/editor-app/development/semantic/components/state.js +690 -0
  249. data/support/editor-app/development/semantic/components/state.min.js +11 -0
  250. data/support/editor-app/development/semantic/components/statistic.css +410 -0
  251. data/support/editor-app/development/semantic/components/statistic.min.css +11 -0
  252. data/support/editor-app/development/semantic/components/step.css +433 -0
  253. data/support/editor-app/development/semantic/components/step.min.css +11 -0
  254. data/support/editor-app/development/semantic/components/sticky.css +80 -0
  255. data/support/editor-app/development/semantic/components/sticky.js +775 -0
  256. data/support/editor-app/development/semantic/components/sticky.min.css +11 -0
  257. data/support/editor-app/development/semantic/components/sticky.min.js +11 -0
  258. data/support/editor-app/development/semantic/components/tab.css +93 -0
  259. data/support/editor-app/development/semantic/components/tab.js +787 -0
  260. data/support/editor-app/development/semantic/components/tab.min.css +11 -0
  261. data/support/editor-app/development/semantic/components/tab.min.js +11 -0
  262. data/support/editor-app/development/semantic/components/table.css +999 -0
  263. data/support/editor-app/development/semantic/components/table.min.css +11 -0
  264. data/support/editor-app/development/semantic/components/transition.css +2152 -0
  265. data/support/editor-app/development/semantic/components/transition.js +936 -0
  266. data/support/editor-app/development/semantic/components/transition.min.css +11 -0
  267. data/support/editor-app/development/semantic/components/transition.min.js +11 -0
  268. data/support/editor-app/development/semantic/components/video.css +126 -0
  269. data/support/editor-app/development/semantic/components/video.js +540 -0
  270. data/support/editor-app/development/semantic/components/video.min.css +11 -0
  271. data/support/editor-app/development/semantic/components/video.min.js +11 -0
  272. data/support/editor-app/development/semantic/components/visibility.js +970 -0
  273. data/support/editor-app/development/semantic/components/visibility.min.js +11 -0
  274. data/support/editor-app/development/semantic/semantic.css +31768 -0
  275. data/support/editor-app/development/semantic/semantic.js +18317 -0
  276. data/support/editor-app/development/semantic/semantic.min.css +11 -0
  277. data/support/editor-app/development/semantic/semantic.min.js +17 -0
  278. data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.eot +0 -0
  279. data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.svg +450 -0
  280. data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.ttf +0 -0
  281. data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.woff +0 -0
  282. data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.eot +0 -0
  283. data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.otf +0 -0
  284. data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.svg +504 -0
  285. data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.ttf +0 -0
  286. data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.woff +0 -0
  287. data/support/editor-app/development/semantic/themes/default/assets/images/flags.png +0 -0
  288. data/support/editor-app/development/src/apis/index.coffee +35 -0
  289. data/support/editor-app/development/src/components/editor.cjsx +58 -0
  290. data/support/editor-app/development/src/components/editor_drawer.cjsx +7 -0
  291. data/support/editor-app/development/src/components/header.cjsx +12 -0
  292. data/support/editor-app/development/src/components/index.coffee +9 -0
  293. data/support/editor-app/development/src/components/menus/icon_grid.cjsx +0 -0
  294. data/support/editor-app/development/src/components/sidebar.cjsx +24 -0
  295. data/support/editor-app/development/src/components/tiled_grid.cjsx +35 -0
  296. data/support/editor-app/development/src/index.cjsx +82 -0
  297. data/support/editor-app/development/src/lib/util.coffee +48 -0
  298. data/support/editor-app/development/src/pages/home.cjsx +46 -0
  299. data/support/editor-app/development/src/pages/index.coffee +6 -0
  300. data/support/editor-app/development/src/pages/package_details.cjsx +55 -0
  301. data/support/editor-app/development/src/registry.coffee +35 -0
  302. data/support/editor-app/development/src/styles/components/tiled_grid.css.scss +5 -0
  303. data/support/editor-app/development/src/styles/index.css.scss +240 -0
  304. data/support/editor-app/development/src/sugar.cjsx +126 -0
  305. data/support/editor-app/development/webpack.config.js +53 -0
  306. data/support/editor-app/dist/base.css +0 -0
  307. data/support/editor-app/dist/toolit.js +62 -0
  308. data/support/editor-app/dist/toolkit.js +44573 -0
  309. data/support/editor-app/index.html +50 -0
  310. data/support/editor-app/package.json +15 -0
  311. data/support/editor-app/semantic/components/accordion.css +257 -0
  312. data/support/editor-app/semantic/components/accordion.js +558 -0
  313. data/support/editor-app/semantic/components/accordion.min.css +11 -0
  314. data/support/editor-app/semantic/components/accordion.min.js +11 -0
  315. data/support/editor-app/semantic/components/ad.css +277 -0
  316. data/support/editor-app/semantic/components/ad.min.css +11 -0
  317. data/support/editor-app/semantic/components/api.js +851 -0
  318. data/support/editor-app/semantic/components/api.min.js +11 -0
  319. data/support/editor-app/semantic/components/breadcrumb.css +125 -0
  320. data/support/editor-app/semantic/components/breadcrumb.min.css +11 -0
  321. data/support/editor-app/semantic/components/button.css +2391 -0
  322. data/support/editor-app/semantic/components/button.min.css +11 -0
  323. data/support/editor-app/semantic/components/card.css +758 -0
  324. data/support/editor-app/semantic/components/card.min.css +11 -0
  325. data/support/editor-app/semantic/components/checkbox.css +514 -0
  326. data/support/editor-app/semantic/components/checkbox.js +507 -0
  327. data/support/editor-app/semantic/components/checkbox.min.css +11 -0
  328. data/support/editor-app/semantic/components/checkbox.min.js +11 -0
  329. data/support/editor-app/semantic/components/comment.css +260 -0
  330. data/support/editor-app/semantic/components/comment.min.css +11 -0
  331. data/support/editor-app/semantic/components/dimmer.css +187 -0
  332. data/support/editor-app/semantic/components/dimmer.js +627 -0
  333. data/support/editor-app/semantic/components/dimmer.min.css +11 -0
  334. data/support/editor-app/semantic/components/dimmer.min.js +11 -0
  335. data/support/editor-app/semantic/components/divider.css +244 -0
  336. data/support/editor-app/semantic/components/divider.min.css +11 -0
  337. data/support/editor-app/semantic/components/dropdown.css +1085 -0
  338. data/support/editor-app/semantic/components/dropdown.js +1757 -0
  339. data/support/editor-app/semantic/components/dropdown.min.css +11 -0
  340. data/support/editor-app/semantic/components/dropdown.min.js +11 -0
  341. data/support/editor-app/semantic/components/feed.css +277 -0
  342. data/support/editor-app/semantic/components/feed.min.css +11 -0
  343. data/support/editor-app/semantic/components/flag.css +1017 -0
  344. data/support/editor-app/semantic/components/flag.min.css +11 -0
  345. data/support/editor-app/semantic/components/form.css +875 -0
  346. data/support/editor-app/semantic/components/form.js +1039 -0
  347. data/support/editor-app/semantic/components/form.min.css +11 -0
  348. data/support/editor-app/semantic/components/form.min.js +11 -0
  349. data/support/editor-app/semantic/components/grid.css +1816 -0
  350. data/support/editor-app/semantic/components/grid.min.css +11 -0
  351. data/support/editor-app/semantic/components/header.css +572 -0
  352. data/support/editor-app/semantic/components/header.min.css +11 -0
  353. data/support/editor-app/semantic/components/icon.css +2127 -0
  354. data/support/editor-app/semantic/components/icon.min.css +11 -0
  355. data/support/editor-app/semantic/components/image.css +275 -0
  356. data/support/editor-app/semantic/components/image.min.css +11 -0
  357. data/support/editor-app/semantic/components/input.css +455 -0
  358. data/support/editor-app/semantic/components/input.min.css +11 -0
  359. data/support/editor-app/semantic/components/item.css +458 -0
  360. data/support/editor-app/semantic/components/item.min.css +11 -0
  361. data/support/editor-app/semantic/components/label.css +930 -0
  362. data/support/editor-app/semantic/components/label.min.css +11 -0
  363. data/support/editor-app/semantic/components/list.css +879 -0
  364. data/support/editor-app/semantic/components/list.min.css +11 -0
  365. data/support/editor-app/semantic/components/loader.css +279 -0
  366. data/support/editor-app/semantic/components/loader.min.css +11 -0
  367. data/support/editor-app/semantic/components/menu.css +1596 -0
  368. data/support/editor-app/semantic/components/menu.min.css +11 -0
  369. data/support/editor-app/semantic/components/message.css +422 -0
  370. data/support/editor-app/semantic/components/message.min.css +11 -0
  371. data/support/editor-app/semantic/components/modal.css +431 -0
  372. data/support/editor-app/semantic/components/modal.js +860 -0
  373. data/support/editor-app/semantic/components/modal.min.css +11 -0
  374. data/support/editor-app/semantic/components/modal.min.js +11 -0
  375. data/support/editor-app/semantic/components/nag.css +149 -0
  376. data/support/editor-app/semantic/components/nag.js +477 -0
  377. data/support/editor-app/semantic/components/nag.min.css +11 -0
  378. data/support/editor-app/semantic/components/nag.min.js +11 -0
  379. data/support/editor-app/semantic/components/popup.css +294 -0
  380. data/support/editor-app/semantic/components/popup.js +1187 -0
  381. data/support/editor-app/semantic/components/popup.min.css +11 -0
  382. data/support/editor-app/semantic/components/popup.min.js +11 -0
  383. data/support/editor-app/semantic/components/progress.css +449 -0
  384. data/support/editor-app/semantic/components/progress.js +785 -0
  385. data/support/editor-app/semantic/components/progress.min.css +11 -0
  386. data/support/editor-app/semantic/components/progress.min.js +11 -0
  387. data/support/editor-app/semantic/components/rail.css +125 -0
  388. data/support/editor-app/semantic/components/rail.min.css +11 -0
  389. data/support/editor-app/semantic/components/rating.css +262 -0
  390. data/support/editor-app/semantic/components/rating.js +451 -0
  391. data/support/editor-app/semantic/components/rating.min.css +11 -0
  392. data/support/editor-app/semantic/components/rating.min.js +11 -0
  393. data/support/editor-app/semantic/components/reset.css +430 -0
  394. data/support/editor-app/semantic/components/reset.min.css +11 -0
  395. data/support/editor-app/semantic/components/reveal.css +294 -0
  396. data/support/editor-app/semantic/components/reveal.min.css +11 -0
  397. data/support/editor-app/semantic/components/search.css +330 -0
  398. data/support/editor-app/semantic/components/search.js +1055 -0
  399. data/support/editor-app/semantic/components/search.min.css +11 -0
  400. data/support/editor-app/semantic/components/search.min.js +11 -0
  401. data/support/editor-app/semantic/components/segment.css +590 -0
  402. data/support/editor-app/semantic/components/segment.min.css +11 -0
  403. data/support/editor-app/semantic/components/shape.css +155 -0
  404. data/support/editor-app/semantic/components/shape.js +830 -0
  405. data/support/editor-app/semantic/components/shape.min.css +11 -0
  406. data/support/editor-app/semantic/components/shape.min.js +11 -0
  407. data/support/editor-app/semantic/components/sidebar.css +621 -0
  408. data/support/editor-app/semantic/components/sidebar.js +1084 -0
  409. data/support/editor-app/semantic/components/sidebar.min.css +11 -0
  410. data/support/editor-app/semantic/components/sidebar.min.js +11 -0
  411. data/support/editor-app/semantic/components/site.css +147 -0
  412. data/support/editor-app/semantic/components/site.js +487 -0
  413. data/support/editor-app/semantic/components/site.min.css +11 -0
  414. data/support/editor-app/semantic/components/site.min.js +11 -0
  415. data/support/editor-app/semantic/components/state.js +690 -0
  416. data/support/editor-app/semantic/components/state.min.js +11 -0
  417. data/support/editor-app/semantic/components/statistic.css +410 -0
  418. data/support/editor-app/semantic/components/statistic.min.css +11 -0
  419. data/support/editor-app/semantic/components/step.css +433 -0
  420. data/support/editor-app/semantic/components/step.min.css +11 -0
  421. data/support/editor-app/semantic/components/sticky.css +80 -0
  422. data/support/editor-app/semantic/components/sticky.js +775 -0
  423. data/support/editor-app/semantic/components/sticky.min.css +11 -0
  424. data/support/editor-app/semantic/components/sticky.min.js +11 -0
  425. data/support/editor-app/semantic/components/tab.css +93 -0
  426. data/support/editor-app/semantic/components/tab.js +787 -0
  427. data/support/editor-app/semantic/components/tab.min.css +11 -0
  428. data/support/editor-app/semantic/components/tab.min.js +11 -0
  429. data/support/editor-app/semantic/components/table.css +999 -0
  430. data/support/editor-app/semantic/components/table.min.css +11 -0
  431. data/support/editor-app/semantic/components/transition.css +2152 -0
  432. data/support/editor-app/semantic/components/transition.js +936 -0
  433. data/support/editor-app/semantic/components/transition.min.css +11 -0
  434. data/support/editor-app/semantic/components/transition.min.js +11 -0
  435. data/support/editor-app/semantic/components/video.css +126 -0
  436. data/support/editor-app/semantic/components/video.js +540 -0
  437. data/support/editor-app/semantic/components/video.min.css +11 -0
  438. data/support/editor-app/semantic/components/video.min.js +11 -0
  439. data/support/editor-app/semantic/components/visibility.js +970 -0
  440. data/support/editor-app/semantic/components/visibility.min.js +11 -0
  441. data/support/editor-app/semantic/semantic.css +31768 -0
  442. data/support/editor-app/semantic/semantic.js +18317 -0
  443. data/support/editor-app/semantic/semantic.min.css +11 -0
  444. data/support/editor-app/semantic/semantic.min.js +17 -0
  445. data/support/editor-app/semantic/themes/basic/assets/fonts/icons.eot +0 -0
  446. data/support/editor-app/semantic/themes/basic/assets/fonts/icons.svg +450 -0
  447. data/support/editor-app/semantic/themes/basic/assets/fonts/icons.ttf +0 -0
  448. data/support/editor-app/semantic/themes/basic/assets/fonts/icons.woff +0 -0
  449. data/support/editor-app/semantic/themes/default/assets/fonts/icons.eot +0 -0
  450. data/support/editor-app/semantic/themes/default/assets/fonts/icons.otf +0 -0
  451. data/support/editor-app/semantic/themes/default/assets/fonts/icons.svg +504 -0
  452. data/support/editor-app/semantic/themes/default/assets/fonts/icons.ttf +0 -0
  453. data/support/editor-app/semantic/themes/default/assets/fonts/icons.woff +0 -0
  454. data/support/editor-app/semantic/themes/default/assets/images/flags.png +0 -0
  455. data/support/editor-app/vendor/jquery.js +8829 -0
  456. data/support/library-server/Gemfile +0 -0
  457. data/support/library-server/config.ru +4 -0
  458. metadata +740 -7
@@ -0,0 +1,11 @@
1
+ /*
2
+ * # Semantic UI - 1.8.1
3
+ * https://github.com/Semantic-Org/Semantic-UI
4
+ * http://www.semantic-ui.com/
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+ .ui.sidebar{position:fixed;top:0;left:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:none;transition:none;will-change:transform;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;-webkit-overflow-scrolling:touch;height:100%!important;border-radius:0!important;margin:0!important;overflow-y:auto!important;z-index:102}.ui.sidebar>*{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}.ui.left.sidebar{right:auto;left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.sidebar{right:0!important;left:auto!important;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.bottom.sidebar,.ui.top.sidebar{width:100%!important;height:auto!important;overflow-y:visible!important}.ui.top.sidebar{top:0!important;bottom:auto!important;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.sidebar{top:auto!important;bottom:0!important;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.pushable{height:100%;overflow-x:hidden;padding:0!important}.pushable:not(body){-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}body.pushable{background:#333!important}.pushable>.fixed{position:fixed;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease;will-change:transform;z-index:101}.pushable>.pusher{position:relative;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;min-height:100%;-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease;z-index:2}body.pushable>.pusher{background:#f7f7f7}.pushable>.pusher{background:inherit}.pushable>.pusher:after{position:fixed;top:0;right:0;content:'';background-color:rgba(0,0,0,.4);width:0;height:0;overflow:hidden;opacity:0;-webkit-transition:-webkit-transform 500ms,opacity 500ms;transition:transform 500ms,opacity 500ms;will-change:opacity;z-index:1000}.ui.sidebar.menu .item{border-radius:0!important}.pushable>.pusher.dimmed:after{width:100%!important;height:100%!important;opacity:1!important}.ui.animating.sidebar{visibility:visible}.ui.visible.sidebar{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.bottom.visible.sidebar,.ui.left.visible.sidebar,.ui.right.visible.sidebar,.ui.top.visible.sidebar{box-shadow:0 0 20px rgba(39,41,43,.15)}.ui.visible.left.sidebar~.fixed,.ui.visible.left.sidebar~.pusher{-webkit-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0)}.ui.visible.right.sidebar~.fixed,.ui.visible.right.sidebar~.pusher{-webkit-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}.ui.visible.top.sidebar~.fixed,.ui.visible.top.sidebar~.pusher{-webkit-transform:translate3d(0,36px,0);transform:translate3d(0,36px,0)}.ui.visible.bottom.sidebar~.fixed,.ui.visible.bottom.sidebar~.pusher{-webkit-transform:translate3d(0,-36px,0);transform:translate3d(0,-36px,0)}.ui.visible.left.sidebar~.ui.visible.right.sidebar~.fixed,.ui.visible.left.sidebar~.ui.visible.right.sidebar~.pusher,.ui.visible.right.sidebar~.ui.visible.left.sidebar~.fixed,.ui.visible.right.sidebar~.ui.visible.left.sidebar~.pusher{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html.ios{overflow-x:hidden;-webkit-overflow-scrolling:touch}.ui[class*="very thin"].left.sidebar,.ui[class*="very thin"].right.sidebar{width:60px}.ui.thin.left.sidebar,.ui.thin.right.sidebar{width:150px}.ui.left.sidebar,.ui.right.sidebar{width:260px}.ui.wide.left.sidebar,.ui.wide.right.sidebar{width:350px}.ui[class*="very wide"].left.sidebar,.ui[class*="very wide"].right.sidebar{width:475px}.ui.visible[class*="very thin"].left.sidebar~.fixed,.ui.visible[class*="very thin"].left.sidebar~.pusher{-webkit-transform:translate3d(60px,0,0);transform:translate3d(60px,0,0)}.ui.visible.thin.left.sidebar~.fixed,.ui.visible.thin.left.sidebar~.pusher{-webkit-transform:translate3d(150px,0,0);transform:translate3d(150px,0,0)}.ui.visible.wide.left.sidebar~.fixed,.ui.visible.wide.left.sidebar~.pusher{-webkit-transform:translate3d(350px,0,0);transform:translate3d(350px,0,0)}.ui.visible[class*="very wide"].left.sidebar~.fixed,.ui.visible[class*="very wide"].left.sidebar~.pusher{-webkit-transform:translate3d(475px,0,0);transform:translate3d(475px,0,0)}.ui.visible[class*="very thin"].right.sidebar~.fixed,.ui.visible[class*="very thin"].right.sidebar~.pusher{-webkit-transform:translate3d(-60px,0,0);transform:translate3d(-60px,0,0)}.ui.visible.thin.right.sidebar~.fixed,.ui.visible.thin.right.sidebar~.pusher{-webkit-transform:translate3d(-150px,0,0);transform:translate3d(-150px,0,0)}.ui.visible.wide.right.sidebar~.fixed,.ui.visible.wide.right.sidebar~.pusher{-webkit-transform:translate3d(-350px,0,0);transform:translate3d(-350px,0,0)}.ui.visible[class*="very wide"].right.sidebar~.fixed,.ui.visible[class*="very wide"].right.sidebar~.pusher{-webkit-transform:translate3d(-475px,0,0);transform:translate3d(-475px,0,0)}.ui.overlay.sidebar{z-index:102}.ui.left.overlay.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.overlay.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.overlay.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.overlay.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.animating.ui.overlay.sidebar,.ui.visible.overlay.sidebar{-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease}.ui.visible.bottom.overlay.sidebar,.ui.visible.left.overlay.sidebar,.ui.visible.right.overlay.sidebar,.ui.visible.top.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.overlay.sidebar~.fixed,.ui.visible.overlay.sidebar~.pusher{-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.ui.push.sidebar{-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease;z-index:102}.ui.left.push.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.push.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.push.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.push.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.ui.visible.push.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.uncover.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:1}.ui.visible.uncover.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease}.ui.slide.along.sidebar{z-index:1}.ui.left.slide.along.sidebar{-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.ui.right.slide.along.sidebar{-webkit-transform:translate3d(50%,0,0);transform:translate3d(50%,0,0)}.ui.top.slide.along.sidebar{-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.ui.bottom.slide.along.sidebar{-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.ui.animating.slide.along.sidebar{-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease}.ui.visible.slide.along.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.slide.out.sidebar{z-index:1}.ui.left.slide.out.sidebar{-webkit-transform:translate3d(50%,0,0);transform:translate3d(50%,0,0)}.ui.right.slide.out.sidebar{-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.ui.top.slide.out.sidebar{-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.ui.bottom.slide.out.sidebar{-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.ui.animating.slide.out.sidebar{-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease}.ui.visible.slide.out.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.scale.down.sidebar{-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease;z-index:102}.ui.left.scale.down.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.scale.down.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.scale.down.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.scale.down.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.ui.scale.down.left.sidebar~.pusher{-webkit-transform-origin:75% 50%;-ms-transform-origin:75% 50%;transform-origin:75% 50%}.ui.scale.down.right.sidebar~.pusher{-webkit-transform-origin:25% 50%;-ms-transform-origin:25% 50%;transform-origin:25% 50%}.ui.scale.down.top.sidebar~.pusher{-webkit-transform-origin:50% 75%;-ms-transform-origin:50% 75%;transform-origin:50% 75%}.ui.scale.down.bottom.sidebar~.pusher{-webkit-transform-origin:50% 25%;-ms-transform-origin:50% 25%;transform-origin:50% 25%}.ui.animating.scale.down>.visible.ui.sidebar{-webkit-transition:-webkit-transform 500ms ease;transition:transform 500ms ease}.ui.animating.scale.down.sidebar~.pusher,.ui.visible.scale.down.sidebar~.pusher{display:block!important;width:100%;height:100%;overflow:hidden}.ui.visible.scale.down.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.scale.down.sidebar~.pusher{-webkit-transform:scale(.75);-ms-transform:scale(.75);transform:scale(.75)}
@@ -0,0 +1,11 @@
1
+ /*
2
+ * # Semantic UI - 1.8.1
3
+ * https://github.com/Semantic-Org/Semantic-UI
4
+ * http://www.semantic-ui.com/
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+ !function(e,i,n,t){"use strict";e.fn.sidebar=function(o){var r,s=e(this),a=e(i),l=e(n),c=e("html"),u=e("head"),d=s.selector||"",f=(new Date).getTime(),m=[],g=arguments[0],b="string"==typeof g,v=[].slice.call(arguments,1),h=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame||function(e){setTimeout(e,0)};return s.each(function(){var s,p,y,k,w,x,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.sidebar.settings,o):e.extend({},e.fn.sidebar.settings),C=T.selector,S=T.className,A=T.namespace,P=T.regExp,F=T.error,O="."+A,E="module-"+A,D=e(this),H=e(T.context),L=D.children(C.sidebar),j=H.children(C.fixed),z=H.children(C.pusher),M=this,R=D.data(E);x={initialize:function(){x.debug("Initializing sidebar",o),x.create.id(),w=x.get.transitionEvent(),("auto"==T.useLegacy&&x.is.legacy()||T.useLegacy===!0)&&(T.transition="overlay",T.useLegacy=!0),x.is.ios()&&x.set.ios(),T.delaySetup?h(x.setup.layout):x.setup.layout(),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),R=x,D.data(E,x)},create:{id:function(){x.verbose("Creating unique id for element"),y=x.get.uniqueID(),p="."+y}},destroy:function(){x.verbose("Destroying previous module for",D),x.remove.direction(),D.off(O).removeData(E),H.off(p),a.off(p),l.off(p)},event:{clickaway:function(e){var i=z.find(e.target).length>0||z.is(e.target),n=H.is(e.target);i&&(x.verbose("User clicked on dimmed page"),x.hide()),n&&(x.verbose("User clicked on dimmable context (scaled out page)"),x.hide())},touch:function(){},containScroll:function(){M.scrollTop<=0&&(M.scrollTop=1),M.scrollTop+M.offsetHeight>=M.scrollHeight&&(M.scrollTop=M.scrollHeight-M.offsetHeight-1)},scroll:function(i){0===e(i.target).closest(C.sidebar).length&&i.preventDefault()}},bind:{clickaway:function(){x.verbose("Adding clickaway events to context",H),T.closable&&H.on("click"+p,x.event.clickaway).on("touchend"+p,x.event.clickaway)},scrollLock:function(){T.scrollLock&&(x.debug("Disabling page scroll"),a.on("DOMMouseScroll"+p,x.event.scroll)),x.verbose("Adding events to contain sidebar scroll"),l.on("touchmove"+p,x.event.touch),D.on("scroll"+O,x.event.containScroll)}},unbind:{clickaway:function(){x.verbose("Removing clickaway events from context",H),H.off(p)},scrollLock:function(){x.verbose("Removing scroll lock from page"),l.off(p),a.off(p),D.off("scroll"+O)}},add:{bodyCSS:function(){var i,n=D.outerWidth(),t=D.outerHeight(),o=x.get.direction(),r={left:n,right:-n,top:t,bottom:-t};x.is.rtl()&&(x.verbose("RTL detected, flipping widths"),r.left=-n,r.right=n),i='<style title="'+A+'">',"left"===o||"right"===o?(x.debug("Adding CSS rules for animation distance",n),i+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { -webkit-transform: translate3d("+r[o]+"px, 0, 0); transform: translate3d("+r[o]+"px, 0, 0); }"):("top"===o||"bottom"==o)&&(i+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+r[o]+"px, 0); transform: translate3d(0, "+r[o]+"px, 0); }"),x.is.ie()&&("left"===o||"right"===o?(x.debug("Adding CSS rules for animation distance",n),i+=" .ui.visible."+o+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+r[o]+"px, 0, 0); transform: translate3d("+r[o]+"px, 0, 0); }"):("top"===o||"bottom"==o)&&(i+=" .ui.visible."+o+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+r[o]+"px, 0); transform: translate3d(0, "+r[o]+"px, 0); }"),i+=" .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d(0px, 0, 0); transform: translate3d(0px, 0, 0); }"),i+="</style>",u.append(i),s=e("style[title="+A+"]"),x.debug("Adding sizing css to head",s)}},refresh:function(){x.verbose("Refreshing selector cache"),H=e(T.context),L=H.children(C.sidebar),z=H.children(C.pusher),j=H.children(C.fixed)},refreshSidebars:function(){x.verbose("Refreshing other sidebars"),L=H.children(C.sidebar)},repaint:function(){x.verbose("Forcing repaint event"),M.style.display="none",M.offsetHeight,M.scrollTop=M.scrollTop,M.style.display=""},setup:{layout:function(){0===H.children(C.pusher).length&&(x.debug("Adding wrapper element for sidebar"),x.error(F.pusher),z=e('<div class="pusher" />'),H.children().not(C.omitted).not(L).wrapAll(z),x.refresh()),(0===D.nextAll(C.pusher).length||D.nextAll(C.pusher)[0]!==z[0])&&(x.debug("Moved sidebar to correct parent element"),x.error(F.movedSidebar,M),D.detach().prependTo(H),x.refresh()),x.set.pushable(),x.set.direction()}},attachEvents:function(i,n){var t=e(i);n=e.isFunction(x[n])?x[n]:x.toggle,t.length>0?(x.debug("Attaching sidebar events to element",i,n),t.on("click"+O,n)):x.error(F.notFound,i)},show:function(i){var n=T.useLegacy===!0?x.legacyPushPage:x.pushPage;i=e.isFunction(i)?i:function(){},x.is.hidden()?(x.refreshSidebars(),T.overlay&&(x.error(F.overlay),T.transition="overlay"),x.refresh(),x.othersActive()&&"overlay"!==x.get.transition()&&(x.debug("Other sidebars currently visible"),T.transition="overlay",T.exclusive&&x.hideOthers()),n(function(){i.call(M),T.onShow.call(M)}),T.onChange.call(M),T.onVisible.call(M)):x.debug("Sidebar is already visible")},hide:function(i){var n=T.useLegacy===!0?x.legacyPullPage:x.pullPage;i=e.isFunction(i)?i:function(){},(x.is.visible()||x.is.animating())&&(x.debug("Hiding sidebar",i),x.refreshSidebars(),n(function(){i.call(M),T.onHidden.call(M)}),T.onChange.call(M),T.onHide.call(M))},othersAnimating:function(){return L.not(D).filter("."+S.animating).length>0},othersVisible:function(){return L.not(D).filter("."+S.visible).length>0},othersActive:function(){return x.othersVisible()||x.othersAnimating()},hideOthers:function(e){var i=L.not(D).filter("."+S.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){t++,t==n&&e()})},toggle:function(){x.verbose("Determining toggled direction"),x.is.hidden()?x.show():x.hide()},pushPage:function(i){var n,t,o=x.get.transition(),r="safe"==o?H:"overlay"===o||x.othersActive()?D:z;i=e.isFunction(i)?i:function(){},"scale down"==T.transition&&x.scrollToTop(),x.set.transition(o),x.repaint(),n=function(){x.bind.clickaway(),x.add.bodyCSS(),x.set.animating(),x.set.visible(),x.othersVisible()||T.dimPage&&z.addClass(S.dimmed)},t=function(e){e.target==r[0]&&(r.off(w+p,t),x.remove.animating(),x.bind.scrollLock(),i.call(M))},r.off(w+p),r.on(w+p,t),h(n)},pullPage:function(i){var n,t,o=x.get.transition(),r="safe"==o?H:"overlay"==o||x.othersActive()?D:z;i=e.isFunction(i)?i:function(){},x.verbose("Removing context push state",x.get.direction()),x.set.transition(o),x.unbind.clickaway(),x.unbind.scrollLock(),n=function(){x.set.animating(),x.remove.visible(),T.dimPage&&!x.othersVisible()&&z.removeClass(S.dimmed)},t=function(e){e.target==r[0]&&(r.off(w+p,t),x.remove.animating(),x.remove.transition(),x.remove.bodyCSS(),("scale down"==o||T.returnScroll&&x.is.mobile())&&x.scrollBack(),i.call(M))},r.off(w+p),r.on(w+p,t),h(n)},legacyPushPage:function(i){var n=D.width(),t=x.get.direction(),o={};n=n||D.width(),i=e.isFunction(i)?i:function(){},o[t]=n,x.debug("Using javascript to push context",o),x.set.visible(),x.set.transition(),x.set.animating(),T.dimPage&&z.addClass(S.dimmed),H.css("position","relative").animate(o,T.duration,T.easing,function(){x.remove.animating(),x.bind.clickaway(),i.call(M)})},legacyPullPage:function(i){var n=0,t=x.get.direction(),o={};n=n||D.width(),i=e.isFunction(i)?i:function(){},o[t]="0px",x.debug("Using javascript to pull context",o),x.unbind.clickaway(),x.set.animating(),x.remove.visible(),T.dimPage&&!x.othersActive()&&z.removeClass(S.dimmed),H.css("position","relative").animate(o,T.duration,T.easing,function(){x.remove.animating(),i.call(M)})},scrollToTop:function(){x.verbose("Scrolling to top of page to avoid animation issues"),k=e(i).scrollTop(),D.scrollTop(0),i.scrollTo(0,0)},scrollBack:function(){x.verbose("Scrolling back to original page position"),i.scrollTo(0,k)},set:{ios:function(){c.addClass(S.ios)},pushed:function(){H.addClass(S.pushed)},pushable:function(){H.addClass(S.pushable)},active:function(){D.addClass(S.active)},animating:function(){D.addClass(S.animating)},transition:function(e){e=e||x.get.transition(),D.addClass(e)},direction:function(e){e=e||x.get.direction(),D.addClass(S[e])},visible:function(){D.addClass(S.visible)},overlay:function(){D.addClass(S.overlay)}},remove:{bodyCSS:function(){x.debug("Removing body css styles",s),s&&s.length>0&&s.remove()},pushed:function(){H.removeClass(S.pushed)},pushable:function(){H.removeClass(S.pushable)},active:function(){D.removeClass(S.active)},animating:function(){D.removeClass(S.animating)},transition:function(e){e=e||x.get.transition(),D.removeClass(e)},direction:function(e){e=e||x.get.direction(),D.removeClass(S[e])},visible:function(){D.removeClass(S.visible)},overlay:function(){D.removeClass(S.overlay)}},get:{direction:function(){return D.hasClass(S.top)?S.top:D.hasClass(S.right)?S.right:D.hasClass(S.bottom)?S.bottom:S.left},transition:function(){var e,i=x.get.direction();return e=x.is.mobile()?"auto"==T.mobileTransition?T.defaultTransition.mobile[i]:T.mobileTransition:"auto"==T.transition?T.defaultTransition.computer[i]:T.transition,x.verbose("Determined transition",e),e},transitionEvent:function(){var e,i=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(i.style[e]!==t)return o[e]},uniqueID:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},is:{ie:function(){var e=!i.ActiveXObject&&"ActiveXObject"in i,n="ActiveXObject"in i;return e||n},legacy:function(){var e,o=n.createElement("div"),r={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(o,null);for(var s in r)o.style[s]!==t&&(o.style[s]="translate3d(1px,1px,1px)",e=i.getComputedStyle(o).getPropertyValue(r[s]));return n.body.removeChild(o),!(e!==t&&e.length>0&&"none"!==e)},ios:function(){var e=navigator.userAgent,i=e.match(P.ios);return i?(x.verbose("Browser was found to be iOS",e),!0):!1},mobile:function(){var e=navigator.userAgent,i=e.match(P.mobile);return i?(x.verbose("Browser was found to be mobile",e),!0):(x.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!x.is.visible()},visible:function(){return D.hasClass(S.visible)},open:function(){return x.is.visible()},closed:function(){return x.is.hidden()},vertical:function(){return D.hasClass(S.top)},animating:function(){return H.hasClass(S.animating)},rtl:function(){return"rtl"==D.css("direction")}},setting:function(i,n){if(x.debug("Changing setting",i,n),e.isPlainObject(i))e.extend(!0,T,i);else{if(n===t)return T[i];T[i]=n}},internal:function(i,n){if(e.isPlainObject(i))e.extend(!0,x,i);else{if(n===t)return x[i];x[i]=n}},debug:function(){T.debug&&(T.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,T.name+":"),x.debug.apply(console,arguments)))},verbose:function(){T.verbose&&T.debug&&(T.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,T.name+":"),x.verbose.apply(console,arguments)))},error:function(){x.error=Function.prototype.bind.call(console.error,console,T.name+":"),x.error.apply(console,arguments)},performance:{log:function(e){var i,n,t;T.performance&&(i=(new Date).getTime(),t=f||i,n=i-t,f=i,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:M,"Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,100)},display:function(){var i=T.name+":",n=0;f=!1,clearTimeout(x.performance.timer),e.each(m,function(e,i){n+=i["Execution Time"]}),i+=" "+n+"ms",d&&(i+=" '"+d+"'"),(console.group!==t||console.table!==t)&&m.length>0&&(console.groupCollapsed(i),console.table?console.table(m):e.each(m,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(i,n,o){var s,a,l,c=R;return n=n||v,o=M||o,"string"==typeof i&&c!==t&&(i=i.split(/[\. ]/),s=i.length-1,e.each(i,function(n,o){var r=n!=s?o+i[n+1].charAt(0).toUpperCase()+i[n+1].slice(1):i;if(e.isPlainObject(c[r])&&n!=s)c=c[r];else{if(c[r]!==t)return a=c[r],!1;if(!e.isPlainObject(c[o])||n==s)return c[o]!==t?(a=c[o],!1):(x.error(F.method,i),!1);c=c[o]}})),e.isFunction(a)?l=a.apply(o,n):a!==t&&(l=a),e.isArray(r)?r.push(l):r!==t?r=[r,l]:l!==t&&(r=l),a}},b?(R===t&&x.initialize(),x.invoke(g)):(R!==t&&x.invoke("destroy"),x.initialize())}),r!==t?r:this},e.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",debug:!1,verbose:!0,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,useLegacy:"auto",duration:500,easing:"easeInOutQuint",onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}},e.extend(e.easing,{easeInOutQuint:function(e,i,n,t,o){return(i/=o/2)<1?t/2*i*i*i*i*i+n:t/2*((i-=2)*i*i*i*i+2)+n}})}(jQuery,window,document);
@@ -0,0 +1,147 @@
1
+ /*
2
+ * # Semantic UI - 1.8.1
3
+ * https://github.com/Semantic-Org/Semantic-UI
4
+ * http://www.semantic-ui.com/
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+ @import 'https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin';
12
+
13
+
14
+
15
+ /*******************************
16
+ Page
17
+ *******************************/
18
+
19
+ html,
20
+ body {
21
+ height: 100%;
22
+ }
23
+ html {
24
+ font-size: 14px;
25
+ }
26
+ body {
27
+ margin: 0px;
28
+ padding: 0px;
29
+ min-width: 278px;
30
+ background: #f7f7f7;
31
+ font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
32
+ font-size: 14px;
33
+ line-height: 1.33;
34
+ color: rgba(0, 0, 0, 0.8);
35
+ font-smoothing: antialiased;
36
+ }
37
+
38
+
39
+ /*******************************
40
+ Headers
41
+ *******************************/
42
+
43
+ h1,
44
+ h2,
45
+ h3,
46
+ h4,
47
+ h5 {
48
+ font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
49
+ line-height: 1.33em;
50
+ margin: -webkit-calc(2rem - 0.165em ) 0em 1rem;
51
+ margin: calc(2rem - 0.165em ) 0em 1rem;
52
+ font-weight: bold;
53
+ padding: 0em;
54
+ }
55
+ h1 {
56
+ min-height: 1rem;
57
+ font-size: 2rem;
58
+ }
59
+ h2 {
60
+ font-size: 1.714rem;
61
+ }
62
+ h3 {
63
+ font-size: 1.28rem;
64
+ }
65
+ h4 {
66
+ font-size: 1.071rem;
67
+ }
68
+ h5 {
69
+ font-size: 1rem;
70
+ }
71
+
72
+
73
+ /*******************************
74
+ Text
75
+ *******************************/
76
+
77
+ p {
78
+ margin: 0em 0em 1em;
79
+ line-height: 1.33;
80
+ }
81
+ p:first-child {
82
+ margin-top: 0em;
83
+ }
84
+ p:last-child {
85
+ margin-bottom: 0em;
86
+ }
87
+
88
+ /*-------------------
89
+ Links
90
+ --------------------*/
91
+
92
+ a {
93
+ color: #009fda;
94
+ text-decoration: none;
95
+ }
96
+ a:hover {
97
+ color: #00b2f3;
98
+ }
99
+
100
+
101
+ /*******************************
102
+ Highlighting
103
+ *******************************/
104
+
105
+
106
+ /* Site */
107
+ ::-webkit-selection {
108
+ background-color: #cce2ff;
109
+ color: rgba(0, 0, 0, 0.8);
110
+ }
111
+ ::-moz-selection {
112
+ background-color: #cce2ff;
113
+ color: rgba(0, 0, 0, 0.8);
114
+ }
115
+ ::selection {
116
+ background-color: #cce2ff;
117
+ color: rgba(0, 0, 0, 0.8);
118
+ }
119
+
120
+ /* Form */
121
+ textarea::-webkit-selection,
122
+ input::-webkit-selection {
123
+ background-color: rgba(100, 100, 100, 0.4);
124
+ color: rgba(0, 0, 0, 0.8);
125
+ }
126
+ textarea::-moz-selection,
127
+ input::-moz-selection {
128
+ background-color: rgba(100, 100, 100, 0.4);
129
+ color: rgba(0, 0, 0, 0.8);
130
+ }
131
+ textarea::selection,
132
+ input::selection {
133
+ background-color: rgba(100, 100, 100, 0.4);
134
+ color: rgba(0, 0, 0, 0.8);
135
+ }
136
+
137
+
138
+ /*******************************
139
+ Global Overrides
140
+ *******************************/
141
+
142
+
143
+
144
+ /*******************************
145
+ Site Overrides
146
+ *******************************/
147
+
@@ -0,0 +1,487 @@
1
+ /*
2
+ * # Semantic - Site
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2014 Contributor
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+ ;(function ( $, window, document, undefined ) {
12
+
13
+ $.site = $.fn.site = function(parameters) {
14
+ var
15
+ time = new Date().getTime(),
16
+ performance = [],
17
+
18
+ query = arguments[0],
19
+ methodInvoked = (typeof query == 'string'),
20
+ queryArguments = [].slice.call(arguments, 1),
21
+
22
+ settings = ( $.isPlainObject(parameters) )
23
+ ? $.extend(true, {}, $.site.settings, parameters)
24
+ : $.extend({}, $.site.settings),
25
+
26
+ namespace = settings.namespace,
27
+ error = settings.error,
28
+
29
+ eventNamespace = '.' + namespace,
30
+ moduleNamespace = 'module-' + namespace,
31
+
32
+ $document = $(document),
33
+ $module = $document,
34
+ element = this,
35
+ instance = $module.data(moduleNamespace),
36
+
37
+ module,
38
+ returnedValue
39
+ ;
40
+ module = {
41
+
42
+ initialize: function() {
43
+ module.instantiate();
44
+ },
45
+
46
+ instantiate: function() {
47
+ module.verbose('Storing instance of site', module);
48
+ instance = module;
49
+ $module
50
+ .data(moduleNamespace, module)
51
+ ;
52
+ },
53
+
54
+ normalize: function() {
55
+ module.fix.console();
56
+ module.fix.requestAnimationFrame();
57
+ },
58
+
59
+ fix: {
60
+ console: function() {
61
+ module.debug('Normalizing window.console');
62
+ if (console === undefined || console.log === undefined) {
63
+ module.verbose('Console not available, normalizing events');
64
+ module.disable.console();
65
+ }
66
+ if (typeof console.group == 'undefined' || typeof console.groupEnd == 'undefined' || typeof console.groupCollapsed == 'undefined') {
67
+ module.verbose('Console group not available, normalizing events');
68
+ window.console.group = function() {};
69
+ window.console.groupEnd = function() {};
70
+ window.console.groupCollapsed = function() {};
71
+ }
72
+ if (typeof console.markTimeline == 'undefined') {
73
+ module.verbose('Mark timeline not available, normalizing events');
74
+ window.console.markTimeline = function() {};
75
+ }
76
+ },
77
+ consoleClear: function() {
78
+ module.debug('Disabling programmatic console clearing');
79
+ window.console.clear = function() {};
80
+ },
81
+ requestAnimationFrame: function() {
82
+ module.debug('Normalizing requestAnimationFrame');
83
+ if(window.requestAnimationFrame === undefined) {
84
+ module.debug('RequestAnimationFrame not available, normailizing event');
85
+ window.requestAnimationFrame = window.requestAnimationFrame
86
+ || window.mozRequestAnimationFrame
87
+ || window.webkitRequestAnimationFrame
88
+ || window.msRequestAnimationFrame
89
+ || function(callback) { setTimeout(callback, 0); }
90
+ ;
91
+ }
92
+ }
93
+ },
94
+
95
+ moduleExists: function(name) {
96
+ return ($.fn[name] !== undefined && $.fn[name].settings !== undefined);
97
+ },
98
+
99
+ enabled: {
100
+ modules: function(modules) {
101
+ var
102
+ enabledModules = []
103
+ ;
104
+ modules = modules || settings.modules;
105
+ $.each(modules, function(index, name) {
106
+ if(module.moduleExists(name)) {
107
+ enabledModules.push(name);
108
+ }
109
+ });
110
+ return enabledModules;
111
+ }
112
+ },
113
+
114
+ disabled: {
115
+ modules: function(modules) {
116
+ var
117
+ disabledModules = []
118
+ ;
119
+ modules = modules || settings.modules;
120
+ $.each(modules, function(index, name) {
121
+ if(!module.moduleExists(name)) {
122
+ disabledModules.push(name);
123
+ }
124
+ });
125
+ return disabledModules;
126
+ }
127
+ },
128
+
129
+ change: {
130
+ setting: function(setting, value, modules, modifyExisting) {
131
+ modules = (typeof modules === 'string')
132
+ ? (modules === 'all')
133
+ ? settings.modules
134
+ : [modules]
135
+ : modules || settings.modules
136
+ ;
137
+ modifyExisting = (modifyExisting !== undefined)
138
+ ? modifyExisting
139
+ : true
140
+ ;
141
+ $.each(modules, function(index, name) {
142
+ var
143
+ namespace = (module.moduleExists(name))
144
+ ? $.fn[name].settings.namespace || false
145
+ : true,
146
+ $existingModules
147
+ ;
148
+ if(module.moduleExists(name)) {
149
+ module.verbose('Changing default setting', setting, value, name);
150
+ $.fn[name].settings[setting] = value;
151
+ if(modifyExisting && namespace) {
152
+ $existingModules = $(':data(module-' + namespace + ')');
153
+ if($existingModules.length > 0) {
154
+ module.verbose('Modifying existing settings', $existingModules);
155
+ $existingModules[name]('setting', setting, value);
156
+ }
157
+ }
158
+ }
159
+ });
160
+ },
161
+ settings: function(newSettings, modules, modifyExisting) {
162
+ modules = (typeof modules === 'string')
163
+ ? [modules]
164
+ : modules || settings.modules
165
+ ;
166
+ modifyExisting = (modifyExisting !== undefined)
167
+ ? modifyExisting
168
+ : true
169
+ ;
170
+ $.each(modules, function(index, name) {
171
+ var
172
+ $existingModules
173
+ ;
174
+ if(module.moduleExists(name)) {
175
+ module.verbose('Changing default setting', newSettings, name);
176
+ $.extend(true, $.fn[name].settings, newSettings);
177
+ if(modifyExisting && namespace) {
178
+ $existingModules = $(':data(module-' + namespace + ')');
179
+ if($existingModules.length > 0) {
180
+ module.verbose('Modifying existing settings', $existingModules);
181
+ $existingModules[name]('setting', newSettings);
182
+ }
183
+ }
184
+ }
185
+ });
186
+ }
187
+ },
188
+
189
+ enable: {
190
+ console: function() {
191
+ module.console(true);
192
+ },
193
+ debug: function(modules, modifyExisting) {
194
+ modules = modules || settings.modules;
195
+ module.debug('Enabling debug for modules', modules);
196
+ module.change.setting('debug', true, modules, modifyExisting);
197
+ },
198
+ verbose: function(modules, modifyExisting) {
199
+ modules = modules || settings.modules;
200
+ module.debug('Enabling verbose debug for modules', modules);
201
+ module.change.setting('verbose', true, modules, modifyExisting);
202
+ }
203
+ },
204
+ disable: {
205
+ console: function() {
206
+ module.console(false);
207
+ },
208
+ debug: function(modules, modifyExisting) {
209
+ modules = modules || settings.modules;
210
+ module.debug('Disabling debug for modules', modules);
211
+ module.change.setting('debug', false, modules, modifyExisting);
212
+ },
213
+ verbose: function(modules, modifyExisting) {
214
+ modules = modules || settings.modules;
215
+ module.debug('Disabling verbose debug for modules', modules);
216
+ module.change.setting('verbose', false, modules, modifyExisting);
217
+ }
218
+ },
219
+
220
+ console: function(enable) {
221
+ if(enable) {
222
+ if(instance.cache.console === undefined) {
223
+ module.error(error.console);
224
+ return;
225
+ }
226
+ module.debug('Restoring console function');
227
+ window.console = instance.cache.console;
228
+ }
229
+ else {
230
+ module.debug('Disabling console function');
231
+ instance.cache.console = window.console;
232
+ window.console = {
233
+ clear : function(){},
234
+ error : function(){},
235
+ group : function(){},
236
+ groupCollapsed : function(){},
237
+ groupEnd : function(){},
238
+ info : function(){},
239
+ log : function(){},
240
+ markTimeline : function(){},
241
+ warn : function(){}
242
+ };
243
+ }
244
+ },
245
+
246
+ destroy: function() {
247
+ module.verbose('Destroying previous site for', $module);
248
+ $module
249
+ .removeData(moduleNamespace)
250
+ ;
251
+ },
252
+
253
+ cache: {},
254
+
255
+ setting: function(name, value) {
256
+ if( $.isPlainObject(name) ) {
257
+ $.extend(true, settings, name);
258
+ }
259
+ else if(value !== undefined) {
260
+ settings[name] = value;
261
+ }
262
+ else {
263
+ return settings[name];
264
+ }
265
+ },
266
+ internal: function(name, value) {
267
+ if( $.isPlainObject(name) ) {
268
+ $.extend(true, module, name);
269
+ }
270
+ else if(value !== undefined) {
271
+ module[name] = value;
272
+ }
273
+ else {
274
+ return module[name];
275
+ }
276
+ },
277
+ debug: function() {
278
+ if(settings.debug) {
279
+ if(settings.performance) {
280
+ module.performance.log(arguments);
281
+ }
282
+ else {
283
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
284
+ module.debug.apply(console, arguments);
285
+ }
286
+ }
287
+ },
288
+ verbose: function() {
289
+ if(settings.verbose && settings.debug) {
290
+ if(settings.performance) {
291
+ module.performance.log(arguments);
292
+ }
293
+ else {
294
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
295
+ module.verbose.apply(console, arguments);
296
+ }
297
+ }
298
+ },
299
+ error: function() {
300
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
301
+ module.error.apply(console, arguments);
302
+ },
303
+ performance: {
304
+ log: function(message) {
305
+ var
306
+ currentTime,
307
+ executionTime,
308
+ previousTime
309
+ ;
310
+ if(settings.performance) {
311
+ currentTime = new Date().getTime();
312
+ previousTime = time || currentTime;
313
+ executionTime = currentTime - previousTime;
314
+ time = currentTime;
315
+ performance.push({
316
+ 'Element' : element,
317
+ 'Name' : message[0],
318
+ 'Arguments' : [].slice.call(message, 1) || '',
319
+ 'Execution Time' : executionTime
320
+ });
321
+ }
322
+ clearTimeout(module.performance.timer);
323
+ module.performance.timer = setTimeout(module.performance.display, 100);
324
+ },
325
+ display: function() {
326
+ var
327
+ title = settings.name + ':',
328
+ totalTime = 0
329
+ ;
330
+ time = false;
331
+ clearTimeout(module.performance.timer);
332
+ $.each(performance, function(index, data) {
333
+ totalTime += data['Execution Time'];
334
+ });
335
+ title += ' ' + totalTime + 'ms';
336
+ if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
337
+ console.groupCollapsed(title);
338
+ if(console.table) {
339
+ console.table(performance);
340
+ }
341
+ else {
342
+ $.each(performance, function(index, data) {
343
+ console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
344
+ });
345
+ }
346
+ console.groupEnd();
347
+ }
348
+ performance = [];
349
+ }
350
+ },
351
+ invoke: function(query, passedArguments, context) {
352
+ var
353
+ object = instance,
354
+ maxDepth,
355
+ found,
356
+ response
357
+ ;
358
+ passedArguments = passedArguments || queryArguments;
359
+ context = element || context;
360
+ if(typeof query == 'string' && object !== undefined) {
361
+ query = query.split(/[\. ]/);
362
+ maxDepth = query.length - 1;
363
+ $.each(query, function(depth, value) {
364
+ var camelCaseValue = (depth != maxDepth)
365
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
366
+ : query
367
+ ;
368
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
369
+ object = object[camelCaseValue];
370
+ }
371
+ else if( object[camelCaseValue] !== undefined ) {
372
+ found = object[camelCaseValue];
373
+ return false;
374
+ }
375
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
376
+ object = object[value];
377
+ }
378
+ else if( object[value] !== undefined ) {
379
+ found = object[value];
380
+ return false;
381
+ }
382
+ else {
383
+ module.error(error.method, query);
384
+ return false;
385
+ }
386
+ });
387
+ }
388
+ if ( $.isFunction( found ) ) {
389
+ response = found.apply(context, passedArguments);
390
+ }
391
+ else if(found !== undefined) {
392
+ response = found;
393
+ }
394
+ if($.isArray(returnedValue)) {
395
+ returnedValue.push(response);
396
+ }
397
+ else if(returnedValue !== undefined) {
398
+ returnedValue = [returnedValue, response];
399
+ }
400
+ else if(response !== undefined) {
401
+ returnedValue = response;
402
+ }
403
+ return found;
404
+ }
405
+ };
406
+
407
+ if(methodInvoked) {
408
+ if(instance === undefined) {
409
+ module.initialize();
410
+ }
411
+ module.invoke(query);
412
+ }
413
+ else {
414
+ if(instance !== undefined) {
415
+ module.destroy();
416
+ }
417
+ module.initialize();
418
+ }
419
+ return (returnedValue !== undefined)
420
+ ? returnedValue
421
+ : this
422
+ ;
423
+ };
424
+
425
+ $.site.settings = {
426
+
427
+ name : 'Site',
428
+ namespace : 'site',
429
+
430
+ error : {
431
+ console : 'Console cannot be restored, most likely it was overwritten outside of module',
432
+ method : 'The method you called is not defined.'
433
+ },
434
+
435
+ debug : false,
436
+ verbose : true,
437
+ performance : true,
438
+
439
+ modules: [
440
+ 'accordion',
441
+ 'api',
442
+ 'checkbox',
443
+ 'dimmer',
444
+ 'dropdown',
445
+ 'form',
446
+ 'modal',
447
+ 'nag',
448
+ 'popup',
449
+ 'rating',
450
+ 'shape',
451
+ 'sidebar',
452
+ 'state',
453
+ 'sticky',
454
+ 'tab',
455
+ 'transition',
456
+ 'video',
457
+ 'visit',
458
+ 'visibility'
459
+ ],
460
+
461
+ siteNamespace : 'site',
462
+ namespaceStub : {
463
+ cache : {},
464
+ config : {},
465
+ sections : {},
466
+ section : {},
467
+ utilities : {}
468
+ }
469
+
470
+ };
471
+
472
+ // allows for selection of elements with data attributes
473
+ $.extend($.expr[ ":" ], {
474
+ data: ($.expr.createPseudo)
475
+ ? $.expr.createPseudo(function(dataName) {
476
+ return function(elem) {
477
+ return !!$.data(elem, dataName);
478
+ };
479
+ })
480
+ : function(elem, i, match) {
481
+ // support: jQuery < 1.8
482
+ return !!$.data(elem, match[ 3 ]);
483
+ }
484
+ });
485
+
486
+
487
+ })( jQuery, window , document );