publify_core 9.0.0.pre5 → 9.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of publify_core might be problematic. Click here for more details.

Files changed (395) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +102 -6
  3. data/README.md +9 -0
  4. data/app/assets/javascripts/bootstrap-sprockets.js +8 -0
  5. data/app/assets/javascripts/bootstrap/affix.js +164 -0
  6. data/app/assets/javascripts/bootstrap/alert.js +95 -0
  7. data/app/assets/javascripts/bootstrap/button.js +125 -0
  8. data/app/assets/javascripts/bootstrap/collapse.js +212 -0
  9. data/app/assets/javascripts/bootstrap/dropdown.js +165 -0
  10. data/app/assets/javascripts/bootstrap/modal.js +358 -0
  11. data/app/assets/javascripts/bootstrap/tab.js +155 -0
  12. data/app/assets/javascripts/bootstrap/transition.js +59 -0
  13. data/app/assets/javascripts/lightbox.js +4 -4
  14. data/app/assets/javascripts/publify_admin.js +1 -35
  15. data/app/assets/stylesheets/_bootstrap-compass.scss +9 -0
  16. data/app/assets/stylesheets/_bootstrap-mincer.scss +19 -0
  17. data/app/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
  18. data/app/assets/stylesheets/_bootstrap.scss +42 -0
  19. data/app/assets/stylesheets/administration_structure.css.scss +1 -45
  20. data/app/assets/stylesheets/bootstrap/_alerts.scss +73 -0
  21. data/app/assets/stylesheets/bootstrap/_button-groups.scss +242 -0
  22. data/app/assets/stylesheets/bootstrap/_buttons.scss +168 -0
  23. data/app/assets/stylesheets/bootstrap/_close.scss +37 -0
  24. data/app/assets/stylesheets/bootstrap/_code.scss +69 -0
  25. data/app/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
  26. data/app/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
  27. data/app/assets/stylesheets/bootstrap/_forms.scss +586 -0
  28. data/app/assets/stylesheets/bootstrap/_grid.scss +94 -0
  29. data/app/assets/stylesheets/bootstrap/_labels.scss +66 -0
  30. data/app/assets/stylesheets/bootstrap/_media.scss +66 -0
  31. data/app/assets/stylesheets/bootstrap/_mixins.scss +37 -0
  32. data/app/assets/stylesheets/bootstrap/_modals.scss +150 -0
  33. data/app/assets/stylesheets/bootstrap/_navbar.scss +479 -0
  34. data/app/assets/stylesheets/bootstrap/_navs.scss +242 -0
  35. data/app/assets/stylesheets/bootstrap/_normalize.scss +427 -0
  36. data/app/assets/stylesheets/bootstrap/_pagination.scss +86 -0
  37. data/app/assets/stylesheets/bootstrap/_panels.scss +222 -0
  38. data/app/assets/stylesheets/bootstrap/_print.scss +99 -0
  39. data/app/assets/stylesheets/bootstrap/_scaffolding.scss +160 -0
  40. data/app/assets/stylesheets/bootstrap/_tables.scss +234 -0
  41. data/app/assets/stylesheets/bootstrap/_theme.scss +224 -0
  42. data/app/assets/stylesheets/bootstrap/_type.scss +296 -0
  43. data/app/assets/stylesheets/bootstrap/_utilities.scss +55 -0
  44. data/app/assets/stylesheets/bootstrap/_variables.scss +638 -0
  45. data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
  46. data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
  47. data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
  48. data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  49. data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +56 -0
  50. data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  51. data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  52. data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +82 -0
  53. data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
  54. data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  55. data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  56. data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  57. data/app/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
  58. data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  59. data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  60. data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  61. data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
  62. data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  63. data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +20 -0
  64. data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  65. data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  66. data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
  67. data/app/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  68. data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  69. data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  70. data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  71. data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  72. data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  73. data/app/assets/stylesheets/lightbox.css +3 -3
  74. data/app/assets/stylesheets/publify_admin.css.scss +0 -1
  75. data/app/controllers/accounts_controller.rb +2 -0
  76. data/app/controllers/admin/base_controller.rb +8 -22
  77. data/app/controllers/admin/content_controller.rb +69 -48
  78. data/app/controllers/admin/dashboard_controller.rb +20 -74
  79. data/app/controllers/admin/feedback_controller.rb +45 -36
  80. data/app/controllers/admin/notes_controller.rb +16 -10
  81. data/app/controllers/admin/pages_controller.rb +20 -34
  82. data/app/controllers/admin/post_types_controller.rb +7 -5
  83. data/app/controllers/admin/profiles_controller.rb +15 -5
  84. data/app/controllers/admin/redirects_controller.rb +9 -5
  85. data/app/controllers/admin/resources_controller.rb +7 -4
  86. data/app/controllers/admin/seo_controller.rb +12 -10
  87. data/app/controllers/admin/settings_controller.rb +7 -5
  88. data/app/controllers/admin/sidebar_controller.rb +7 -5
  89. data/app/controllers/admin/tags_controller.rb +7 -3
  90. data/app/controllers/admin/themes_controller.rb +10 -7
  91. data/app/controllers/admin/users_controller.rb +10 -7
  92. data/app/controllers/articles_controller.rb +92 -81
  93. data/app/controllers/authors_controller.rb +6 -3
  94. data/app/controllers/base_controller.rb +9 -11
  95. data/app/controllers/comments_controller.rb +15 -16
  96. data/app/controllers/content_controller.rb +12 -19
  97. data/app/controllers/feedback_controller.rb +7 -39
  98. data/app/controllers/notes_controller.rb +6 -6
  99. data/app/controllers/setup_controller.rb +25 -26
  100. data/app/controllers/tags_controller.rb +16 -16
  101. data/app/controllers/text_controller.rb +2 -4
  102. data/app/controllers/textfilter_controller.rb +2 -0
  103. data/app/controllers/theme_controller.rb +22 -17
  104. data/app/controllers/xml_controller.rb +13 -59
  105. data/app/helpers/admin/base_helper.rb +28 -29
  106. data/app/helpers/admin/feedback_helper.rb +34 -24
  107. data/app/helpers/articles_helper.rb +4 -2
  108. data/app/helpers/authors_helper.rb +9 -18
  109. data/app/helpers/base_helper.rb +66 -55
  110. data/app/helpers/blog_helper.rb +4 -2
  111. data/app/helpers/xml_helper.rb +5 -3
  112. data/app/jobs/application_job.rb +4 -0
  113. data/app/mailers/notification_mailer.rb +5 -3
  114. data/app/models/ability.rb +25 -24
  115. data/app/models/archives_sidebar.rb +18 -18
  116. data/app/models/article.rb +84 -99
  117. data/app/models/article/factory.rb +14 -6
  118. data/app/models/blog.rb +98 -110
  119. data/app/models/comment.rb +14 -10
  120. data/app/models/config_manager.rb +4 -2
  121. data/app/models/content.rb +45 -65
  122. data/app/models/content_base.rb +7 -14
  123. data/app/models/feedback.rb +91 -66
  124. data/app/models/meta_sidebar.rb +5 -3
  125. data/app/models/note.rb +31 -23
  126. data/app/models/page.rb +16 -10
  127. data/app/models/page_sidebar.rb +4 -2
  128. data/app/models/ping.rb +2 -113
  129. data/app/models/post_type.rb +4 -3
  130. data/app/models/redirect.rb +13 -7
  131. data/app/models/redirection.rb +3 -1
  132. data/app/models/resource.rb +6 -22
  133. data/app/models/search_sidebar.rb +4 -2
  134. data/app/models/sidebar.rb +12 -7
  135. data/app/models/static_sidebar.rb +15 -13
  136. data/app/models/tag.rb +23 -15
  137. data/app/models/tag_sidebar.rb +10 -7
  138. data/app/models/text_filter.rb +85 -11
  139. data/app/models/trackback.rb +7 -18
  140. data/app/models/trigger.rb +8 -19
  141. data/app/models/user.rb +46 -52
  142. data/app/services/title_builder.rb +52 -45
  143. data/app/uploaders/resource_uploader.rb +35 -2
  144. data/app/views/accounts/confirm.html.erb +3 -4
  145. data/app/views/admin/content/_article_list.html.erb +24 -9
  146. data/app/views/admin/content/_form.html.erb +71 -51
  147. data/app/views/admin/content/autosave.js.erb +2 -2
  148. data/app/views/admin/content/edit.html.erb +1 -1
  149. data/app/views/admin/content/index.html.erb +25 -15
  150. data/app/views/admin/content/new.html.erb +2 -2
  151. data/app/views/admin/dashboard/_comment.html.erb +5 -5
  152. data/app/views/admin/dashboard/_comments.html.erb +2 -2
  153. data/app/views/admin/dashboard/_drafts.html.erb +5 -5
  154. data/app/views/admin/dashboard/_overview.html.erb +7 -9
  155. data/app/views/admin/dashboard/_welcome.html.erb +11 -11
  156. data/app/views/admin/dashboard/index.html.erb +12 -7
  157. data/app/views/admin/feedback/_button.html.erb +6 -6
  158. data/app/views/admin/feedback/_feedback.html.erb +3 -3
  159. data/app/views/admin/feedback/_ham.html.erb +27 -9
  160. data/app/views/admin/feedback/_spam.html.erb +26 -16
  161. data/app/views/admin/feedback/article.html.erb +20 -21
  162. data/app/views/admin/feedback/edit.html.erb +14 -15
  163. data/app/views/admin/feedback/{ham.js → ham.js.erb} +0 -0
  164. data/app/views/admin/feedback/index.html.erb +25 -23
  165. data/app/views/admin/feedback/{spam.js → spam.js.erb} +0 -0
  166. data/app/views/admin/migrations/show.html.erb +10 -11
  167. data/app/views/admin/notes/_form.html.erb +13 -13
  168. data/app/views/admin/notes/_list.html.erb +19 -8
  169. data/app/views/admin/notes/_note.html.erb +12 -7
  170. data/app/views/admin/notes/edit.html.erb +6 -1
  171. data/app/views/admin/notes/index.html.erb +5 -1
  172. data/app/views/admin/notes/show.html.erb +2 -2
  173. data/app/views/admin/pages/_form.html.erb +86 -77
  174. data/app/views/admin/pages/_pages.html.erb +11 -4
  175. data/app/views/admin/pages/edit.html.erb +3 -1
  176. data/app/views/admin/pages/index.html.erb +10 -6
  177. data/app/views/admin/pages/new.html.erb +3 -1
  178. data/app/views/admin/post_types/_index_and_form.html.erb +15 -16
  179. data/app/views/admin/post_types/edit.html.erb +1 -1
  180. data/app/views/admin/post_types/index.html.erb +1 -1
  181. data/app/views/admin/profiles/index.html.erb +2 -3
  182. data/app/views/admin/redirects/_index_and_form.html.erb +10 -11
  183. data/app/views/admin/redirects/edit.html.erb +1 -1
  184. data/app/views/admin/redirects/index.html.erb +1 -1
  185. data/app/views/admin/resources/index.html.erb +19 -16
  186. data/app/views/admin/seo/_general.html.erb +40 -59
  187. data/app/views/admin/seo/_permalinks.html.erb +17 -17
  188. data/app/views/admin/seo/_titles.html.erb +81 -82
  189. data/app/views/admin/seo/show.html.erb +14 -19
  190. data/app/views/admin/settings/display.html.erb +42 -52
  191. data/app/views/admin/settings/feedback.html.erb +59 -67
  192. data/app/views/admin/settings/index.html.erb +30 -31
  193. data/app/views/admin/settings/write.html.erb +27 -46
  194. data/app/views/admin/shared/_edit.html.erb +3 -3
  195. data/app/views/admin/shared/_menu.html.erb +26 -26
  196. data/app/views/admin/shared/_twitter_alert.html.erb +1 -1
  197. data/app/views/admin/sidebar/_config.html.erb +5 -5
  198. data/app/views/admin/sidebar/_target_sidebar.html.erb +4 -4
  199. data/app/views/admin/sidebar/index.html.erb +7 -7
  200. data/app/views/admin/tags/_index_and_form.html.erb +11 -12
  201. data/app/views/admin/tags/edit.html.erb +1 -1
  202. data/app/views/admin/tags/index.html.erb +1 -1
  203. data/app/views/admin/themes/index.html.erb +5 -6
  204. data/app/views/admin/users/_form.html.erb +34 -34
  205. data/app/views/admin/users/edit.html.erb +2 -2
  206. data/app/views/admin/users/index.html.erb +10 -12
  207. data/app/views/admin/users/new.html.erb +2 -2
  208. data/app/views/archives_sidebar/_content.html.erb +2 -2
  209. data/app/views/articles/_archives_article.html.erb +9 -0
  210. data/app/views/articles/_article.html.erb +9 -9
  211. data/app/views/articles/_article_author.html.erb +4 -0
  212. data/app/views/articles/_article_collection.html.erb +1 -1
  213. data/app/views/articles/_article_content.html.erb +2 -2
  214. data/app/views/articles/_article_excerpt.html.erb +11 -9
  215. data/app/views/articles/_article_links.html.erb +5 -3
  216. data/app/views/articles/_comment_errors.html.erb +1 -1
  217. data/app/views/articles/_comment_form.html.erb +12 -12
  218. data/app/views/articles/_comment_list.html.erb +5 -5
  219. data/app/views/articles/_comment_preview.html.erb +3 -3
  220. data/app/views/articles/_full_article_content.html.erb +4 -2
  221. data/app/views/articles/_password_form.html.erb +4 -4
  222. data/app/views/articles/_trackback.html.erb +2 -2
  223. data/app/views/articles/archives.html.erb +11 -21
  224. data/app/views/articles/feedback_atom_feed.atom.builder +7 -5
  225. data/app/views/articles/feedback_rss_feed.rss.builder +11 -11
  226. data/app/views/articles/index_atom_feed.atom.builder +5 -4
  227. data/app/views/articles/index_rss_feed.rss.builder +8 -8
  228. data/app/views/articles/live_search.html.erb +3 -3
  229. data/app/views/articles/read.html.erb +19 -37
  230. data/app/views/articles/search.html.erb +3 -3
  231. data/app/views/articles/trackback.xml.builder +3 -1
  232. data/app/views/articles/view_page.html.erb +2 -2
  233. data/app/views/authors/show.html.erb +18 -28
  234. data/app/views/authors/show_atom_feed.atom.builder +5 -4
  235. data/app/views/authors/show_rss_feed.rss.builder +8 -8
  236. data/app/views/comments/_comment.html.erb +17 -16
  237. data/app/views/devise/mailer/reset_password_instructions.html.erb +7 -9
  238. data/app/views/devise/passwords/edit.html.erb +4 -4
  239. data/app/views/devise/passwords/new.html.erb +1 -1
  240. data/app/views/devise/registrations/new.html.erb +5 -5
  241. data/app/views/devise/sessions/new.html.erb +3 -3
  242. data/app/views/errors/404.html.erb +2 -2
  243. data/app/views/feedback/index.atom.builder +9 -0
  244. data/app/views/feedback/index.rss.builder +20 -0
  245. data/app/views/layouts/accounts.html.erb +26 -26
  246. data/app/views/layouts/administration.html.erb +31 -31
  247. data/app/views/layouts/default.html.erb +4 -3
  248. data/app/views/layouts/editor.html.erb +5 -19
  249. data/app/views/meta_sidebar/_content.html.erb +2 -2
  250. data/app/views/notes/_note.html.erb +16 -15
  251. data/app/views/notes/index.html.erb +2 -2
  252. data/app/views/notes/show_in_reply.html.erb +1 -1
  253. data/app/views/notification_mailer/_mail_footer.html.erb +3 -5
  254. data/app/views/notification_mailer/_mail_header.html.erb +2 -0
  255. data/app/views/notification_mailer/article.html.erb +5 -4
  256. data/app/views/notification_mailer/comment.html.erb +9 -8
  257. data/app/views/notification_mailer/notif_user.html.erb +4 -9
  258. data/app/views/page_sidebar/_content.html.erb +1 -1
  259. data/app/views/search_sidebar/_content.html.erb +2 -2
  260. data/app/views/settings/install.html.erb +2 -2
  261. data/app/views/setup/index.html.erb +9 -5
  262. data/app/views/shared/_atom_header.atom.builder +4 -4
  263. data/app/views/shared/_atom_item_article.atom.builder +19 -22
  264. data/app/views/shared/_atom_item_comment.atom.builder +5 -5
  265. data/app/views/shared/_atom_item_trackback.atom.builder +5 -4
  266. data/app/views/shared/_google_analytics.html.erb +8 -0
  267. data/app/views/shared/_page_header.html.erb +10 -13
  268. data/app/views/shared/_rss_item_article.rss.builder +12 -15
  269. data/app/views/shared/_rss_item_comment.rss.builder +2 -1
  270. data/app/views/shared/_rss_item_trackback.rss.builder +2 -0
  271. data/app/views/sidebar/display_plugins.html.erb +1 -1
  272. data/app/views/tag_sidebar/_content.html.erb +1 -1
  273. data/app/views/tags/index.html.erb +2 -2
  274. data/app/views/xml/_googlesitemap_item_article.googlesitemap.builder +2 -0
  275. data/app/views/xml/_googlesitemap_item_category.googlesitemap.builder +2 -0
  276. data/app/views/xml/_googlesitemap_item_page.googlesitemap.builder +2 -0
  277. data/app/views/xml/_googlesitemap_item_tag.googlesitemap.builder +2 -0
  278. data/app/views/xml/sitemap.googlesitemap.builder +9 -0
  279. data/config/i18n-tasks.yml +0 -5
  280. data/config/initializers/devise.rb +10 -4
  281. data/config/initializers/mime_types.rb +3 -2
  282. data/config/locales/da.yml +140 -108
  283. data/config/locales/de.yml +147 -111
  284. data/config/locales/en.yml +133 -102
  285. data/config/locales/es-MX.yml +141 -106
  286. data/config/locales/fr.yml +172 -122
  287. data/config/locales/he.yml +132 -105
  288. data/config/locales/it.yml +141 -108
  289. data/config/locales/ja.yml +115 -100
  290. data/config/locales/lt.yml +158 -110
  291. data/config/locales/nb-NO.yml +128 -101
  292. data/config/locales/nl.yml +147 -113
  293. data/config/locales/pl.yml +335 -275
  294. data/config/locales/pt-BR.yml +143 -107
  295. data/config/locales/ro.yml +155 -108
  296. data/config/locales/ru.yml +166 -105
  297. data/config/locales/zh-CN.yml +112 -96
  298. data/config/locales/zh-TW.yml +116 -99
  299. data/config/routes.rb +70 -87
  300. data/db/migrate/113_initial_schema.rb +6 -6
  301. data/db/migrate/114_fixes_buggy_articles_and_notes.rb +8 -6
  302. data/db/migrate/115_drops_categories_for_tags.rb +7 -6
  303. data/db/migrate/20150207131657_add_missing_indexes.rb +3 -1
  304. data/db/migrate/20150807134129_simplify_redirect_relations.rb +6 -1
  305. data/db/migrate/20150808052637_add_blog_ids.rb +11 -7
  306. data/db/migrate/20150808191127_add_blog_id_to_redirects.rb +3 -1
  307. data/db/migrate/20150810094754_add_blog_id_to_tags.rb +3 -1
  308. data/db/migrate/20160108111120_add_devise_to_users.rb +3 -1
  309. data/db/migrate/20160108184201_move_last_connection_to_last_sign_in_at.rb +3 -1
  310. data/db/migrate/20160110094906_remove_profiles_rights.rb +3 -1
  311. data/db/migrate/20160605103918_replace_profile_id_with_string.rb +3 -3
  312. data/db/migrate/20160605154632_remove_profiles.rb +12 -7
  313. data/db/migrate/20160701061851_demand_blog_id_on_contents.rb +3 -1
  314. data/db/migrate/20160701062604_add_blog_id_to_resources.rb +3 -1
  315. data/db/migrate/20170528093024_move_resources_to_content.rb +7 -0
  316. data/db/migrate/20170528094923_move_tags_to_content.rb +8 -0
  317. data/db/migrate/20170528201606_remove_separate_published_flag.rb +7 -0
  318. data/db/migrate/20170605071626_remove_extra_state_columns_from_feedback.rb +8 -0
  319. data/db/migrate/20170702105201_remove_published_at_from_feedback.rb +7 -0
  320. data/db/migrate/20190208151235_add_text_filter_name_fields.rb +9 -0
  321. data/db/migrate/20190208152646_move_text_filter_to_name.rb +97 -0
  322. data/db/migrate/20190209155717_remove_text_filter_ids.rb +19 -0
  323. data/db/migrate/20190209160610_remove_text_filters.rb +17 -0
  324. data/db/migrate/20200413140440_add_unique_indexes.rb +10 -0
  325. data/db/seeds.rb +8 -20
  326. data/lib/email_notify.rb +3 -1
  327. data/lib/format.rb +4 -12
  328. data/lib/publify_core.rb +36 -36
  329. data/lib/publify_core/engine.rb +11 -4
  330. data/lib/publify_core/lang.rb +5 -1
  331. data/lib/publify_core/testing_support/dns_mock.rb +15 -0
  332. data/lib/publify_core/testing_support/factories.rb +240 -0
  333. data/lib/publify_core/testing_support/feed_assertions.rb +48 -0
  334. data/lib/publify_core/testing_support/fixtures/exploit.svg +4 -0
  335. data/lib/publify_core/testing_support/fixtures/fakepng.png +1 -0
  336. data/lib/publify_core/testing_support/fixtures/otherfile.txt +1 -0
  337. data/lib/publify_core/testing_support/fixtures/testfile.png +0 -0
  338. data/lib/publify_core/testing_support/fixtures/testfile.txt +1 -0
  339. data/lib/publify_core/testing_support/upload_fixtures.rb +15 -0
  340. data/lib/publify_core/version.rb +3 -1
  341. data/lib/publify_guid.rb +4 -2
  342. data/lib/publify_plugins.rb +10 -5
  343. data/lib/publify_textfilter_markdown.rb +38 -25
  344. data/lib/publify_textfilter_none.rb +5 -3
  345. data/lib/publify_textfilter_smartypants.rb +5 -3
  346. data/lib/publify_textfilter_textile.rb +7 -4
  347. data/lib/publify_textfilter_twitterfilter.rb +13 -7
  348. data/lib/publify_time.rb +6 -2
  349. data/lib/sidebar_field.rb +29 -20
  350. data/lib/sidebar_registry.rb +5 -3
  351. data/lib/spam_protection.rb +19 -17
  352. data/lib/tasks/i18n.rake +9 -0
  353. data/lib/tasks/manifest.rake +30 -0
  354. data/lib/tasks/publify_core_tasks.rake +2 -0
  355. data/lib/text_filter_plugin.rb +30 -29
  356. data/lib/theme.rb +5 -5
  357. data/lib/transforms.rb +22 -20
  358. data/{app/assets/stylesheets/publify_core/.keep → themes/plain/javascripts/theme.js} +0 -0
  359. metadata +304 -130
  360. data/.gitignore +0 -13
  361. data/.rspec +0 -2
  362. data/.rubocop.yml +0 -84
  363. data/.rubocop_todo.yml +0 -148
  364. data/.travis.yml +0 -27
  365. data/Gemfile +0 -17
  366. data/README.rdoc +0 -3
  367. data/Rakefile +0 -35
  368. data/app/assets/javascripts/widearea.js +0 -486
  369. data/app/assets/stylesheets/widearea.css +0 -133
  370. data/app/controllers/.keep +0 -0
  371. data/app/controllers/admin/migrations_controller.rb +0 -19
  372. data/app/controllers/admin/textfilters_controller.rb +0 -6
  373. data/app/controllers/concerns/.keep +0 -0
  374. data/app/controllers/trackbacks_controller.rb +0 -36
  375. data/app/helpers/.keep +0 -0
  376. data/app/mailers/.keep +0 -0
  377. data/app/models/.keep +0 -0
  378. data/app/models/article/states.rb +0 -179
  379. data/app/models/concerns/.keep +0 -0
  380. data/app/models/feedback/states.rb +0 -256
  381. data/app/services/migrator.rb +0 -25
  382. data/app/views/.keep +0 -0
  383. data/app/views/admin/dashboard/_inbound.html.erb +0 -31
  384. data/app/views/admin/notes/_header.html.erb +0 -6
  385. data/app/views/articles/_protected_article_content.html.erb +0 -6
  386. data/app/views/comments/index.html.erb +0 -1
  387. data/app/views/comments/index_atom_feed.atom.builder +0 -8
  388. data/app/views/comments/index_rss_feed.rss.builder +0 -20
  389. data/app/views/trackbacks/index_atom_feed.atom.builder +0 -7
  390. data/app/views/trackbacks/index_rss_feed.rss.builder +0 -20
  391. data/app/views/trackbacks/trackback.xml.builder +0 -4
  392. data/app/views/xml/feed.googlesitemap.builder +0 -7
  393. data/app/views/xml/rsd.rsd.builder +0 -8
  394. data/lib/stateful.rb +0 -106
  395. data/publify_core.gemspec +0 -54
