virgo 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +37 -0
  4. data/app/assets/javascripts/tinymce/manifest.coffee +1 -0
  5. data/app/assets/javascripts/tinymce/plugins/image_manager/plugin.coffee +234 -0
  6. data/app/assets/javascripts/virgo/admin/page_modules/edit_form.coffee +4 -0
  7. data/app/assets/javascripts/virgo/admin/page_modules/edit_subject_form.coffee +29 -0
  8. data/app/assets/javascripts/virgo/admin/posts/edit_locking.coffee +35 -0
  9. data/app/assets/javascripts/virgo/admin/posts/form.coffee +183 -0
  10. data/app/assets/javascripts/virgo/admin/slides/form.coffee +27 -0
  11. data/app/assets/javascripts/virgo/admin/slideshows/form.coffee +26 -0
  12. data/app/assets/javascripts/virgo/admin_only.coffee +1 -0
  13. data/app/assets/javascripts/virgo/application.coffee +51 -0
  14. data/app/assets/javascripts/virgo/common.coffee +83 -0
  15. data/app/assets/javascripts/virgo/common/character_counter.coffee +27 -0
  16. data/app/assets/javascripts/virgo/components/header.coffee +47 -0
  17. data/app/assets/javascripts/virgo/components/media_modal.coffee +151 -0
  18. data/app/assets/javascripts/virgo/components/share_bar.coffee +53 -0
  19. data/app/assets/javascripts/virgo/components/slideshow.coffee +35 -0
  20. data/app/assets/javascripts/virgo/lib/jquery-ui-multiselect.js +342 -0
  21. data/app/assets/javascripts/virgo/lib/jquery.browser.js +184 -0
  22. data/app/assets/javascripts/virgo/lib/jquery.cookie.js +114 -0
  23. data/app/assets/javascripts/virgo/lib/jquery.pjax.js +932 -0
  24. data/app/assets/javascripts/virgo/lib/jquery_ext.coffee +0 -0
  25. data/app/assets/javascripts/virgo/lib/manifest.coffee +5 -0
  26. data/app/assets/javascripts/virgo/lib/ouibounce.js +194 -0
  27. data/app/assets/javascripts/virgo/page_modules.coffee +175 -0
  28. data/app/assets/javascripts/virgo/posts/show.coffee +32 -0
  29. data/app/assets/stylesheets/tinymce/skin.sass +2 -0
  30. data/app/assets/stylesheets/tinymce/skins/railspress/content.min.sass +82 -0
  31. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.eot +0 -0
  32. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.svg +62 -0
  33. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.ttf +0 -0
  34. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.woff +0 -0
  35. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.eot +0 -0
  36. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.svg +63 -0
  37. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.ttf +0 -0
  38. data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.woff +0 -0
  39. data/app/assets/stylesheets/tinymce/skins/railspress/img/anchor.gif +0 -0
  40. data/app/assets/stylesheets/tinymce/skins/railspress/img/loader.gif +0 -0
  41. data/app/assets/stylesheets/tinymce/skins/railspress/img/object.gif +0 -0
  42. data/app/assets/stylesheets/tinymce/skins/railspress/img/trans.gif +0 -0
  43. data/app/assets/stylesheets/tinymce/skins/railspress/skin.min.sass +1703 -0
  44. data/app/assets/stylesheets/virgo/_common.sass +65 -0
  45. data/app/assets/stylesheets/virgo/admin.sass +301 -0
  46. data/app/assets/stylesheets/virgo/admin/columns.sass +3 -0
  47. data/app/assets/stylesheets/virgo/admin/images.sass +14 -0
  48. data/app/assets/stylesheets/virgo/admin/media_modal.sass +72 -0
  49. data/app/assets/stylesheets/virgo/admin/post.sass +102 -0
  50. data/app/assets/stylesheets/virgo/admin/slideshow.sass +35 -0
  51. data/app/assets/stylesheets/virgo/admin/users.sass +2 -0
  52. data/app/assets/stylesheets/virgo/admin_only.sass +1 -0
  53. data/app/assets/stylesheets/virgo/application.sass +605 -0
  54. data/app/assets/stylesheets/virgo/columns.sass +51 -0
  55. data/app/assets/stylesheets/virgo/install.sass +15 -0
  56. data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-imports.sass +9 -0
  57. data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-overrides.sass +51 -0
  58. data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-variables.sass +27 -0
  59. data/app/assets/stylesheets/virgo/lib/jquery-ui-multiselect.css +30 -0
  60. data/app/assets/stylesheets/virgo/lib/manifest.sass +3 -0
  61. data/app/assets/stylesheets/virgo/lib/ouibounce.css +222 -0
  62. data/app/assets/stylesheets/virgo/lib/select2-imports.sass +8 -0
  63. data/app/assets/stylesheets/virgo/page_modules.sass +54 -0
  64. data/app/assets/stylesheets/virgo/pages/authors.sass +30 -0
  65. data/app/assets/stylesheets/virgo/posts.sass +782 -0
  66. data/app/assets/stylesheets/virgo/search.sass +36 -0
  67. data/app/assets/stylesheets/virgo/ui.sass +434 -0
  68. data/app/assets/stylesheets/virgo/users.sass +9 -0
  69. data/app/controllers/virgo/admin/base_controller.rb +22 -0
  70. data/app/controllers/virgo/admin/categories_controller.rb +90 -0
  71. data/app/controllers/virgo/admin/columns_controller.rb +65 -0
  72. data/app/controllers/virgo/admin/images_controller.rb +89 -0
  73. data/app/controllers/virgo/admin/media_modal_controller.rb +101 -0
  74. data/app/controllers/virgo/admin/newsletters_controller.rb +37 -0
  75. data/app/controllers/virgo/admin/page_modules_controller.rb +62 -0
  76. data/app/controllers/virgo/admin/pages_controller.rb +6 -0
  77. data/app/controllers/virgo/admin/posts_controller.rb +173 -0
  78. data/app/controllers/virgo/admin/sites_controller.rb +31 -0
  79. data/app/controllers/virgo/admin/slides_controller.rb +71 -0
  80. data/app/controllers/virgo/admin/slideshows_controller.rb +66 -0
  81. data/app/controllers/virgo/admin/tags_controller.rb +98 -0
  82. data/app/controllers/virgo/admin/users/sessions_controller.rb +21 -0
  83. data/app/controllers/virgo/admin/users_controller.rb +84 -0
  84. data/app/controllers/virgo/application_controller.rb +151 -0
  85. data/app/controllers/virgo/categories_controller.rb +20 -0
  86. data/app/controllers/virgo/columns_controller.rb +24 -0
  87. data/app/controllers/virgo/images_controller.rb +9 -0
  88. data/app/controllers/virgo/install_controller.rb +46 -0
  89. data/app/controllers/virgo/page_modules_controller.rb +23 -0
  90. data/app/controllers/virgo/pages_controller.rb +29 -0
  91. data/app/controllers/virgo/posts_controller.rb +101 -0
  92. data/app/controllers/virgo/search_controller.rb +35 -0
  93. data/app/controllers/virgo/subscribers_controller.rb +54 -0
  94. data/app/controllers/virgo/tags_controller.rb +15 -0
  95. data/app/controllers/virgo/users/confirmations_controller.rb +18 -0
  96. data/app/controllers/virgo/users/passwords_controller.rb +31 -0
  97. data/app/controllers/virgo/users/registrations_controller.rb +41 -0
  98. data/app/controllers/virgo/users/sessions_controller.rb +32 -0
  99. data/app/controllers/virgo/users_controller.rb +15 -0
  100. data/app/helpers/virgo/admin/post_helper.rb +54 -0
  101. data/app/helpers/virgo/admin_helper.rb +15 -0
  102. data/app/helpers/virgo/application_helper.rb +124 -0
  103. data/app/helpers/virgo/hooks_helper.rb +30 -0
  104. data/app/helpers/virgo/page_modules_helper.rb +4 -0
  105. data/app/helpers/virgo/post_helper.rb +159 -0
  106. data/app/helpers/virgo/render_helper.rb +33 -0
  107. data/app/helpers/virgo/search_helper.rb +49 -0
  108. data/app/helpers/virgo/shortcode_helper.rb +7 -0
  109. data/app/helpers/virgo/text_helper.rb +12 -0
  110. data/app/helpers/virgo/video_helper.rb +34 -0
  111. data/app/models/concerns/virgo/common/slug_history.rb +36 -0
  112. data/app/models/concerns/virgo/common/uuid.rb +22 -0
  113. data/app/models/concerns/virgo/post/recommendations.rb +15 -0
  114. data/app/models/concerns/virgo/post/search.rb +100 -0
  115. data/app/models/concerns/virgo/user/search.rb +39 -0
  116. data/app/models/virgo/ability.rb +59 -0
  117. data/app/models/virgo/category.rb +44 -0
  118. data/app/models/virgo/column.rb +25 -0
  119. data/app/models/virgo/form_model.rb +19 -0
  120. data/app/models/virgo/image.rb +63 -0
  121. data/app/models/virgo/page_module.rb +42 -0
  122. data/app/models/virgo/page_module_post.rb +8 -0
  123. data/app/models/virgo/post.rb +391 -0
  124. data/app/models/virgo/post_category.rb +8 -0
  125. data/app/models/virgo/post_search.rb +7 -0
  126. data/app/models/virgo/post_tag.rb +10 -0
  127. data/app/models/virgo/site.rb +36 -0
  128. data/app/models/virgo/slide.rb +23 -0
  129. data/app/models/virgo/slideshow.rb +37 -0
  130. data/app/models/virgo/slug_history.rb +5 -0
  131. data/app/models/virgo/subscriber.rb +5 -0
  132. data/app/models/virgo/tag.rb +34 -0
  133. data/app/models/virgo/user.rb +145 -0
  134. data/app/uploaders/virgo/application_uploader.rb +11 -0
  135. data/app/uploaders/virgo/avatar_uploader.rb +21 -0
  136. data/app/uploaders/virgo/featured_image_uploader.rb +28 -0
  137. data/app/uploaders/virgo/image_uploader.rb +40 -0
  138. data/app/uploaders/virgo/slide_uploader.rb +19 -0
  139. data/app/views/layouts/virgo/admin.haml +16 -0
  140. data/app/views/layouts/virgo/admin/site_settings.haml +14 -0
  141. data/app/views/layouts/virgo/application.haml +63 -0
  142. data/app/views/layouts/virgo/errors.haml +42 -0
  143. data/app/views/layouts/virgo/main.haml +5 -0
  144. data/app/views/layouts/virgo/posts.haml +10 -0
  145. data/app/views/virgo/admin/categories/_form.haml +19 -0
  146. data/app/views/virgo/admin/categories/edit.haml +7 -0
  147. data/app/views/virgo/admin/categories/index.haml +38 -0
  148. data/app/views/virgo/admin/categories/modal_form.haml +11 -0
  149. data/app/views/virgo/admin/categories/new.haml +7 -0
  150. data/app/views/virgo/admin/categories/success_modal.haml +14 -0
  151. data/app/views/virgo/admin/columns/_form.haml +30 -0
  152. data/app/views/virgo/admin/columns/edit.haml +1 -0
  153. data/app/views/virgo/admin/columns/index.haml +30 -0
  154. data/app/views/virgo/admin/columns/new.haml +1 -0
  155. data/app/views/virgo/admin/images/_form.haml +46 -0
  156. data/app/views/virgo/admin/images/edit.haml +1 -0
  157. data/app/views/virgo/admin/images/index.haml +32 -0
  158. data/app/views/virgo/admin/images/new.haml +1 -0
  159. data/app/views/virgo/admin/media_modal/_image_settings.haml +17 -0
  160. data/app/views/virgo/admin/media_modal/_library_panel.haml +26 -0
  161. data/app/views/virgo/admin/media_modal/_upload_panel.haml +21 -0
  162. data/app/views/virgo/admin/media_modal/_upload_success.haml +7 -0
  163. data/app/views/virgo/admin/media_modal/index.haml +19 -0
  164. data/app/views/virgo/admin/newsletters/changelog.haml +25 -0
  165. data/app/views/virgo/admin/newsletters/edit.haml +6 -0
  166. data/app/views/virgo/admin/page_modules/edit.haml +33 -0
  167. data/app/views/virgo/admin/page_modules/edit_subject.haml +43 -0
  168. data/app/views/virgo/admin/pages/help.haml +114 -0
  169. data/app/views/virgo/admin/posts/_author_dropdown.haml +1 -0
  170. data/app/views/virgo/admin/posts/_categories_form.haml +7 -0
  171. data/app/views/virgo/admin/posts/_category.haml +22 -0
  172. data/app/views/virgo/admin/posts/_form.haml +201 -0
  173. data/app/views/virgo/admin/posts/_revisions.haml +40 -0
  174. data/app/views/virgo/admin/posts/edit.haml +9 -0
  175. data/app/views/virgo/admin/posts/index.haml +59 -0
  176. data/app/views/virgo/admin/posts/new.haml +1 -0
  177. data/app/views/virgo/admin/posts/revision_detail.haml +28 -0
  178. data/app/views/virgo/admin/posts/revisions.haml +3 -0
  179. data/app/views/virgo/admin/sites/edit.haml +12 -0
  180. data/app/views/virgo/admin/slides/_form.haml +41 -0
  181. data/app/views/virgo/admin/slides/edit.haml +1 -0
  182. data/app/views/virgo/admin/slides/new.haml +1 -0
  183. data/app/views/virgo/admin/slideshows/_form.haml +49 -0
  184. data/app/views/virgo/admin/slideshows/edit.haml +1 -0
  185. data/app/views/virgo/admin/slideshows/index.haml +43 -0
  186. data/app/views/virgo/admin/slideshows/new.haml +1 -0
  187. data/app/views/virgo/admin/tags/_form.haml +16 -0
  188. data/app/views/virgo/admin/tags/edit.haml +7 -0
  189. data/app/views/virgo/admin/tags/index.haml +33 -0
  190. data/app/views/virgo/admin/tags/modal_form.haml +12 -0
  191. data/app/views/virgo/admin/tags/new.haml +7 -0
  192. data/app/views/virgo/admin/tags/success_modal.haml +14 -0
  193. data/app/views/virgo/admin/users/_form.haml +62 -0
  194. data/app/views/virgo/admin/users/edit.haml +1 -0
  195. data/app/views/virgo/admin/users/index.haml +34 -0
  196. data/app/views/virgo/admin/users/new.haml +1 -0
  197. data/app/views/virgo/application/sitemap.xml.builder +0 -0
  198. data/app/views/virgo/authors/_profile_long.haml +13 -0
  199. data/app/views/virgo/authors/_profile_short.haml +10 -0
  200. data/app/views/virgo/categories/show.haml +24 -0
  201. data/app/views/virgo/columns/index.haml +19 -0
  202. data/app/views/virgo/columns/show.haml +18 -0
  203. data/app/views/virgo/common/_admin_navbar.haml +100 -0
  204. data/app/views/virgo/common/_alerts.haml +40 -0
  205. data/app/views/virgo/common/_analytics.html.erb +1 -0
  206. data/app/views/virgo/common/_base_errors.haml +8 -0
  207. data/app/views/virgo/common/_category_heading.haml +26 -0
  208. data/app/views/virgo/common/_disqus.html.erb +24 -0
  209. data/app/views/virgo/common/_disqus_comment_count.html.erb +12 -0
  210. data/app/views/virgo/common/_fb_api.html.erb +30 -0
  211. data/app/views/virgo/common/_fonts.html.erb +1 -0
  212. data/app/views/virgo/common/_footer.haml +13 -0
  213. data/app/views/virgo/common/_footer_javascript.html.erb +0 -0
  214. data/app/views/virgo/common/_header_analytics.html.erb +9 -0
  215. data/app/views/virgo/common/_list_signup.haml +20 -0
  216. data/app/views/virgo/common/_ouibounce_modal.haml +26 -0
  217. data/app/views/virgo/common/_public_nav.haml +58 -0
  218. data/app/views/virgo/common/_search_form.haml +8 -0
  219. data/app/views/virgo/common/_share_bar.haml +45 -0
  220. data/app/views/virgo/common/_user_vars.haml +2 -0
  221. data/app/views/virgo/errors/404.haml +10 -0
  222. data/app/views/virgo/errors/500.haml +10 -0
  223. data/app/views/virgo/images/_shortcode.haml +4 -0
  224. data/app/views/virgo/install/index.haml +58 -0
  225. data/app/views/virgo/install/success.haml +12 -0
  226. data/app/views/virgo/page_modules/_latest_posts.haml +29 -0
  227. data/app/views/virgo/page_modules/_popular_posts.haml +51 -0
  228. data/app/views/virgo/pages/authors.haml +8 -0
  229. data/app/views/virgo/pages/home.haml +0 -0
  230. data/app/views/virgo/pages/show.haml +6 -0
  231. data/app/views/virgo/posts/_author_info.haml +16 -0
  232. data/app/views/virgo/posts/_post_full.haml +63 -0
  233. data/app/views/virgo/posts/_post_short.haml +30 -0
  234. data/app/views/virgo/posts/_post_thumb_box.haml +13 -0
  235. data/app/views/virgo/posts/_recommendations.haml +12 -0
  236. data/app/views/virgo/posts/_sidebar_thumb.haml +4 -0
  237. data/app/views/virgo/posts/index.haml +22 -0
  238. data/app/views/virgo/posts/latest.haml +16 -0
  239. data/app/views/virgo/posts/more.haml +10 -0
  240. data/app/views/virgo/posts/rss.xml.builder +17 -0
  241. data/app/views/virgo/posts/show.haml +17 -0
  242. data/app/views/virgo/search/_form.haml +5 -0
  243. data/app/views/virgo/search/_item.haml +22 -0
  244. data/app/views/virgo/search/index.haml +11 -0
  245. data/app/views/virgo/search/new.haml +4 -0
  246. data/app/views/virgo/shortcode_templates/blockquote.haml +9 -0
  247. data/app/views/virgo/shortcode_templates/h1.haml +1 -0
  248. data/app/views/virgo/shortcode_templates/h2.haml +1 -0
  249. data/app/views/virgo/shortcode_templates/h3.haml +1 -0
  250. data/app/views/virgo/shortcode_templates/h4.haml +1 -0
  251. data/app/views/virgo/shortcode_templates/image.haml +17 -0
  252. data/app/views/virgo/shortcode_templates/pullquote.haml +3 -0
  253. data/app/views/virgo/shortcode_templates/slideshow.haml +35 -0
  254. data/app/views/virgo/shortcode_templates/tweet.haml +3 -0
  255. data/app/views/virgo/shortcode_templates/video.haml +8 -0
  256. data/app/views/virgo/subscribers/_success_modal.haml +13 -0
  257. data/app/views/virgo/subscribers/modal.haml +15 -0
  258. data/app/views/virgo/tags/show.haml +16 -0
  259. data/app/views/virgo/users/confirmations/new.html.haml +10 -0
  260. data/app/views/virgo/users/devise_mailer/confirmation_instructions.html.erb +7 -0
  261. data/app/views/virgo/users/devise_mailer/reset_password_instructions.html.haml +6 -0
  262. data/app/views/virgo/users/devise_mailer/unlock_instructions.html.haml +5 -0
  263. data/app/views/virgo/users/passwords/edit.html.haml +14 -0
  264. data/app/views/virgo/users/passwords/new.html.haml +14 -0
  265. data/app/views/virgo/users/registrations/edit.html.haml +30 -0
  266. data/app/views/virgo/users/registrations/new.html.haml +13 -0
  267. data/app/views/virgo/users/sessions/new.html.haml +12 -0
  268. data/app/views/virgo/users/shared/_links.haml +26 -0
  269. data/app/views/virgo/users/show.haml +11 -0
  270. data/app/views/virgo/users/unlocks/new.html.haml +9 -0
  271. data/config/initializers/action_mailer.rb +7 -0
  272. data/config/initializers/active_record.rb +72 -0
  273. data/config/initializers/active_record_symbolize.rb +18 -0
  274. data/config/initializers/assets.rb +17 -0
  275. data/config/initializers/backtrace_silencers.rb +7 -0
  276. data/config/initializers/carrierwave.rb +36 -0
  277. data/config/initializers/cookies_serializer.rb +3 -0
  278. data/config/initializers/devise.rb +257 -0
  279. data/config/initializers/filter_parameter_logging.rb +4 -0
  280. data/config/initializers/hash.rb +5 -0
  281. data/config/initializers/inflections.rb +16 -0
  282. data/config/initializers/mime_types.rb +4 -0
  283. data/config/initializers/nil_class.rb +13 -0
  284. data/config/initializers/non_digest_assets.rb +3 -0
  285. data/config/initializers/paper_trail.rb +30 -0
  286. data/config/initializers/schema_plus.rb +5 -0
  287. data/config/initializers/session_store.rb +3 -0
  288. data/config/initializers/shortcode.rb +12 -0
  289. data/config/initializers/simple_form.rb +170 -0
  290. data/config/initializers/simple_form_bootstrap.rb +136 -0
  291. data/config/initializers/string.rb +5 -0
  292. data/config/initializers/time_formatting.rb +23 -0
  293. data/config/initializers/wrap_parameters.rb +14 -0
  294. data/config/locales/devise.en.yml +60 -0
  295. data/config/routes.rb +96 -0
  296. data/config/schedule.rb +3 -0
  297. data/db/migrate/20150729174510_create_virgo_schema.rb +225 -0
  298. data/lib/generators/virgo/install/install_generator.rb +16 -0
  299. data/lib/generators/virgo/views/views_generator.rb +22 -0
  300. data/lib/tasks/virgo_tasks.rake +7 -0
  301. data/lib/virgo.rb +4 -0
  302. data/lib/virgo/development_mail_interceptor.rb +6 -0
  303. data/lib/virgo/email_validator.rb +6 -0
  304. data/lib/virgo/engine.rb +73 -0
  305. data/lib/virgo/reduce_validator.rb +6 -0
  306. data/lib/virgo/upload_helpers.rb +89 -0
  307. data/lib/virgo/version.rb +3 -0
  308. data/lib/virgo/view_help.rb +3 -0
  309. metadata +1051 -0
