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.steps .step{position:relative;display:table-cell;vertical-align:middle;margin:0;padding:.9285em 1.5em .9285em 2.25em;background:#fff;color:rgba(0,0,0,.8);box-shadow:0 0 0 1px #d4d4d5;border-radius:0}.ui.steps .step:after{position:absolute;z-index:2;content:'';top:50%;right:0;border:none;background-color:#fff;width:1.5em;height:1.5em;border-bottom:1px solid rgba(39,41,43,.15);border-right:1px solid rgba(39,41,43,.15);-webkit-transform:translateY(-50%) translateX(50%) rotate(-45deg);-ms-transform:translateY(-50%) translateX(50%) rotate(-45deg);transform:translateY(-50%) translateX(50%) rotate(-45deg)}.ui.steps .step,.ui.steps .step:after{-webkit-transition:background-color .2s ease,opacity .2s ease,color .2s ease,box-shadow .2s ease;transition:background-color .2s ease,opacity .2s ease,color .2s ease,box-shadow .2s ease}.ui.steps{display:table;table-layout:fixed;background:0 0;box-shadow:'';line-height:1.142rem;box-sizing:border-box;border-radius:.2857rem}.ui.steps .step:first-child{padding-left:1.5em;border-radius:.2857rem 0 0 .2857rem}.ui.steps .step:last-child{border-radius:0 .2857rem .2857rem 0}.ui.steps .step:only-child{border-radius:.2857rem}.ui.steps .step:last-child{margin-right:0}.ui.steps .step:last-child:after{display:none}.ui.steps .step .title{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.0714em;font-weight:700}.ui.steps .step .description{font-weight:400;font-size:.9285em;color:rgba(0,0,0,.8)}.ui.steps .step .title~.description{margin-top:.1em}.ui.steps .step>.icon,.ui.steps .step>.icon~.content{display:table-cell;vertical-align:middle}.ui.steps .step>.icon{font-size:2em;margin:0;padding-right:.6em}.ui.steps .link.step,.ui.steps a.step{cursor:pointer}.ui.ordered.steps{counter-reset:ordered}.ui.ordered.steps .step:before{display:table-cell;position:static;text-align:center;content:counters(ordered,".");vertical-align:middle;padding-right:.6em;font-size:2em;counter-increment:ordered}.ui.ordered.steps .step>*{display:table-cell;vertical-align:middle}.ui.vertical.steps{display:inline-block;overflow:visible}.ui.vertical.steps .step{display:block;border-radius:0;padding:.9285em 1.5em}.ui.vertical.steps .step:first-child{padding:.9285em 1.5em;border-radius:.2857rem .2857rem 0 0}.ui.vertical.steps .step:last-child{border-radius:0 0 .2857rem .2857rem}.ui.vertical.steps .step:after{display:none}.ui.vertical.steps .active.step:after{display:block}@media only screen and (max-width:767px){.ui.steps{overflow:visible}.ui.steps .step{display:block;border-radius:0;padding:.9285em 1.5em}.ui.steps .step:first-child{padding:.9285em 1.5em;border-radius:.2857rem .2857rem 0 0}.ui.steps .step:last-child{border-radius:0 0 .2857rem .2857rem}.ui.steps .step:after{display:none}}.ui.steps .link.step:hover,.ui.steps .link.step:hover::after,.ui.steps a.step:hover,.ui.steps a.step:hover::after{background:#fafafa;color:rgba(0,0,0,.8)}.ui.steps .link.step:active,.ui.steps .link.step:active::after,.ui.steps a.step:active,.ui.steps a.step:active::after{background:#f0f0f0;color:rgba(0,0,0,.8)}.ui.steps .step.active{cursor:auto;background:#f0f0f0}.ui.steps .step.active:after{background:#f0f0f0}.ui.steps .step.active .title{color:#009fda}.ui.ordered.steps .step.active:before,.ui.steps .active.step .icon{color:rgba(0,0,0,.85)}.ui.steps .link.active.step:hover,.ui.steps .link.active.step:hover::after,.ui.steps a.active.step:hover,.ui.steps a.active.step:hover::after{cursor:pointer;background:#ececec;color:rgba(0,0,0,.8)}.ui.ordered.steps .step.completed:before,.ui.steps .step.completed>.icon:before{color:#5bbd72}.ui.steps .disabled.step{cursor:auto;background:#fff;pointer-events:none}.ui.steps .disabled.step,.ui.steps .disabled.step .description,.ui.steps .disabled.step .title{color:rgba(40,40,40,.3)}.ui.steps .disabled.step:after{background:#fff}@media only screen and (min-width:992px){.ui[class*="tablet stackable"].steps{overflow:visible}.ui[class*="tablet stackable"].steps .step{display:block;border-radius:0;padding:.9285em 1.5em}.ui[class*="tablet stackable"].steps .step:first-child{padding:.9285em 1.5em;border-radius:.2857rem .2857rem 0 0}.ui[class*="tablet stackable"].steps .step:last-child{border-radius:0 0 .2857rem .2857rem}.ui[class*="tablet stackable"].steps .step:after{display:none}}.ui.fluid.steps{width:100%}.attached.ui.steps{margin:0;border-radius:.2857rem .2857rem 0 0}.attached.ui.steps .step:first-child{border-radius:.2857rem 0 0}.attached.ui.steps .step:last-child{border-radius:0 .2857rem 0 0}.bottom.attached.ui.steps{margin:-1px 0 0;border-radius:0 0 .2857rem .2857rem}.bottom.attached.ui.steps .step:first-child{border-radius:0 0 0 .2857rem}.bottom.attached.ui.steps .step:last-child{border-radius:0 0 .2857rem}.ui.eight.steps,.ui.five.steps,.ui.four.steps,.ui.one.steps,.ui.seven.steps,.ui.six.steps,.ui.three.steps,.ui.two.steps{display:block}.ui.one.steps>.step{width:100%}.ui.two.steps>.step{width:50%}.ui.three.steps>.step{width:33.333%}.ui.four.steps>.step{width:25%}.ui.five.steps>.step{width:20%}.ui.six.steps>.step{width:16.666%}.ui.seven.steps>.step{width:14.285%}.ui.eight.steps>.step{width:12.5%}.ui.small.step,.ui.small.steps .step{font-size:.92857143rem}.ui.step,.ui.steps .step{font-size:1rem}.ui.large.step,.ui.large.steps .step{font-size:1.14285714rem}@font-face{font-family:Step;src:url(data:application/x-font-ttf;charset=utf-8;;base64,AAEAAAAOAIAAAwBgT1MvMj3hSQEAAADsAAAAVmNtYXDQEhm3AAABRAAAAUpjdnQgBkn/lAAABuwAAAAcZnBnbYoKeDsAAAcIAAAJkWdhc3AAAAAQAAAG5AAAAAhnbHlm32cEdgAAApAAAAC2aGVhZAErPHsAAANIAAAANmhoZWEHUwNNAAADgAAAACRobXR4CykAAAAAA6QAAAAMbG9jYQA4AFsAAAOwAAAACG1heHAApgm8AAADuAAAACBuYW1lzJ0aHAAAA9gAAALNcG9zdK69QJgAAAaoAAAAO3ByZXCSoZr/AAAQnAAAAFYAAQO4AZAABQAIAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA6ADoAQNS/2oAWgMLAE8AAAABAAAAAAAAAAAAAwAAAAMAAAAcAAEAAAAAAEQAAwABAAAAHAAEACgAAAAGAAQAAQACAADoAf//AAAAAOgA//8AABgBAAEAAAAAAAAAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAA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IKB4f935iUMQBEUwAwAi5YFpgPoAAAD6AAAA1kAAAAAAAAAOABbAAEAAAADABYAAQAAAAAAAgAGABMAbgAAAC0JkQAAAAB4nHWQy2rCQBSG//HSi0JbWui2sypKabxgN4IgWHTTbqS4LTHGJBIzMhkFX6Pv0IfpS/RZ+puMpShNmMx3vjlz5mQAXOMbAvnzxJGzwBmjnAs4Rc9ykf7Zcon8YrmMKt4sn9C/W67gAYHlKm7wwQqidM5ogU/LAlfi0nIBF+LOcpH+0XKJ3LNcxq14tXxC71muYCJSy1Xci6+BWm11FIRG1gZ12W62OnK6lYoqStxYumsTKp3KvpyrxPhxrBxPLfc89oN17Op9uJ8nvk4jlciW09yrkZ/42jX+bFc93QRtY+ZyrtVSDm2GXGm18D3jhMasuo3G3/MwgMIKW2hEvKoQBhI12jrnNppooUOaMkMyM8+KkMBFTONizR1htpIy7nPMGSW0PjNisgOP3+WRH5MC7o9ZRR+tHsYT0u6MKPOSfTns7jBrREqyTDezs9/eU2x4WpvWcNeuS511JTE8qCF5H7u1BY1H72S3Ymi7aPD95/9+AN1fhEsAeJxjYGKAAC4G7ICZgYGRiZGZMzkjNTk7N7Eomy05syg5J5WBAQBE1QZBAABLuADIUlixAQGOWbkIAAgAYyCwASNEsAMjcLIEKAlFUkSyCgIHKrEGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAA) format('woff')}.ui.ordered.steps .step.completed:before,.ui.steps .step.completed>.icon:before{font-family:Step;content:'\e800'}
@@ -0,0 +1,80 @@
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
+
12
+
13
+
14
+ /*******************************
15
+ Sticky
16
+ *******************************/
17
+
18
+ .ui.sticky {
19
+ position: static;
20
+ -webkit-transition: width 0.2s ease, height 0.2s ease, top 0.2s ease, bottom 0.2s ease;
21
+ transition: width 0.2s ease, height 0.2s ease, top 0.2s ease, bottom 0.2s ease;
22
+ z-index: 800;
23
+ }
24
+
25
+
26
+ /*******************************
27
+ States
28
+ *******************************/
29
+
30
+
31
+ /* Bound */
32
+ .ui.sticky.bound {
33
+ position: absolute;
34
+ left: auto;
35
+ right: auto;
36
+ }
37
+
38
+ /* Fixed */
39
+ .ui.sticky.fixed {
40
+ position: fixed;
41
+ left: auto;
42
+ right: auto;
43
+ }
44
+
45
+ /* Bound/Fixed Position */
46
+ .ui.sticky.bound.top,
47
+ .ui.sticky.fixed.top {
48
+ top: 0px;
49
+ bottom: auto;
50
+ }
51
+ .ui.sticky.bound.bottom,
52
+ .ui.sticky.fixed.bottom {
53
+ top: auto;
54
+ bottom: 0px;
55
+ }
56
+
57
+
58
+ /*******************************
59
+ Types
60
+ *******************************/
61
+
62
+ .ui.native.sticky {
63
+ position: -webkit-sticky;
64
+ position: -moz-sticky;
65
+ position: -ms-sticky;
66
+ position: -o-sticky;
67
+ position: sticky;
68
+ }
69
+
70
+
71
+ /*******************************
72
+ Theme Overrides
73
+ *******************************/
74
+
75
+
76
+
77
+ /*******************************
78
+ Site Overrides
79
+ *******************************/
80
+
@@ -0,0 +1,775 @@
1
+ /*
2
+ * # Semantic - Sticky
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+
12
+ ;(function ( $, window, document, undefined ) {
13
+
14
+ "use strict";
15
+
16
+ $.fn.sticky = function(parameters) {
17
+ var
18
+ $allModules = $(this),
19
+ moduleSelector = $allModules.selector || '',
20
+
21
+ time = new Date().getTime(),
22
+ performance = [],
23
+
24
+ query = arguments[0],
25
+ methodInvoked = (typeof query == 'string'),
26
+ queryArguments = [].slice.call(arguments, 1),
27
+ returnedValue
28
+ ;
29
+
30
+ $allModules
31
+ .each(function() {
32
+ var
33
+ settings = $.extend(true, {}, $.fn.sticky.settings, parameters),
34
+
35
+ className = settings.className,
36
+ namespace = settings.namespace,
37
+ error = settings.error,
38
+
39
+ eventNamespace = '.' + namespace,
40
+ moduleNamespace = 'module-' + namespace,
41
+
42
+ $module = $(this),
43
+ $window = $(window),
44
+ $container = $module.offsetParent(),
45
+ $scroll = $(settings.scrollContext),
46
+ $context,
47
+
48
+ selector = $module.selector || '',
49
+ instance = $module.data(moduleNamespace),
50
+
51
+ requestAnimationFrame = window.requestAnimationFrame
52
+ || window.mozRequestAnimationFrame
53
+ || window.webkitRequestAnimationFrame
54
+ || window.msRequestAnimationFrame
55
+ || function(callback) { setTimeout(callback, 0); },
56
+
57
+ element = this,
58
+ observer,
59
+ module
60
+ ;
61
+
62
+ module = {
63
+
64
+ initialize: function() {
65
+ if(settings.context) {
66
+ $context = $(settings.context);
67
+ }
68
+ else {
69
+ $context = $container;
70
+ }
71
+ if($context.length === 0) {
72
+ module.error(error.invalidContext, settings.context, $module);
73
+ return;
74
+ }
75
+ module.verbose('Initializing sticky', settings, $container);
76
+ module.save.positions();
77
+
78
+ // error conditions
79
+ if( module.is.hidden() ) {
80
+ module.error(error.visible, $module);
81
+ }
82
+ if(module.cache.element.height > module.cache.context.height) {
83
+ module.reset();
84
+ module.error(error.elementSize, $module);
85
+ return;
86
+ }
87
+
88
+ $window
89
+ .on('resize' + eventNamespace, module.event.resize)
90
+ ;
91
+ $scroll
92
+ .on('scroll' + eventNamespace, module.event.scroll)
93
+ ;
94
+
95
+ module.observeChanges();
96
+ module.instantiate();
97
+ },
98
+
99
+ instantiate: function() {
100
+ module.verbose('Storing instance of module', module);
101
+ instance = module;
102
+ $module
103
+ .data(moduleNamespace, module)
104
+ ;
105
+ },
106
+
107
+ destroy: function() {
108
+ module.verbose('Destroying previous module');
109
+ module.reset();
110
+ if(observer) {
111
+ observer.disconnect();
112
+ }
113
+ $window
114
+ .off('resize' + eventNamespace, module.event.resize)
115
+ ;
116
+ $scroll
117
+ .off('scroll' + eventNamespace, module.event.scroll)
118
+ ;
119
+ $module
120
+ .removeData(moduleNamespace)
121
+ ;
122
+ },
123
+
124
+ observeChanges: function() {
125
+ var
126
+ context = $context[0]
127
+ ;
128
+ if(settings.observeChanges) {
129
+ if('MutationObserver' in window) {
130
+ observer = new MutationObserver(function(mutations) {
131
+ clearTimeout(module.timer);
132
+ module.timer = setTimeout(function() {
133
+ module.verbose('DOM tree modified, updating sticky menu');
134
+ module.refresh();
135
+ }, 200);
136
+ });
137
+ observer.observe(element, {
138
+ childList : true,
139
+ subtree : true
140
+ });
141
+ observer.observe(context, {
142
+ childList : true,
143
+ subtree : true
144
+ });
145
+ module.debug('Setting up mutation observer', observer);
146
+ }
147
+ }
148
+ },
149
+
150
+ event: {
151
+ resize: function() {
152
+ requestAnimationFrame(function() {
153
+ module.refresh();
154
+ module.stick();
155
+ });
156
+ },
157
+ scroll: function() {
158
+ requestAnimationFrame(function() {
159
+ module.stick();
160
+ settings.onScroll.call(element);
161
+ });
162
+ }
163
+ },
164
+
165
+ refresh: function(hardRefresh) {
166
+ module.reset();
167
+ if(hardRefresh) {
168
+ $container = $module.offsetParent();
169
+ }
170
+ module.save.positions();
171
+ module.stick();
172
+ settings.onReposition.call(element);
173
+ },
174
+
175
+ supports: {
176
+ sticky: function() {
177
+ var
178
+ $element = $('<div/>'),
179
+ element = $element.get()
180
+ ;
181
+ $element
182
+ .addClass(className.supported)
183
+ ;
184
+ return($element.css('position').match('sticky'));
185
+ }
186
+ },
187
+
188
+ save: {
189
+ scroll: function(scroll) {
190
+ module.lastScroll = scroll;
191
+ },
192
+ positions: function() {
193
+ var
194
+ window = {
195
+ height: $window.height()
196
+ },
197
+ element = {
198
+ margin: {
199
+ top : parseInt($module.css('margin-top'), 10),
200
+ bottom : parseInt($module.css('margin-bottom'), 10),
201
+ },
202
+ offset : $module.offset(),
203
+ width : $module.outerWidth(),
204
+ height : $module.outerHeight()
205
+ },
206
+ context = {
207
+ offset: $context.offset(),
208
+ height: $context.outerHeight()
209
+ }
210
+ ;
211
+ module.cache = {
212
+ fits : ( element.height < window.height ),
213
+ window: {
214
+ height: window.height
215
+ },
216
+ element: {
217
+ margin : element.margin,
218
+ top : element.offset.top - element.margin.top,
219
+ left : element.offset.left,
220
+ width : element.width,
221
+ height : element.height,
222
+ bottom : element.offset.top + element.height
223
+ },
224
+ context: {
225
+ top : context.offset.top,
226
+ height : context.height,
227
+ bottom : context.offset.top + context.height
228
+ }
229
+ };
230
+ module.set.containerSize();
231
+ module.set.size();
232
+ module.stick();
233
+ module.debug('Caching element positions', module.cache);
234
+ }
235
+ },
236
+
237
+ get: {
238
+ direction: function(scroll) {
239
+ var
240
+ direction = 'down'
241
+ ;
242
+ scroll = scroll || $scroll.scrollTop();
243
+ if(module.lastScroll !== undefined) {
244
+ if(module.lastScroll < scroll) {
245
+ direction = 'down';
246
+ }
247
+ else if(module.lastScroll > scroll) {
248
+ direction = 'up';
249
+ }
250
+ }
251
+ return direction;
252
+ },
253
+ scrollChange: function(scroll) {
254
+ scroll = scroll || $scroll.scrollTop();
255
+ return (module.lastScroll)
256
+ ? (scroll - module.lastScroll)
257
+ : 0
258
+ ;
259
+ },
260
+ currentElementScroll: function() {
261
+ return ( module.is.top() )
262
+ ? Math.abs(parseInt($module.css('top'), 10)) || 0
263
+ : Math.abs(parseInt($module.css('bottom'), 10)) || 0
264
+ ;
265
+ },
266
+ elementScroll: function(scroll) {
267
+ scroll = scroll || $scroll.scrollTop();
268
+ var
269
+ element = module.cache.element,
270
+ window = module.cache.window,
271
+ delta = module.get.scrollChange(scroll),
272
+ maxScroll = (element.height - window.height + settings.offset),
273
+ currentScroll = module.get.currentElementScroll(),
274
+ possibleScroll = (currentScroll + delta),
275
+ elementScroll
276
+ ;
277
+ if(module.cache.fits || possibleScroll < 0) {
278
+ elementScroll = 0;
279
+ }
280
+ else if (possibleScroll > maxScroll ) {
281
+ elementScroll = maxScroll;
282
+ }
283
+ else {
284
+ elementScroll = possibleScroll;
285
+ }
286
+ return elementScroll;
287
+ }
288
+ },
289
+
290
+ remove: {
291
+ offset: function() {
292
+ $module.css('margin-top', '');
293
+ }
294
+ },
295
+
296
+ set: {
297
+ offset: function() {
298
+ module.verbose('Setting offset on element', settings.offset);
299
+ $module.css('margin-top', settings.offset);
300
+ },
301
+ containerSize: function() {
302
+ var
303
+ tagName = $container.get(0).tagName
304
+ ;
305
+ if(tagName === 'HTML' || tagName == 'body') {
306
+ // this can trigger for too many reasons
307
+ //module.error(error.container, tagName, $module);
308
+ $container = $module.offsetParent();
309
+ }
310
+ else {
311
+ module.debug('Settings container size', module.cache.context.height);
312
+ $container.height(module.cache.context.height);
313
+ }
314
+ },
315
+ scroll: function(scroll) {
316
+ module.debug('Setting scroll on element', scroll);
317
+ if( module.is.top() ) {
318
+ $module
319
+ .css('bottom', '')
320
+ .css('top', -scroll)
321
+ ;
322
+ }
323
+ if( module.is.bottom() ) {
324
+ $module
325
+ .css('top', '')
326
+ .css('bottom', scroll)
327
+ ;
328
+ }
329
+ },
330
+ size: function() {
331
+ if(module.cache.element.height !== 0 && module.cache.element.width !== 0) {
332
+ $module
333
+ .css({
334
+ width : module.cache.element.width,
335
+ height : module.cache.element.height
336
+ })
337
+ ;
338
+ }
339
+ }
340
+ },
341
+
342
+ is: {
343
+ top: function() {
344
+ return $module.hasClass(className.top);
345
+ },
346
+ bottom: function() {
347
+ return $module.hasClass(className.bottom);
348
+ },
349
+ initialPosition: function() {
350
+ return (!module.is.fixed() && !module.is.bound());
351
+ },
352
+ hidden: function() {
353
+ return (!$module.is(':visible'));
354
+ },
355
+ bound: function() {
356
+ return $module.hasClass(className.bound);
357
+ },
358
+ fixed: function() {
359
+ return $module.hasClass(className.fixed);
360
+ }
361
+ },
362
+
363
+ stick: function() {
364
+ var
365
+ cache = module.cache,
366
+ fits = cache.fits,
367
+ element = cache.element,
368
+ window = cache.window,
369
+ context = cache.context,
370
+ offset = (module.is.bottom() && settings.pushing)
371
+ ? settings.bottomOffset
372
+ : settings.offset,
373
+ scroll = {
374
+ top : $scroll.scrollTop() + offset,
375
+ bottom : $scroll.scrollTop() + offset + window.height
376
+ },
377
+ direction = module.get.direction(scroll.top),
378
+ elementScroll = module.get.elementScroll(scroll.top),
379
+
380
+ // shorthand
381
+ doesntFit = !fits,
382
+ elementVisible = (element.height !== 0)
383
+ ;
384
+
385
+ // save current scroll for next run
386
+ module.save.scroll(scroll.top);
387
+
388
+ if(elementVisible) {
389
+
390
+ if( module.is.initialPosition() ) {
391
+ if(scroll.top >= element.top) {
392
+ module.debug('Element passed, fixing element to page');
393
+ module.fixTop();
394
+ }
395
+ }
396
+ else if( module.is.fixed() ) {
397
+
398
+ // currently fixed top
399
+ if( module.is.top() ) {
400
+ if( scroll.top < element.top ) {
401
+ module.debug('Fixed element reached top of container');
402
+ module.setInitialPosition();
403
+ }
404
+ else if( (element.height + scroll.top - elementScroll) > context.bottom ) {
405
+ module.debug('Fixed element reached bottom of container');
406
+ module.bindBottom();
407
+ }
408
+ // scroll element if larger than screen
409
+ else if(doesntFit) {
410
+ module.set.scroll(elementScroll);
411
+ }
412
+ }
413
+
414
+ // currently fixed bottom
415
+ else if(module.is.bottom() ) {
416
+
417
+ // top edge
418
+ if( (scroll.bottom - element.height) < element.top) {
419
+ module.debug('Bottom fixed rail has reached top of container');
420
+ module.setInitialPosition();
421
+ }
422
+ // bottom edge
423
+ else if(scroll.bottom > context.bottom) {
424
+ module.debug('Bottom fixed rail has reached bottom of container');
425
+ module.bindBottom();
426
+ }
427
+ // scroll element if larger than screen
428
+ else if(doesntFit) {
429
+ module.set.scroll(elementScroll);
430
+ }
431
+
432
+ }
433
+ }
434
+ else if( module.is.bottom() ) {
435
+ if(settings.pushing) {
436
+ if(module.is.bound() && scroll.bottom < context.bottom ) {
437
+ module.debug('Fixing bottom attached element to bottom of browser.');
438
+ module.fixBottom();
439
+ }
440
+ }
441
+ else {
442
+ if(module.is.bound() && (scroll.top < context.bottom - element.height) ) {
443
+ module.debug('Fixing bottom attached element to top of browser.');
444
+ module.fixTop();
445
+ }
446
+ }
447
+ }
448
+ }
449
+ },
450
+
451
+ bindTop: function() {
452
+ module.debug('Binding element to top of parent container');
453
+ module.remove.offset();
454
+ $module
455
+ .css('left' , '')
456
+ .css('top' , '')
457
+ .css('bottom' , '')
458
+ .removeClass(className.fixed)
459
+ .removeClass(className.bottom)
460
+ .addClass(className.bound)
461
+ .addClass(className.top)
462
+ ;
463
+ settings.onTop.call(element);
464
+ settings.onUnstick.call(element);
465
+ },
466
+ bindBottom: function() {
467
+ module.debug('Binding element to bottom of parent container');
468
+ module.remove.offset();
469
+ $module
470
+ .css('left' , '')
471
+ .css('top' , '')
472
+ .css('bottom' , '')
473
+ .removeClass(className.fixed)
474
+ .removeClass(className.top)
475
+ .addClass(className.bound)
476
+ .addClass(className.bottom)
477
+ ;
478
+ settings.onBottom.call(element);
479
+ settings.onUnstick.call(element);
480
+ },
481
+
482
+ setInitialPosition: function() {
483
+ module.unfix();
484
+ module.unbind();
485
+ },
486
+
487
+
488
+ fixTop: function() {
489
+ module.debug('Fixing element to top of page');
490
+ module.set.offset();
491
+ $module
492
+ .css('left', module.cache.element.left)
493
+ .removeClass(className.bound)
494
+ .removeClass(className.bottom)
495
+ .addClass(className.fixed)
496
+ .addClass(className.top)
497
+ ;
498
+ settings.onStick.call(element);
499
+ },
500
+
501
+ fixBottom: function() {
502
+ module.debug('Sticking element to bottom of page');
503
+ module.set.offset();
504
+ $module
505
+ .css('left', module.cache.element.left)
506
+ .removeClass(className.bound)
507
+ .removeClass(className.top)
508
+ .addClass(className.fixed)
509
+ .addClass(className.bottom)
510
+ ;
511
+ settings.onStick.call(element);
512
+ },
513
+
514
+ unbind: function() {
515
+ module.debug('Removing absolute position on element');
516
+ module.remove.offset();
517
+ $module
518
+ .removeClass(className.bound)
519
+ .removeClass(className.top)
520
+ .removeClass(className.bottom)
521
+ ;
522
+ },
523
+
524
+ unfix: function() {
525
+ module.debug('Removing fixed position on element');
526
+ module.remove.offset();
527
+ $module
528
+ .removeClass(className.fixed)
529
+ .removeClass(className.top)
530
+ .removeClass(className.bottom)
531
+ ;
532
+ settings.onUnstick.call(element);
533
+ },
534
+
535
+ reset: function() {
536
+ module.debug('Reseting elements position');
537
+ module.unbind();
538
+ module.unfix();
539
+ module.resetCSS();
540
+ },
541
+
542
+ resetCSS: function() {
543
+ $module
544
+ .css({
545
+ top : '',
546
+ bottom : '',
547
+ width : '',
548
+ height : ''
549
+ })
550
+ ;
551
+ $container
552
+ .css({
553
+ height: ''
554
+ })
555
+ ;
556
+ },
557
+
558
+ setting: function(name, value) {
559
+ if( $.isPlainObject(name) ) {
560
+ $.extend(true, settings, name);
561
+ }
562
+ else if(value !== undefined) {
563
+ settings[name] = value;
564
+ }
565
+ else {
566
+ return settings[name];
567
+ }
568
+ },
569
+ internal: function(name, value) {
570
+ if( $.isPlainObject(name) ) {
571
+ $.extend(true, module, name);
572
+ }
573
+ else if(value !== undefined) {
574
+ module[name] = value;
575
+ }
576
+ else {
577
+ return module[name];
578
+ }
579
+ },
580
+ debug: function() {
581
+ if(settings.debug) {
582
+ if(settings.performance) {
583
+ module.performance.log(arguments);
584
+ }
585
+ else {
586
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
587
+ module.debug.apply(console, arguments);
588
+ }
589
+ }
590
+ },
591
+ verbose: function() {
592
+ if(settings.verbose && settings.debug) {
593
+ if(settings.performance) {
594
+ module.performance.log(arguments);
595
+ }
596
+ else {
597
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
598
+ module.verbose.apply(console, arguments);
599
+ }
600
+ }
601
+ },
602
+ error: function() {
603
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
604
+ module.error.apply(console, arguments);
605
+ },
606
+ performance: {
607
+ log: function(message) {
608
+ var
609
+ currentTime,
610
+ executionTime,
611
+ previousTime
612
+ ;
613
+ if(settings.performance) {
614
+ currentTime = new Date().getTime();
615
+ previousTime = time || currentTime;
616
+ executionTime = currentTime - previousTime;
617
+ time = currentTime;
618
+ performance.push({
619
+ 'Name' : message[0],
620
+ 'Arguments' : [].slice.call(message, 1) || '',
621
+ 'Element' : element,
622
+ 'Execution Time' : executionTime
623
+ });
624
+ }
625
+ clearTimeout(module.performance.timer);
626
+ module.performance.timer = setTimeout(module.performance.display, 0);
627
+ },
628
+ display: function() {
629
+ var
630
+ title = settings.name + ':',
631
+ totalTime = 0
632
+ ;
633
+ time = false;
634
+ clearTimeout(module.performance.timer);
635
+ $.each(performance, function(index, data) {
636
+ totalTime += data['Execution Time'];
637
+ });
638
+ title += ' ' + totalTime + 'ms';
639
+ if(moduleSelector) {
640
+ title += ' \'' + moduleSelector + '\'';
641
+ }
642
+ if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
643
+ console.groupCollapsed(title);
644
+ if(console.table) {
645
+ console.table(performance);
646
+ }
647
+ else {
648
+ $.each(performance, function(index, data) {
649
+ console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
650
+ });
651
+ }
652
+ console.groupEnd();
653
+ }
654
+ performance = [];
655
+ }
656
+ },
657
+ invoke: function(query, passedArguments, context) {
658
+ var
659
+ object = instance,
660
+ maxDepth,
661
+ found,
662
+ response
663
+ ;
664
+ passedArguments = passedArguments || queryArguments;
665
+ context = element || context;
666
+ if(typeof query == 'string' && object !== undefined) {
667
+ query = query.split(/[\. ]/);
668
+ maxDepth = query.length - 1;
669
+ $.each(query, function(depth, value) {
670
+ var camelCaseValue = (depth != maxDepth)
671
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
672
+ : query
673
+ ;
674
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
675
+ object = object[camelCaseValue];
676
+ }
677
+ else if( object[camelCaseValue] !== undefined ) {
678
+ found = object[camelCaseValue];
679
+ return false;
680
+ }
681
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
682
+ object = object[value];
683
+ }
684
+ else if( object[value] !== undefined ) {
685
+ found = object[value];
686
+ return false;
687
+ }
688
+ else {
689
+ return false;
690
+ }
691
+ });
692
+ }
693
+ if ( $.isFunction( found ) ) {
694
+ response = found.apply(context, passedArguments);
695
+ }
696
+ else if(found !== undefined) {
697
+ response = found;
698
+ }
699
+ if($.isArray(returnedValue)) {
700
+ returnedValue.push(response);
701
+ }
702
+ else if(returnedValue !== undefined) {
703
+ returnedValue = [returnedValue, response];
704
+ }
705
+ else if(response !== undefined) {
706
+ returnedValue = response;
707
+ }
708
+ return found;
709
+ }
710
+ };
711
+
712
+ if(methodInvoked) {
713
+ if(instance === undefined) {
714
+ module.initialize();
715
+ }
716
+ module.invoke(query);
717
+ }
718
+ else {
719
+ if(instance !== undefined) {
720
+ module.destroy();
721
+ }
722
+ module.initialize();
723
+ }
724
+ })
725
+ ;
726
+
727
+ return (returnedValue !== undefined)
728
+ ? returnedValue
729
+ : this
730
+ ;
731
+ };
732
+
733
+ $.fn.sticky.settings = {
734
+
735
+ name : 'Sticky',
736
+ namespace : 'sticky',
737
+
738
+ debug : false,
739
+ verbose : false,
740
+ performance : false,
741
+
742
+ pushing : false,
743
+ context : false,
744
+ scrollContext : window,
745
+ offset : 0,
746
+ bottomOffset : 0,
747
+
748
+ observeChanges : true,
749
+
750
+ onReposition : function(){},
751
+ onScroll : function(){},
752
+ onStick : function(){},
753
+ onUnstick : function(){},
754
+ onTop : function(){},
755
+ onBottom : function(){},
756
+
757
+ error : {
758
+ container : 'Sticky element must be inside a relative container',
759
+ visible : 'Element is hidden, you must call refresh after element becomes visible',
760
+ method : 'The method you called is not defined.',
761
+ invalidContext : 'Context specified does not exist',
762
+ elementSize : 'Sticky element is larger than its container, cannot create sticky.'
763
+ },
764
+
765
+ className : {
766
+ bound : 'bound',
767
+ fixed : 'fixed',
768
+ supported : 'native',
769
+ top : 'top',
770
+ bottom : 'bottom'
771
+ }
772
+
773
+ };
774
+
775
+ })( jQuery, window , document );