@@ -0,0 +1,21 @@
1
+ // CSS image replacement
2
+ //
3
+ // Heads up! v3 launched with only `.hide-text()`, but per our pattern for
4
+ // mixins being reused as classes with the same name, this doesn't hold up. As
5
+ // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
6
+ //
7
+ // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
8
+
9
+ // Deprecated as of v3.0.1 (has been removed in v4)
10
+ @mixin hide-text() {
11
+ font: 0/0 a;
12
+ color: transparent;
13
+ text-shadow: none;
14
+ background-color: transparent;
15
+ border: 0;
16
+ }
17
+
18
+ // New mixin to use as of v3.0.1
19
+ @mixin text-hide() {
20
+ @include hide-text;
21
+ }
@@ -0,0 +1,28 @@
1
+ // Responsive image
2
+ //
3
+ // Keep images from scaling beyond the width of their parents.
4
+ @mixin img-responsive($display: block) {
5
+ display: $display;
6
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
7
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
8
+ }
9
+
10
+
11
+ // Retina image
12
+ //
13
+ // Short retina mixin for setting background-image and -size. Note that the
14
+ // spelling of `min--moz-device-pixel-ratio` is intentional.
15
+ @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
16
+ background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
17
+
18
+ @media
19
+ only screen and (-webkit-min-device-pixel-ratio: 2),
20
+ only screen and ( min--moz-device-pixel-ratio: 2),
21
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
22
+ only screen and ( min-device-pixel-ratio: 2),
23
+ only screen and ( min-resolution: 192dpi),
24
+ only screen and ( min-resolution: 2dppx) {
25
+ background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
26
+ background-size: $width-1x $height-1x;
27
+ }
28
+ }
@@ -0,0 +1,12 @@
1
+ // Labels
2
+
3
+ @mixin label-variant($color) {
4
+ background-color: $color;
5
+
6
+ &[href] {
7
+ &:hover,
8
+ &:focus {
9
+ background-color: darken($color, 10%);
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ // Horizontal dividers
2
+ //
3
+ // Dividers (basically an hr) within dropdowns and nav lists
4
+
5
+ @mixin nav-divider($color: #e5e5e5) {
6
+ height: 1px;
7
+ margin: (($line-height-computed / 2) - 1) 0;
8
+ overflow: hidden;
9
+ background-color: $color;
10
+ }
@@ -0,0 +1,9 @@
1
+ // Navbar vertical align
2
+ //
3
+ // Vertically center elements in the navbar.
4
+ // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
5
+
6
+ @mixin navbar-vertical-align($element-height) {
7
+ margin-top: (($navbar-height - $element-height) / 2);
8
+ margin-bottom: (($navbar-height - $element-height) / 2);
9
+ }
@@ -0,0 +1,7 @@
1
+ // Opacity
2
+
3
+ @mixin opacity($opacity) {
4
+ $opacity-ie: ($opacity * 100); // IE8 filter
5
+ filter: alpha(opacity=$opacity-ie);
6
+ opacity: $opacity;
7
+ }
@@ -0,0 +1,24 @@
1
+ // Pagination
2
+
3
+ @mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
4
+ > li {
5
+ > a,
6
+ > span {
7
+ padding: $padding-vertical $padding-horizontal;
8
+ font-size: $font-size;
9
+ line-height: $line-height;
10
+ }
11
+ &:first-child {
12
+ > a,
13
+ > span {
14
+ @include border-left-radius($border-radius);
15
+ }
16
+ }
17
+ &:last-child {
18
+ > a,
19
+ > span {
20
+ @include border-right-radius($border-radius);
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,20 @@
1
+ // Panels
2
+
3
+ @mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
4
+ border-color: $border;
5
+
6
+ & > .panel-heading {
7
+ color: $heading-text-color;
8
+ background-color: $heading-bg-color;
9
+ border-color: $heading-border;
10
+
11
+ + .panel-collapse > .panel-body {
12
+ border-top-color: $border;
13
+ }
14
+ }
15
+ & > .panel-footer {
16
+ + .panel-collapse > .panel-body {
17
+ border-bottom-color: $border;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,8 @@
1
+ // Reset filters for IE
2
+ //
3
+ // When you need to remove a gradient background, do not forget to use this to reset
4
+ // the IE filter for IE9 and below.
5
+
6
+ @mixin reset-filter() {
7
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
8
+ }
@@ -0,0 +1,6 @@
1
+ // Resize anything
2
+
3
+ @mixin resizable($direction) {
4
+ overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5
+ resize: $direction; // Options: horizontal, vertical, both
6
+ }
@@ -0,0 +1,17 @@
1
+ // [converter] $parent hack
2
+ @mixin responsive-visibility($parent) {
3
+ #{$parent} {
4
+ display: block !important;
5
+ }
6
+ table#{$parent} { display: table !important; }
7
+ tr#{$parent} { display: table-row !important; }
8
+ th#{$parent},
9
+ td#{$parent} { display: table-cell !important; }
10
+ }
11
+
12
+ // [converter] $parent hack
13
+ @mixin responsive-invisibility($parent) {
14
+ #{$parent} {
15
+ display: none !important;
16
+ }
17
+ }
@@ -0,0 +1,10 @@
1
+ // Sizing shortcuts
2
+
3
+ @mixin size($width, $height) {
4
+ width: $width;
5
+ height: $height;
6
+ }
7
+
8
+ @mixin square($size) {
9
+ @include size($size, $size);
10
+ }
@@ -0,0 +1,9 @@
1
+ // WebKit-style focus
2
+
3
+ @mixin tab-focus() {
4
+ // WebKit-specific. Other browsers will keep their default outline style.
5
+ // (Initially tried to also force default via `outline: initial`,
6
+ // but that seems to erroneously remove the outline in Firefox altogether.)
7
+ outline: 5px auto -webkit-focus-ring-color;
8
+ outline-offset: -2px;
9
+ }
@@ -0,0 +1,28 @@
1
+ // Tables
2
+
3
+ @mixin table-row-variant($state, $background) {
4
+ // Exact selectors below required to override `.table-striped` and prevent
5
+ // inheritance to nested tables.
6
+ .table > thead > tr,
7
+ .table > tbody > tr,
8
+ .table > tfoot > tr {
9
+ > td.#{$state},
10
+ > th.#{$state},
11
+ &.#{$state} > td,
12
+ &.#{$state} > th {
13
+ background-color: $background;
14
+ }
15
+ }
16
+
17
+ // Hover states for `.table-hover`
18
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
19
+ .table-hover > tbody > tr {
20
+ > td.#{$state}:hover,
21
+ > th.#{$state}:hover,
22
+ &.#{$state}:hover > td,
23
+ &:hover > .#{$state},
24
+ &.#{$state}:hover > th {
25
+ background-color: darken($background, 5%);
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,12 @@
1
+ // Typography
2
+
3
+ // [converter] $parent hack
4
+ @mixin text-emphasis-variant($parent, $color) {
5
+ #{$parent} {
6
+ color: $color;
7
+ }
8
+ a#{$parent}:hover,
9
+ a#{$parent}:focus {
10
+ color: darken($color, 10%);
11
+ }
12
+ }
@@ -0,0 +1,8 @@
1
+ // Text overflow
2
+ // Requires inline-block or block for proper styling
3
+
4
+ @mixin text-overflow() {
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ white-space: nowrap;
8
+ }
@@ -0,0 +1,222 @@
1
+ // Vendor Prefixes
2
+ //
3
+ // All vendor mixins are deprecated as of v3.2.0 due to the introduction of
4
+ // Autoprefixer in our Gruntfile. They have been removed in v4.
5
+
6
+ // - Animations
7
+ // - Backface visibility
8
+ // - Box shadow
9
+ // - Box sizing
10
+ // - Content columns
11
+ // - Hyphens
12
+ // - Placeholder text
13
+ // - Transformations
14
+ // - Transitions
15
+ // - User Select
16
+
17
+
18
+ // Animations
19
+ @mixin animation($animation) {
20
+ -webkit-animation: $animation;
21
+ -o-animation: $animation;
22
+ animation: $animation;
23
+ }
24
+ @mixin animation-name($name) {
25
+ -webkit-animation-name: $name;
26
+ animation-name: $name;
27
+ }
28
+ @mixin animation-duration($duration) {
29
+ -webkit-animation-duration: $duration;
30
+ animation-duration: $duration;
31
+ }
32
+ @mixin animation-timing-function($timing-function) {
33
+ -webkit-animation-timing-function: $timing-function;
34
+ animation-timing-function: $timing-function;
35
+ }
36
+ @mixin animation-delay($delay) {
37
+ -webkit-animation-delay: $delay;
38
+ animation-delay: $delay;
39
+ }
40
+ @mixin animation-iteration-count($iteration-count) {
41
+ -webkit-animation-iteration-count: $iteration-count;
42
+ animation-iteration-count: $iteration-count;
43
+ }
44
+ @mixin animation-direction($direction) {
45
+ -webkit-animation-direction: $direction;
46
+ animation-direction: $direction;
47
+ }
48
+ @mixin animation-fill-mode($fill-mode) {
49
+ -webkit-animation-fill-mode: $fill-mode;
50
+ animation-fill-mode: $fill-mode;
51
+ }
52
+
53
+ // Backface visibility
54
+ // Prevent browsers from flickering when using CSS 3D transforms.
55
+ // Default value is `visible`, but can be changed to `hidden`
56
+
57
+ @mixin backface-visibility($visibility) {
58
+ -webkit-backface-visibility: $visibility;
59
+ -moz-backface-visibility: $visibility;
60
+ backface-visibility: $visibility;
61
+ }
62
+
63
+ // Drop shadows
64
+ //
65
+ // Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
66
+ // supported browsers that have box shadow capabilities now support it.
67
+
68
+ @mixin box-shadow($shadow...) {
69
+ -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
70
+ box-shadow: $shadow;
71
+ }
72
+
73
+ // Box sizing
74
+ @mixin box-sizing($boxmodel) {
75
+ -webkit-box-sizing: $boxmodel;
76
+ -moz-box-sizing: $boxmodel;
77
+ box-sizing: $boxmodel;
78
+ }
79
+
80
+ // CSS3 Content Columns
81
+ @mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
82
+ -webkit-column-count: $column-count;
83
+ -moz-column-count: $column-count;
84
+ column-count: $column-count;
85
+ -webkit-column-gap: $column-gap;
86
+ -moz-column-gap: $column-gap;
87
+ column-gap: $column-gap;
88
+ }
89
+
90
+ // Optional hyphenation
91
+ @mixin hyphens($mode: auto) {
92
+ -webkit-hyphens: $mode;
93
+ -moz-hyphens: $mode;
94
+ -ms-hyphens: $mode; // IE10+
95
+ -o-hyphens: $mode;
96
+ hyphens: $mode;
97
+ word-wrap: break-word;
98
+ }
99
+
100
+ // Placeholder text
101
+ @mixin placeholder($color: $input-color-placeholder) {
102
+ // Firefox
103
+ &::-moz-placeholder {
104
+ color: $color;
105
+ opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
106
+ }
107
+ &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
108
+ &::-webkit-input-placeholder { color: $color; } // Safari and Chrome
109
+ }
110
+
111
+ // Transformations
112
+ @mixin scale($ratio...) {
113
+ -webkit-transform: scale($ratio);
114
+ -ms-transform: scale($ratio); // IE9 only
115
+ -o-transform: scale($ratio);
116
+ transform: scale($ratio);
117
+ }
118
+
119
+ @mixin scaleX($ratio) {
120
+ -webkit-transform: scaleX($ratio);
121
+ -ms-transform: scaleX($ratio); // IE9 only
122
+ -o-transform: scaleX($ratio);
123
+ transform: scaleX($ratio);
124
+ }
125
+ @mixin scaleY($ratio) {
126
+ -webkit-transform: scaleY($ratio);
127
+ -ms-transform: scaleY($ratio); // IE9 only
128
+ -o-transform: scaleY($ratio);
129
+ transform: scaleY($ratio);
130
+ }
131
+ @mixin skew($x, $y) {
132
+ -webkit-transform: skewX($x) skewY($y);
133
+ -ms-transform: skewX($x) skewY($y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
134
+ -o-transform: skewX($x) skewY($y);
135
+ transform: skewX($x) skewY($y);
136
+ }
137
+ @mixin translate($x, $y) {
138
+ -webkit-transform: translate($x, $y);
139
+ -ms-transform: translate($x, $y); // IE9 only
140
+ -o-transform: translate($x, $y);
141
+ transform: translate($x, $y);
142
+ }
143
+ @mixin translate3d($x, $y, $z) {
144
+ -webkit-transform: translate3d($x, $y, $z);
145
+ transform: translate3d($x, $y, $z);
146
+ }
147
+ @mixin rotate($degrees) {
148
+ -webkit-transform: rotate($degrees);
149
+ -ms-transform: rotate($degrees); // IE9 only
150
+ -o-transform: rotate($degrees);
151
+ transform: rotate($degrees);
152
+ }
153
+ @mixin rotateX($degrees) {
154
+ -webkit-transform: rotateX($degrees);
155
+ -ms-transform: rotateX($degrees); // IE9 only
156
+ -o-transform: rotateX($degrees);
157
+ transform: rotateX($degrees);
158
+ }
159
+ @mixin rotateY($degrees) {
160
+ -webkit-transform: rotateY($degrees);
161
+ -ms-transform: rotateY($degrees); // IE9 only
162
+ -o-transform: rotateY($degrees);
163
+ transform: rotateY($degrees);
164
+ }
165
+ @mixin perspective($perspective) {
166
+ -webkit-perspective: $perspective;
167
+ -moz-perspective: $perspective;
168
+ perspective: $perspective;
169
+ }
170
+ @mixin perspective-origin($perspective) {
171
+ -webkit-perspective-origin: $perspective;
172
+ -moz-perspective-origin: $perspective;
173
+ perspective-origin: $perspective;
174
+ }
175
+ @mixin transform-origin($origin) {
176
+ -webkit-transform-origin: $origin;
177
+ -moz-transform-origin: $origin;
178
+ -ms-transform-origin: $origin; // IE9 only
179
+ transform-origin: $origin;
180
+ }
181
+
182
+
183
+ // Transitions
184
+
185
+ @mixin transition($transition...) {
186
+ -webkit-transition: $transition;
187
+ -o-transition: $transition;
188
+ transition: $transition;
189
+ }
190
+ @mixin transition-property($transition-property...) {
191
+ -webkit-transition-property: $transition-property;
192
+ transition-property: $transition-property;
193
+ }
194
+ @mixin transition-delay($transition-delay) {
195
+ -webkit-transition-delay: $transition-delay;
196
+ transition-delay: $transition-delay;
197
+ }
198
+ @mixin transition-duration($transition-duration...) {
199
+ -webkit-transition-duration: $transition-duration;
200
+ transition-duration: $transition-duration;
201
+ }
202
+ @mixin transition-timing-function($timing-function) {
203
+ -webkit-transition-timing-function: $timing-function;
204
+ transition-timing-function: $timing-function;
205
+ }
206
+ @mixin transition-transform($transition...) {
207
+ -webkit-transition: -webkit-transform $transition;
208
+ -moz-transition: -moz-transform $transition;
209
+ -o-transition: -o-transform $transition;
210
+ transition: transform $transition;
211
+ }
212
+
213
+
214
+ // User select
215
+ // For selecting text on the page
216
+
217
+ @mixin user-select($select) {
218
+ -webkit-user-select: $select;
219
+ -moz-user-select: $select;
220
+ -ms-user-select: $select; // IE10+
221
+ user-select: $select;
222
+ }