@@ -0,0 +1,5 @@
1
+ #= require ./jquery.pjax
2
+ #= require ./jquery.cookie
3
+ #= require ./jquery_ext
4
+ #= require ./jquery.browser
5
+ #= require ./ouibounce
@@ -0,0 +1,194 @@
1
+
2
+
3
+ (function(root, factory) {
4
+ if (typeof define === 'function' && define.amd) {
5
+ define(factory);
6
+ } else if (typeof exports === 'object') {
7
+ module.exports = factory(require,exports,module);
8
+ } else {
9
+ root.ouibounce = factory();
10
+ }
11
+ }(this, function(require,exports,module) {
12
+
13
+ return function ouibounce(el, custom_config) {
14
+ "use strict";
15
+
16
+ var config = custom_config || {},
17
+ aggressive = config.aggressive || false,
18
+ sensitivity = setDefault(config.sensitivity, 20),
19
+ timer = setDefault(config.timer, 1000),
20
+ delay = setDefault(config.delay, 0),
21
+ callback = config.callback || function() {},
22
+ cookieExpire = setDefaultCookieExpire(config.cookieExpire) || '',
23
+ cookieDomain = config.cookieDomain ? ';domain=' + config.cookieDomain : '',
24
+ cookieName = config.cookieName ? config.cookieName : 'viewedOuibounceModal',
25
+ sitewide = config.sitewide === true ? ';path=/' : '',
26
+ _delayTimer = null,
27
+ _mobileIdleThreshold = config.mobileIdleThreshold || 10000,
28
+ _mobileScrollThreshold = config.mobileScrollThreshold || 50.0,
29
+ _mobileIdleTimeout = null,
30
+ _html = document.documentElement;
31
+
32
+ $(document).bind("ouibounceSignupOccurred", recordSignup);
33
+
34
+ function setDefault(_property, _default) {
35
+ return typeof _property === 'undefined' ? _default : _property;
36
+ }
37
+
38
+ function mobileCheck(){
39
+ var check = false;
40
+ (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
41
+ return check;
42
+ }
43
+
44
+ function recordSignup(){
45
+ $.cookie("ouibounceSignupOccurred", "true");
46
+ }
47
+
48
+ function scrollProgress() {
49
+ return ($(document).scrollTop()/$(document).height()*100.0);
50
+ }
51
+
52
+ function setDefaultCookieExpire(days) {
53
+ // transform days to milliseconds
54
+ var ms = days*24*60*60*1000;
55
+
56
+ var date = new Date();
57
+ date.setTime(date.getTime() + ms);
58
+
59
+ return "; expires=" + date.toUTCString();
60
+ }
61
+
62
+ function handleMobileScroll() {
63
+ if(scrollProgress() >= _mobileScrollThreshold){
64
+ fire()
65
+ };
66
+
67
+ if(_mobileIdleTimeout) {
68
+ clearTimeout(_mobileIdleTimeout);
69
+ };
70
+
71
+ _mobileIdleTimeout = setTimeout(function(){
72
+ fire();
73
+ }, _mobileIdleThreshold);
74
+ }
75
+
76
+ setTimeout(attachOuiBounce, timer);
77
+ function attachOuiBounce() {
78
+ if (isDisabled()) { return; }
79
+
80
+ if (!mobileCheck()) {
81
+ _html.addEventListener('mouseleave', handleMouseleave);
82
+ } else {
83
+ $(window).scroll(handleMobileScroll);
84
+ }
85
+ _html.addEventListener('mouseenter', handleMouseenter);
86
+ _html.addEventListener('keydown', handleKeydown);
87
+ }
88
+
89
+ function handleMouseleave(e) {
90
+ if (e.clientY > sensitivity) { return; }
91
+
92
+ _delayTimer = setTimeout(fire, delay);
93
+ }
94
+
95
+ function handleMouseenter() {
96
+ if (_delayTimer) {
97
+ clearTimeout(_delayTimer);
98
+ _delayTimer = null;
99
+ }
100
+ }
101
+
102
+ var disableKeydown = false;
103
+ function handleKeydown(e) {
104
+ if (disableKeydown) { return; }
105
+ else if(!e.metaKey || e.keyCode !== 76) { return; }
106
+
107
+ disableKeydown = true;
108
+ _delayTimer = setTimeout(fire, delay);
109
+ }
110
+
111
+ function checkCookieValue(cookieName, value) {
112
+ return parseCookies()[cookieName] === value;
113
+ }
114
+
115
+ function parseCookies() {
116
+ // cookies are separated by '; '
117
+ var cookies = document.cookie.split('; ');
118
+
119
+ var ret = {};
120
+ for (var i = cookies.length - 1; i >= 0; i--) {
121
+ var el = cookies[i].split('=');
122
+ ret[el[0]] = el[1];
123
+ }
124
+ return ret;
125
+ }
126
+
127
+ function isDisabled() {
128
+ // ! important! - we are temporarily ONLY going to show these on mobile
129
+ if (!mobileCheck()){
130
+ return true;
131
+ }
132
+
133
+ return checkCookieValue(cookieName, 'true') && !aggressive && !(window.app_env == "production" && $.cookie("ouibounceSignupOccurred") == "true");
134
+ }
135
+
136
+ // You can use ouibounce without passing an element
137
+ // https://github.com/carlsednaoui/ouibounce/issues/30
138
+ function fire() {
139
+ if (isDisabled()) { return; }
140
+
141
+ if (el) { el.style.display = 'block'; }
142
+
143
+ callback();
144
+ disable();
145
+ }
146
+
147
+ function disable(custom_options) {
148
+ var options = custom_options || {};
149
+
150
+ // you can pass a specific cookie expiration when using the OuiBounce API
151
+ // ex: _ouiBounce.disable({ cookieExpire: 5 });
152
+ if (typeof options.cookieExpire !== 'undefined') {
153
+ cookieExpire = setDefaultCookieExpire(options.cookieExpire);
154
+ }
155
+
156
+ // you can pass use sitewide cookies too
157
+ // ex: _ouiBounce.disable({ cookieExpire: 5, sitewide: true });
158
+ if (options.sitewide === true) {
159
+ sitewide = ';path=/';
160
+ }
161
+
162
+ // you can pass a domain string when the cookie should be read subdomain-wise
163
+ // ex: _ouiBounce.disable({ cookieDomain: '.example.com' });
164
+ if (typeof options.cookieDomain !== 'undefined') {
165
+ cookieDomain = ';domain=' + options.cookieDomain;
166
+ }
167
+
168
+ if (typeof options.cookieName !== 'undefined') {
169
+ cookieName = options.cookieName;
170
+ }
171
+
172
+ document.cookie = cookieName + '=true' + cookieExpire + cookieDomain + sitewide;
173
+
174
+ // remove listeners
175
+ if (!mobileCheck()) {
176
+ _html.removeEventListener('mouseleave', handleMouseleave);
177
+ } else{
178
+
179
+ }
180
+ _html.removeEventListener('mouseenter', handleMouseenter);
181
+ _html.removeEventListener('keydown', handleKeydown);
182
+ }
183
+
184
+ return {
185
+ fire: fire,
186
+ disable: disable,
187
+ isDisabled: isDisabled
188
+ };
189
+ }
190
+
191
+ /*exported ouibounce */
192
+ ;
193
+
194
+ }));
@@ -0,0 +1,175 @@
1
+ class PostThumbs
2
+ constructor: ->
3
+ @bind_events()
4
+
5
+ bind_events: =>
6
+ # $('body').on 'click', '.post-thumb-box', (e) =>
7
+ # $link = $(e.currentTarget)
8
+ # window.location = $link.attr('data-post-url')
9
+
10
+ # $(window).resize @position_overlays
11
+
12
+ # @position_overlays()
13
+
14
+ # $('.post-thumb-box').hover (e) =>
15
+ # @raise_thumb_overlay($(e.currentTarget))
16
+ # , (e) =>
17
+ # @lower_thumb_overlay($(e.currentTarget))
18
+
19
+ # $('.post-thumb-content').css('visibility', 'visible')
20
+
21
+ position_overlays: =>
22
+ self = @ # b/c $.fn.each does not pass an "event" arg
23
+
24
+ $('.post-thumb-box').each ->
25
+ self.lower_thumb_overlay($(this))
26
+
27
+ lower_thumb_overlay: (thumb) =>
28
+ $content = thumb.find('.post-thumb-content')
29
+ $heading = thumb.find('.post-thumb-headline')
30
+ top_offset = thumb.outerHeight() - $heading.outerHeight()
31
+ $content.css('min-height', "#{thumb.height()}px")
32
+ $content.css('top', "#{top_offset}px")
33
+ thumb.removeClass('expanded')
34
+
35
+ raise_thumb_overlay: (thumb) =>
36
+ thumb.addClass('expanded')
37
+
38
+
39
+ $ -> new PostThumbs if $('.post-thumb-box').length
40
+
41
+ class PopularPosts
42
+ constructor: ->
43
+ @bind_events()
44
+ @fetch_content()
45
+
46
+ bind_events: =>
47
+ $('body').on 'click', '.popular-posts-tabs a', (e) =>
48
+ e.preventDefault()
49
+
50
+ $link = $(e.currentTarget)
51
+
52
+ $(".most-popular-posts-loading-overlay").fadeIn(150)
53
+
54
+ $.get $link.attr('data-uri'), (response) =>
55
+ $(".most-popular-posts-box").html($(response.html).html())
56
+ $(".most-popular-posts-loading-overlay").fadeOut(150)
57
+
58
+
59
+ $('body').on 'click', '.popular-more-link, .popular-prev-link', (e) =>
60
+ e.preventDefault()
61
+
62
+ $link = $(e.currentTarget)
63
+
64
+ if $link.hasClass('last-page')
65
+ return false
66
+
67
+ $(".most-popular-posts-loading-overlay").fadeIn(150)
68
+
69
+ $.get $link.attr('href'), (response) =>
70
+ $(".most-popular-posts-box").html($(response.html).html())
71
+ $(".most-popular-posts-loading-overlay").fadeOut(150)
72
+
73
+ fetch_content: =>
74
+ $box = $(".js-popular-posts-box")
75
+
76
+ $.get $box.attr("data-uri"), (response) =>
77
+ $box.html($(response.html).html())
78
+
79
+
80
+
81
+ $ -> new PopularPosts if $('.popular-post').length
82
+
83
+
84
+ class LatestPosts
85
+ constructor: ->
86
+ $('body').on 'click', '.js-load-posts', @load_more
87
+ @loading = false
88
+
89
+ load_more: (e) =>
90
+ e.preventDefault()
91
+ $btn = $(e.currentTarget)
92
+ $btn.button('loading')
93
+
94
+ if !@loading
95
+ @loading = true
96
+
97
+ $.get $btn.attr('data-uri'), (response) =>
98
+ $btn.parent().remove()
99
+ $(".latest-posts").append(response.html)
100
+ @loading = false
101
+
102
+ $ -> new LatestPosts if $('.latest-posts-box').length
103
+
104
+ class ListSignup
105
+ constructor: ->
106
+ $('body').on 'submit', '#list-signup-form, #header-signup-form, #ouibounce-list-signup-form', @submit
107
+
108
+ $('body').on 'hidden.bs.modal', '#subscriber-success-modal', ->
109
+ $(this).data('bs.modal', null)
110
+ $(this).remove()
111
+ $(".email-input").val("")
112
+
113
+ submit: (e) =>
114
+ e.preventDefault()
115
+
116
+ $form = $(e.currentTarget)
117
+ $wrap = $form.parent()
118
+
119
+ $form.find(".sign-up-btn").button('loading')
120
+ $form.find(".email-input").prop('disabled', true)
121
+
122
+ $.post $form.attr('action'), {subscriber: {email: $form.find(".email-input").val()}}, (response) =>
123
+ $form.find(".sign-up-btn").button('reset')
124
+ $form.find(".email-input").prop('disabled', false)
125
+ if response.status == 'success'
126
+ $wrap.find(".list-signup-message.info").hide()
127
+ $wrap.find('.list-signup-message.error').hide()
128
+ $wrap.find('.list-signup-message.success').show()
129
+ $wrap.parent().find('.js-ouibounce-footer-button').html("Continue to Site.")
130
+
131
+ if $wrap.hasClass("ouibounce-modal-body")
132
+ source = "ouibounce-modal"
133
+ else if $wrap.hasClass("sticky-signup-form")
134
+ source = "header-form"
135
+ else
136
+ source = "footer-form"
137
+
138
+ $(document).trigger("ouibounceSignupOccurred")
139
+ if window.analytics?
140
+ window.analytics.track('email_signup', {
141
+ email: $(".email-input").val(),
142
+ signupSource: source
143
+ })
144
+ else
145
+ $wrap.find('.list-signup-message.error').html(response.message).show()
146
+
147
+
148
+ $ -> new ListSignup if $('.list-signup').length
149
+
150
+
151
+ class ColumnFocus
152
+ constructor: ->
153
+ $('.column-box').click ->
154
+ window.location = $(this).attr('data-uri')
155
+
156
+ $ -> new ColumnFocus if $('.column-box').length
157
+
158
+
159
+ # class CategoryFocus
160
+ # constructor: ->
161
+ # $(window).resize @resize_boxes
162
+ # @resize_boxes()
163
+
164
+ # resize_boxes: ->
165
+ # max_box = {}
166
+
167
+ # $('.category-box').each ->
168
+ # if !max_box['height'] || max_box['height'] < $(this).height()
169
+ # max_box['height'] = $(this).height()
170
+ # max_box['element'] = this
171
+
172
+ # $('.category-box').not(max_box['element']).each ->
173
+ # $(this).height(max_box['height'])
174
+
175
+ # $ -> new CategoryFocus if $('.category-box').length
@@ -0,0 +1,32 @@
1
+ class PostShow
2
+ constructor: ->
3
+ @convert_videos_to_responsive()
4
+ @track()
5
+
6
+ convert_videos_to_responsive: =>
7
+ self = this
8
+
9
+ $(".post-body iframe").each ->
10
+ $iframe = $(this)
11
+
12
+ if self.is_video_embed_url($iframe.attr('src'))
13
+ $wrapper = $("<div class='embed-responsive embed-responsive-16by9 video-embed-wrap'></div>")
14
+ $iframe.removeAttr("width").removeAttr("height").addClass("embed-responsive-item video-embed")
15
+ $iframe.wrap($wrapper)
16
+
17
+
18
+
19
+ is_video_embed_url: (url) =>
20
+ provider = url.match(/https?:\/\/(:?www.)?(\w*)/)[2]
21
+
22
+ if provider == 'youtube' or provider == 'vimeo' or provider == 'player' or provider == 'youtu.be'
23
+ return true
24
+
25
+ false
26
+
27
+ track: =>
28
+ setTimeout ->
29
+ $.get $(".post").attr("data-tracking-uri")
30
+ , 500
31
+
32
+ window.PostShow = PostShow
@@ -0,0 +1,2 @@
1
+ .editor-wrap
2
+ margin-top: 24px
@@ -0,0 +1,82 @@
1
+ body
2
+ background-color: #FFF
3
+ color: #000
4
+ font-family: Verdana, Arial, Helvetica, sans-serif
5
+ font-size: 14px
6
+ scrollbar-3dlight-color: #F0F0EE
7
+ scrollbar-arrow-color: #676662
8
+ scrollbar-base-color: #F0F0EE
9
+ scrollbar-darkshadow-color: #DDD
10
+ scrollbar-face-color: #E0E0DD
11
+ scrollbar-highlight-color: #F0F0EE
12
+ scrollbar-shadow-color: #F0F0EE
13
+ scrollbar-track-color: #F5F5F5
14
+
15
+ td, th
16
+ font-family: Verdana, Arial, Helvetica, sans-serif
17
+ font-size: 11px
18
+
19
+ .mce-object
20
+ border: 1px dotted #3A3A3A
21
+ background: #d5d5d5 url(img/object.gif) no-repeat center
22
+
23
+ .mce-pagebreak
24
+ cursor: default
25
+ display: block
26
+ border: 0
27
+ width: 100%
28
+ height: 5px
29
+ border: 1px dashed #666
30
+ margin-top: 15px
31
+ page-break-before: always
32
+
33
+ @media print
34
+ .mce-pagebreak
35
+ border: 0
36
+
37
+ .mce-item-anchor
38
+ cursor: default
39
+ display: inline-block
40
+ -webkit-user-select: all
41
+ -webkit-user-modify: read-only
42
+ -moz-user-select: all
43
+ -moz-user-modify: read-only
44
+ user-select: all
45
+ user-modify: read-only
46
+ width: 9px !important
47
+ height: 9px !important
48
+ border: 1px dotted #3A3A3A
49
+ background: #d5d5d5 url(img/anchor.gif) no-repeat center
50
+
51
+ .mce-nbsp
52
+ background: #AAA
53
+
54
+ hr
55
+ cursor: default
56
+
57
+ .mce-match-marker
58
+ background: #AAA
59
+ color: #fff
60
+
61
+ .mce-match-marker-selected
62
+ background: #39f
63
+ color: #fff
64
+
65
+ .mce-spellchecker-word
66
+ border-bottom: 2px solid red
67
+ cursor: default
68
+
69
+ .mce-spellchecker-grammar
70
+ border-bottom: 2px solid green
71
+ cursor: default
72
+
73
+ .mce-item-table
74
+ border: 1px dashed #BBB
75
+ td, th, caption
76
+ border: 1px dashed #BBB
77
+
78
+ td.mce-item-selected, th.mce-item-selected
79
+ background-color: #39f !important
80
+
81
+ .mce-edit-focus
82
+ outline: 1px dotted #333