threddedDANIEL 0.14.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +744 -0
- data/app/assets/images/favicons/README.md +3 -0
- data/app/assets/images/favicons/amazon.png +0 -0
- data/app/assets/images/favicons/github.png +0 -0
- data/app/assets/images/favicons/google_branding/logo_calendar_128px.png +0 -0
- data/app/assets/images/favicons/google_branding/logo_docs_48px.png +0 -0
- data/app/assets/images/favicons/google_branding/logo_drive_48px.png +0 -0
- data/app/assets/images/favicons/google_branding/logo_forms_48px.png +0 -0
- data/app/assets/images/favicons/google_branding/logo_sheets_48px.png +0 -0
- data/app/assets/images/favicons/google_branding/logo_slides_48px.png +0 -0
- data/app/assets/images/favicons/stackexchange.png +0 -0
- data/app/assets/images/favicons/twitter.png +0 -0
- data/app/assets/images/favicons/wikipedia.png +0 -0
- data/app/assets/images/thredded/breadcrumb-chevron.svg +1 -0
- data/app/assets/images/thredded/follow.svg +1 -0
- data/app/assets/images/thredded/lock.svg +1 -0
- data/app/assets/images/thredded/moderation.svg +1 -0
- data/app/assets/images/thredded/private-messages.svg +1 -0
- data/app/assets/images/thredded/settings.svg +1 -0
- data/app/assets/images/thredded/three-dot-menu.svg +3 -0
- data/app/assets/images/thredded/unfollow.svg +1 -0
- data/app/assets/javascripts/thredded.es6 +2 -0
- data/app/assets/javascripts/thredded/components/currently_online.es6 +32 -0
- data/app/assets/javascripts/thredded/components/flash_messages.es6 +9 -0
- data/app/assets/javascripts/thredded/components/mention_autocompletion.es6 +40 -0
- data/app/assets/javascripts/thredded/components/post_form.es6 +37 -0
- data/app/assets/javascripts/thredded/components/preview_area.es6 +56 -0
- data/app/assets/javascripts/thredded/components/quote_post.es6 +49 -0
- data/app/assets/javascripts/thredded/components/time_stamps.es6 +25 -0
- data/app/assets/javascripts/thredded/components/topic_form.es6 +94 -0
- data/app/assets/javascripts/thredded/components/topics.es6 +46 -0
- data/app/assets/javascripts/thredded/components/turboforms.es6 +25 -0
- data/app/assets/javascripts/thredded/components/user_preferences_form.es6 +66 -0
- data/app/assets/javascripts/thredded/components/user_textcomplete.es6 +50 -0
- data/app/assets/javascripts/thredded/components/users_select.es6 +122 -0
- data/app/assets/javascripts/thredded/core/csrf_tokens.es6 +9 -0
- data/app/assets/javascripts/thredded/core/debounce.es6 +32 -0
- data/app/assets/javascripts/thredded/core/escape_html.es6 +7 -0
- data/app/assets/javascripts/thredded/core/hide_soft_keyboard.es6 +7 -0
- data/app/assets/javascripts/thredded/core/on_page_load.es6 +54 -0
- data/app/assets/javascripts/thredded/core/serialize_form.es6 +9 -0
- data/app/assets/javascripts/thredded/core/thredded.es6 +1 -0
- data/app/assets/javascripts/thredded/dependencies.js +8 -0
- data/app/assets/javascripts/thredded/dependencies/autosize.js +1 -0
- data/app/assets/javascripts/thredded/dependencies/textcomplete.js +1 -0
- data/app/assets/javascripts/thredded/dependencies/timeago.js +1 -0
- data/app/assets/javascripts/thredded/dependencies/ujs.js +1 -0
- data/app/assets/javascripts/thredded/thredded.es6 +2 -0
- data/app/assets/stylesheets/thredded.scss +3 -0
- data/app/assets/stylesheets/thredded/_base.scss +13 -0
- data/app/assets/stylesheets/thredded/_dependencies.scss +0 -0
- data/app/assets/stylesheets/thredded/_email.scss +51 -0
- data/app/assets/stylesheets/thredded/_thredded.scss +33 -0
- data/app/assets/stylesheets/thredded/base/_alerts.scss +44 -0
- data/app/assets/stylesheets/thredded/base/_buttons.scss +73 -0
- data/app/assets/stylesheets/thredded/base/_dropdown-menu.scss +83 -0
- data/app/assets/stylesheets/thredded/base/_forms.scss +84 -0
- data/app/assets/stylesheets/thredded/base/_grid.scss +58 -0
- data/app/assets/stylesheets/thredded/base/_lists.scss +31 -0
- data/app/assets/stylesheets/thredded/base/_nav.scss +67 -0
- data/app/assets/stylesheets/thredded/base/_tables.scss +17 -0
- data/app/assets/stylesheets/thredded/base/_typography.scss +72 -0
- data/app/assets/stylesheets/thredded/base/_variables.scss +141 -0
- data/app/assets/stylesheets/thredded/components/_alerts.scss +19 -0
- data/app/assets/stylesheets/thredded/components/_base.scss +25 -0
- data/app/assets/stylesheets/thredded/components/_currently-online.scss +54 -0
- data/app/assets/stylesheets/thredded/components/_empty.scss +11 -0
- data/app/assets/stylesheets/thredded/components/_flash-message.scss +19 -0
- data/app/assets/stylesheets/thredded/components/_following.scss +14 -0
- data/app/assets/stylesheets/thredded/components/_form-list.scss +39 -0
- data/app/assets/stylesheets/thredded/components/_icons.scss +3 -0
- data/app/assets/stylesheets/thredded/components/_main-section.scss +9 -0
- data/app/assets/stylesheets/thredded/components/_mention-autocomplete.scss +57 -0
- data/app/assets/stylesheets/thredded/components/_messageboard.scss +155 -0
- data/app/assets/stylesheets/thredded/components/_onebox.scss +275 -0
- data/app/assets/stylesheets/thredded/components/_pagination.scss +35 -0
- data/app/assets/stylesheets/thredded/components/_post-form.scss +27 -0
- data/app/assets/stylesheets/thredded/components/_post.scss +138 -0
- data/app/assets/stylesheets/thredded/components/_preferences.scss +19 -0
- data/app/assets/stylesheets/thredded/components/_preview_area.scss +11 -0
- data/app/assets/stylesheets/thredded/components/_topic-delete.scss +8 -0
- data/app/assets/stylesheets/thredded/components/_topic-header.scss +111 -0
- data/app/assets/stylesheets/thredded/components/_topics.scss +186 -0
- data/app/assets/stylesheets/thredded/layout/_main-container.scss +16 -0
- data/app/assets/stylesheets/thredded/layout/_main-navigation.scss +79 -0
- data/app/assets/stylesheets/thredded/layout/_moderation.scss +97 -0
- data/app/assets/stylesheets/thredded/layout/_navigation.scss +87 -0
- data/app/assets/stylesheets/thredded/layout/_search-navigation.scss +126 -0
- data/app/assets/stylesheets/thredded/layout/_user-navigation.scss +20 -0
- data/app/assets/stylesheets/thredded/layout/_user.scss +10 -0
- data/app/assets/stylesheets/thredded/utilities/_is-compact.scss +26 -0
- data/app/assets/stylesheets/thredded/utilities/_is-expanded.scss +16 -0
- data/app/commands/thredded/at_notification_extractor.rb +23 -0
- data/app/commands/thredded/autofollow_users.rb +62 -0
- data/app/commands/thredded/create_messageboard.rb +42 -0
- data/app/commands/thredded/mark_all_read.rb +22 -0
- data/app/commands/thredded/moderate_post.rb +48 -0
- data/app/commands/thredded/notify_following_users.rb +78 -0
- data/app/commands/thredded/notify_private_topic_users.rb +34 -0
- data/app/controllers/concerns/thredded/new_post_params.rb +21 -0
- data/app/controllers/concerns/thredded/new_private_post_params.rb +21 -0
- data/app/controllers/concerns/thredded/new_private_topic_params.rb +25 -0
- data/app/controllers/concerns/thredded/new_topic_params.rb +19 -0
- data/app/controllers/concerns/thredded/render_preview.rb +16 -0
- data/app/controllers/thredded/application_controller.rb +145 -0
- data/app/controllers/thredded/autocomplete_users_controller.rb +52 -0
- data/app/controllers/thredded/messageboard_groups_controller.rb +31 -0
- data/app/controllers/thredded/messageboards_controller.rb +53 -0
- data/app/controllers/thredded/moderation_controller.rb +103 -0
- data/app/controllers/thredded/post_permalinks_controller.rb +11 -0
- data/app/controllers/thredded/post_previews_controller.rb +29 -0
- data/app/controllers/thredded/posts_controller.rb +97 -0
- data/app/controllers/thredded/preferences_controller.rb +42 -0
- data/app/controllers/thredded/private_post_permalinks_controller.rb +12 -0
- data/app/controllers/thredded/private_post_previews_controller.rb +29 -0
- data/app/controllers/thredded/private_posts_controller.rb +96 -0
- data/app/controllers/thredded/private_topic_previews_controller.rb +15 -0
- data/app/controllers/thredded/private_topics_controller.rb +102 -0
- data/app/controllers/thredded/read_states_controller.rb +13 -0
- data/app/controllers/thredded/theme_previews_controller.rb +34 -0
- data/app/controllers/thredded/topic_previews_controller.rb +15 -0
- data/app/controllers/thredded/topics_controller.rb +205 -0
- data/app/forms/thredded/edit_topic_form.rb +51 -0
- data/app/forms/thredded/post_form.rb +54 -0
- data/app/forms/thredded/private_post_form.rb +50 -0
- data/app/forms/thredded/private_topic_form.rb +160 -0
- data/app/forms/thredded/topic_form.rb +95 -0
- data/app/forms/thredded/user_preferences_form.rb +110 -0
- data/app/helpers/thredded/application_helper.rb +129 -0
- data/app/helpers/thredded/nav_helper.rb +42 -0
- data/app/helpers/thredded/render_helper.rb +15 -0
- data/app/helpers/thredded/urls_helper.rb +134 -0
- data/app/jobs/thredded/activity_updater_job.rb +21 -0
- data/app/jobs/thredded/auto_follow_and_notify_job.rb +14 -0
- data/app/jobs/thredded/notify_private_topic_users_job.rb +12 -0
- data/app/mailer_previews/thredded/base_mailer_preview.rb +118 -0
- data/app/mailer_previews/thredded/post_mailer_preview.rb +13 -0
- data/app/mailer_previews/thredded/private_topic_mailer_preview.rb +13 -0
- data/app/mailers/thredded/base_mailer.rb +18 -0
- data/app/mailers/thredded/post_mailer.rb +21 -0
- data/app/mailers/thredded/private_topic_mailer.rb +21 -0
- data/app/models/concerns/thredded/content_moderation_state.rb +67 -0
- data/app/models/concerns/thredded/friendly_id_reserved_words_and_pagination.rb +17 -0
- data/app/models/concerns/thredded/moderation_state.rb +14 -0
- data/app/models/concerns/thredded/notifier_preference.rb +19 -0
- data/app/models/concerns/thredded/post_common.rb +76 -0
- data/app/models/concerns/thredded/search_parser.rb +41 -0
- data/app/models/concerns/thredded/topic_common.rb +94 -0
- data/app/models/concerns/thredded/topics_search.rb +67 -0
- data/app/models/concerns/thredded/user_topic_read_state_common.rb +42 -0
- data/app/models/thredded/category.rb +18 -0
- data/app/models/thredded/messageboard.rb +120 -0
- data/app/models/thredded/messageboard_group.rb +19 -0
- data/app/models/thredded/messageboard_notifications_for_followed_topics.rb +30 -0
- data/app/models/thredded/messageboard_user.rb +14 -0
- data/app/models/thredded/notifications_for_followed_topics.rb +25 -0
- data/app/models/thredded/notifications_for_private_topics.rb +22 -0
- data/app/models/thredded/null_user.rb +51 -0
- data/app/models/thredded/null_user_topic_read_state.rb +17 -0
- data/app/models/thredded/post.rb +77 -0
- data/app/models/thredded/post_moderation_record.rb +56 -0
- data/app/models/thredded/private_post.rb +63 -0
- data/app/models/thredded/private_topic.rb +89 -0
- data/app/models/thredded/private_user.rb +8 -0
- data/app/models/thredded/stats.rb +25 -0
- data/app/models/thredded/topic.rb +179 -0
- data/app/models/thredded/topic_category.rb +8 -0
- data/app/models/thredded/user_detail.rb +27 -0
- data/app/models/thredded/user_extender.rb +75 -0
- data/app/models/thredded/user_messageboard_preference.rb +45 -0
- data/app/models/thredded/user_permissions/admin/if_admin_column_true.rb +14 -0
- data/app/models/thredded/user_permissions/admin/none.rb +14 -0
- data/app/models/thredded/user_permissions/message/readers_of_writeable_boards.rb +15 -0
- data/app/models/thredded/user_permissions/moderate/if_moderator_column_true.rb +16 -0
- data/app/models/thredded/user_permissions/moderate/none.rb +16 -0
- data/app/models/thredded/user_permissions/read/all.rb +27 -0
- data/app/models/thredded/user_permissions/write/all.rb +16 -0
- data/app/models/thredded/user_permissions/write/none.rb +16 -0
- data/app/models/thredded/user_post_notification.rb +29 -0
- data/app/models/thredded/user_preference.rb +26 -0
- data/app/models/thredded/user_private_topic_read_state.rb +13 -0
- data/app/models/thredded/user_topic_follow.rb +34 -0
- data/app/models/thredded/user_topic_read_state.rb +13 -0
- data/app/notifiers/thredded/email_notifier.rb +25 -0
- data/app/policies/thredded/messageboard_group_policy.rb +16 -0
- data/app/policies/thredded/messageboard_policy.rb +49 -0
- data/app/policies/thredded/post_policy.rb +64 -0
- data/app/policies/thredded/private_post_policy.rb +38 -0
- data/app/policies/thredded/private_topic_policy.rb +24 -0
- data/app/policies/thredded/topic_policy.rb +49 -0
- data/app/view_hooks/thredded/all_view_hooks.rb +125 -0
- data/app/view_models/thredded/base_topic_view.rb +43 -0
- data/app/view_models/thredded/messageboard_group_view.rb +27 -0
- data/app/view_models/thredded/post_view.rb +89 -0
- data/app/view_models/thredded/posts_page_view.rb +27 -0
- data/app/view_models/thredded/private_topic_view.rb +20 -0
- data/app/view_models/thredded/private_topics_page_view.rb +31 -0
- data/app/view_models/thredded/topic_email_view.rb +18 -0
- data/app/view_models/thredded/topic_posts_page_view.rb +17 -0
- data/app/view_models/thredded/topic_view.rb +68 -0
- data/app/view_models/thredded/topics_page_view.rb +38 -0
- data/app/views/layouts/thredded/application.html.erb +18 -0
- data/app/views/thredded/categories/_category.html.erb +1 -0
- data/app/views/thredded/error_pages/forbidden.html.erb +6 -0
- data/app/views/thredded/error_pages/not_found.html.erb +6 -0
- data/app/views/thredded/kaminari/_first_page.html.erb +11 -0
- data/app/views/thredded/kaminari/_gap.html.erb +8 -0
- data/app/views/thredded/kaminari/_last_page.html.erb +11 -0
- data/app/views/thredded/kaminari/_next_page.html.erb +11 -0
- data/app/views/thredded/kaminari/_page.html.erb +12 -0
- data/app/views/thredded/kaminari/_paginator.html.erb +23 -0
- data/app/views/thredded/kaminari/_prev_page.html.erb +11 -0
- data/app/views/thredded/messageboard_groups/new.html.erb +28 -0
- data/app/views/thredded/messageboards/_form.html.erb +30 -0
- data/app/views/thredded/messageboards/_messageboard.html.erb +20 -0
- data/app/views/thredded/messageboards/_messageboard_meta.html.erb +13 -0
- data/app/views/thredded/messageboards/edit.html.erb +15 -0
- data/app/views/thredded/messageboards/index.html.erb +34 -0
- data/app/views/thredded/messageboards/new.html.erb +15 -0
- data/app/views/thredded/moderation/_nav.html.erb +19 -0
- data/app/views/thredded/moderation/_post.html.erb +19 -0
- data/app/views/thredded/moderation/_post_moderation_actions.html.erb +12 -0
- data/app/views/thredded/moderation/_post_moderation_record.html.erb +46 -0
- data/app/views/thredded/moderation/_user_moderation_state.html.erb +3 -0
- data/app/views/thredded/moderation/_user_post.html.erb +12 -0
- data/app/views/thredded/moderation/_users_search_form.html.erb +13 -0
- data/app/views/thredded/moderation/activity.html.erb +20 -0
- data/app/views/thredded/moderation/history.html.erb +13 -0
- data/app/views/thredded/moderation/pending.html.erb +24 -0
- data/app/views/thredded/moderation/user.html.erb +54 -0
- data/app/views/thredded/moderation/users.html.erb +41 -0
- data/app/views/thredded/post_mailer/post_notification.html.erb +26 -0
- data/app/views/thredded/post_mailer/post_notification.text.erb +14 -0
- data/app/views/thredded/post_previews/preview.html.erb +1 -0
- data/app/views/thredded/post_previews/update.html.erb +1 -0
- data/app/views/thredded/posts/_content.html.erb +1 -0
- data/app/views/thredded/posts/_form.html.erb +5 -0
- data/app/views/thredded/posts/_post.html.erb +13 -0
- data/app/views/thredded/posts/_user.html.erb +3 -0
- data/app/views/thredded/posts/edit.html.erb +16 -0
- data/app/views/thredded/posts/new.html.erb +15 -0
- data/app/views/thredded/posts_common/_actions.html.erb +28 -0
- data/app/views/thredded/posts_common/_content.html.erb +3 -0
- data/app/views/thredded/posts_common/_form.html.erb +22 -0
- data/app/views/thredded/posts_common/_header.html.erb +8 -0
- data/app/views/thredded/posts_common/_header_with_topic.html.erb +15 -0
- data/app/views/thredded/posts_common/_header_with_user_and_topic.html.erb +18 -0
- data/app/views/thredded/posts_common/actions/_delete.html.erb +4 -0
- data/app/views/thredded/posts_common/actions/_edit.html.erb +3 -0
- data/app/views/thredded/posts_common/actions/_mark_as_unread.html.erb +2 -0
- data/app/views/thredded/posts_common/actions/_quote.html.erb +4 -0
- data/app/views/thredded/posts_common/form/_after_content.html.erb +8 -0
- data/app/views/thredded/posts_common/form/_before_content.html.erb +8 -0
- data/app/views/thredded/posts_common/form/_content.html.erb +7 -0
- data/app/views/thredded/posts_common/form/_content_field.html.erb +8 -0
- data/app/views/thredded/posts_common/form/_preview_area.html.erb +16 -0
- data/app/views/thredded/preferences/_form.html.erb +95 -0
- data/app/views/thredded/preferences/_messageboards_nav.html.erb +8 -0
- data/app/views/thredded/preferences/_messageboards_nav_item.html.erb +2 -0
- data/app/views/thredded/preferences/edit.html.erb +20 -0
- data/app/views/thredded/private_post_previews/preview.html.erb +1 -0
- data/app/views/thredded/private_post_previews/update.html.erb +1 -0
- data/app/views/thredded/private_posts/_content.html.erb +1 -0
- data/app/views/thredded/private_posts/_form.html.erb +6 -0
- data/app/views/thredded/private_posts/_private_post.html.erb +6 -0
- data/app/views/thredded/private_posts/edit.html.erb +16 -0
- data/app/views/thredded/private_posts/new.html.erb +11 -0
- data/app/views/thredded/private_topic_mailer/message_notification.html.erb +26 -0
- data/app/views/thredded/private_topic_mailer/message_notification.text.erb +15 -0
- data/app/views/thredded/private_topic_previews/preview.html.erb +1 -0
- data/app/views/thredded/private_topics/_breadcrumbs.html.erb +4 -0
- data/app/views/thredded/private_topics/_form.html.erb +39 -0
- data/app/views/thredded/private_topics/_header.html.erb +17 -0
- data/app/views/thredded/private_topics/_no_private_topics.html.erb +6 -0
- data/app/views/thredded/private_topics/_private_topic.html.erb +23 -0
- data/app/views/thredded/private_topics/edit.html.erb +35 -0
- data/app/views/thredded/private_topics/header/_participant.html.erb +1 -0
- data/app/views/thredded/private_topics/index.html.erb +32 -0
- data/app/views/thredded/private_topics/new.html.erb +11 -0
- data/app/views/thredded/private_topics/private_topic/_participant.html.erb +1 -0
- data/app/views/thredded/private_topics/show.html.erb +28 -0
- data/app/views/thredded/search/_form.html.erb +13 -0
- data/app/views/thredded/shared/_breadcrumbs.html.erb +6 -0
- data/app/views/thredded/shared/_content_moderation_blocked_state.html.erb +8 -0
- data/app/views/thredded/shared/_currently_online.html.erb +6 -0
- data/app/views/thredded/shared/_flash_messages.html.erb +7 -0
- data/app/views/thredded/shared/_header.html.erb +3 -0
- data/app/views/thredded/shared/_nav.html.erb +19 -0
- data/app/views/thredded/shared/_page.html.erb +15 -0
- data/app/views/thredded/shared/currently_online/_header.html.erb +5 -0
- data/app/views/thredded/shared/currently_online/_user_list.html.erb +3 -0
- data/app/views/thredded/shared/currently_online/_user_list_item.html.erb +6 -0
- data/app/views/thredded/shared/nav/_moderation.html.erb +14 -0
- data/app/views/thredded/shared/nav/_notification_preferences.html.erb +8 -0
- data/app/views/thredded/shared/nav/_private_topics.html.erb +12 -0
- data/app/views/thredded/shared/nav/_standalone.html.erb +12 -0
- data/app/views/thredded/shared/nav/_standalone_profile.html.erb +3 -0
- data/app/views/thredded/shared/preview.html.erb +10 -0
- data/app/views/thredded/theme_previews/_section_title.html.erb +3 -0
- data/app/views/thredded/theme_previews/show.html.erb +99 -0
- data/app/views/thredded/topic_previews/preview.html.erb +1 -0
- data/app/views/thredded/topics/_followers.html.erb +12 -0
- data/app/views/thredded/topics/_form.html.erb +32 -0
- data/app/views/thredded/topics/_header.html.erb +32 -0
- data/app/views/thredded/topics/_sticky_topics_divider.html.erb +1 -0
- data/app/views/thredded/topics/_topic.html.erb +47 -0
- data/app/views/thredded/topics/_topic_form_admin_options.html.erb +12 -0
- data/app/views/thredded/topics/edit.html.erb +50 -0
- data/app/views/thredded/topics/index.html.erb +35 -0
- data/app/views/thredded/topics/new.html.erb +12 -0
- data/app/views/thredded/topics/search.html.erb +39 -0
- data/app/views/thredded/topics/show.html.erb +46 -0
- data/app/views/thredded/users/_link.html.erb +14 -0
- data/app/views/thredded/users/_post.html.erb +6 -0
- data/app/views/thredded/users/_posts.html.erb +7 -0
- data/bin/rails +6 -0
- data/config/i18n-tasks.yml +16 -0
- data/config/locales/de.yml +257 -0
- data/config/locales/en.yml +253 -0
- data/config/locales/es.yml +257 -0
- data/config/locales/fr.yml +255 -0
- data/config/locales/it.yml +257 -0
- data/config/locales/pl.yml +257 -0
- data/config/locales/pt-BR.yml +258 -0
- data/config/locales/ru.yml +255 -0
- data/config/locales/zh-CN.yml +246 -0
- data/config/routes.rb +87 -0
- data/db/migrate/20160329231848_create_thredded.rb +257 -0
- data/db/seeds.rb +4 -0
- data/db/upgrade_migrations/20160611094616_upgrade_v0_5_to_v0_6.rb +28 -0
- data/db/upgrade_migrations/20160723012349_upgrade_v0_6_to_v0_7.rb +46 -0
- data/db/upgrade_migrations/20161019150201_upgrade_v0_7_to_v0_8.rb +34 -0
- data/db/upgrade_migrations/20161113161801_upgrade_v0_8_to_v0_9.rb +60 -0
- data/db/upgrade_migrations/20170125033319_upgrade_v0_9_to_v0_10.rb +36 -0
- data/db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb +23 -0
- data/db/upgrade_migrations/20170420163138_upgrade_thredded_v0_11_to_v0_12.rb +28 -0
- data/db/upgrade_migrations/20170811090735_upgrade_thredded_v0_13_to_v_014.rb +21 -0
- data/lib/generators/thredded/install/USAGE +8 -0
- data/lib/generators/thredded/install/install_generator.rb +20 -0
- data/lib/generators/thredded/install/templates/initializer.rb +160 -0
- data/lib/tasks/thredded_tasks.rake +14 -0
- data/lib/thredded.rb +190 -0
- data/lib/thredded/base_migration.rb +14 -0
- data/lib/thredded/base_notifier.rb +28 -0
- data/lib/thredded/collection_to_strings_with_cache_renderer.rb +86 -0
- data/lib/thredded/content_formatter.rb +129 -0
- data/lib/thredded/database_seeder.rb +290 -0
- data/lib/thredded/db_tools.rb +103 -0
- data/lib/thredded/email_transformer.rb +22 -0
- data/lib/thredded/email_transformer/base.rb +47 -0
- data/lib/thredded/email_transformer/onebox.rb +21 -0
- data/lib/thredded/engine.rb +28 -0
- data/lib/thredded/errors.rb +68 -0
- data/lib/thredded/formatting_demo_content.rb +30 -0
- data/lib/thredded/html_pipeline/at_mention_filter.rb +78 -0
- data/lib/thredded/html_pipeline/autolink_filter.rb +15 -0
- data/lib/thredded/html_pipeline/kramdown_filter.rb +39 -0
- data/lib/thredded/html_pipeline/onebox_filter.rb +143 -0
- data/lib/thredded/html_pipeline/wrap_iframes_filter.rb +13 -0
- data/lib/thredded/version.rb +5 -0
- data/lib/thredded/view_hooks/config.rb +37 -0
- data/lib/thredded/view_hooks/renderer.rb +30 -0
- data/vendor/assets/javascripts/autosize.min.js +6 -0
- data/vendor/assets/javascripts/textcomplete.min.js +2 -0
- metadata +1035 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
%thredded--table {
|
2
|
+
font-feature-settings: "kern", "liga", "tnum";
|
3
|
+
border-collapse: collapse;
|
4
|
+
margin: $thredded-small-spacing 0;
|
5
|
+
|
6
|
+
td, th {
|
7
|
+
text-align: center;
|
8
|
+
padding: 0.5rem 0.75rem;
|
9
|
+
border-bottom: $thredded-base-border;
|
10
|
+
vertical-align: middle;
|
11
|
+
word-break: break-word;
|
12
|
+
}
|
13
|
+
|
14
|
+
th {
|
15
|
+
font-weight: bold;
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
%thredded--heading {
|
2
|
+
font-family: $thredded-heading-font-family;
|
3
|
+
font-size: $thredded-base-font-size;
|
4
|
+
line-height: $thredded-heading-line-height;
|
5
|
+
margin: 0 0 $thredded-small-spacing;
|
6
|
+
}
|
7
|
+
|
8
|
+
%thredded--link {
|
9
|
+
color: $thredded-action-color;
|
10
|
+
text-decoration: none;
|
11
|
+
transition: $thredded-action-transition;
|
12
|
+
|
13
|
+
&:active,
|
14
|
+
&:focus,
|
15
|
+
&:hover {
|
16
|
+
color: $thredded-action-hover-color;
|
17
|
+
text-decoration: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
&:active,
|
21
|
+
&:focus {
|
22
|
+
outline: none;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
%thredded--hr {
|
27
|
+
border-bottom: none;
|
28
|
+
border-left: none;
|
29
|
+
border-right: none;
|
30
|
+
border-top: $thredded-base-border;
|
31
|
+
margin: $thredded-base-spacing 0;
|
32
|
+
}
|
33
|
+
|
34
|
+
%thredded--paragraph {
|
35
|
+
margin: 0 0 $thredded-small-spacing;
|
36
|
+
}
|
37
|
+
|
38
|
+
%thredded--icon {
|
39
|
+
fill: currentColor;
|
40
|
+
}
|
41
|
+
|
42
|
+
%thredded--blockquote {
|
43
|
+
margin: 0 0 0.75rem;
|
44
|
+
border-left: solid 5px $thredded-blockquote-border-color;
|
45
|
+
padding: 1rem;
|
46
|
+
|
47
|
+
p:last-of-type {
|
48
|
+
margin-bottom: 0;
|
49
|
+
}
|
50
|
+
|
51
|
+
@include thredded-media-mobile {
|
52
|
+
padding: ($thredded-small-spacing / 2) $thredded-small-spacing;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
%thredded--embed-16-by-9 {
|
57
|
+
display: block;
|
58
|
+
position: relative;
|
59
|
+
// 16 by 9
|
60
|
+
padding-bottom: 56.25%;
|
61
|
+
// Account for the video player chrome
|
62
|
+
padding-top: 35px;
|
63
|
+
height: 0;
|
64
|
+
overflow: hidden;
|
65
|
+
> iframe {
|
66
|
+
position: absolute;
|
67
|
+
top: 0;
|
68
|
+
left: 0;
|
69
|
+
width: 100%;
|
70
|
+
height: 100%;
|
71
|
+
}
|
72
|
+
}
|
@@ -0,0 +1,141 @@
|
|
1
|
+
// Grid
|
2
|
+
$thredded-grid-container-max-width: 43.125rem !default;
|
3
|
+
$thredded-grid-breakpoint-max-widths: (mobile: 34rem, tablet: 48rem) !default;
|
4
|
+
|
5
|
+
// Minimum width required for the content that breaks out of the container, such
|
6
|
+
// as post avatars and topic post counts
|
7
|
+
$thredded-content-breakout-min-width: 4rem !default;
|
8
|
+
|
9
|
+
// Typography
|
10
|
+
$thredded-base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif !default;
|
11
|
+
$thredded-base-font-size: 1rem !default; // 16px
|
12
|
+
$thredded-font-size-small: 0.875rem !default; // 14px
|
13
|
+
$thredded-base-line-height: 1.5 !default;
|
14
|
+
$thredded-heading-font-family: inherit !default;
|
15
|
+
$thredded-heading-line-height: 1.2 !default;
|
16
|
+
|
17
|
+
// Spacings
|
18
|
+
$thredded-large-spacing: $thredded-base-line-height * 2rem !default;
|
19
|
+
$thredded-base-spacing: $thredded-base-line-height * 1rem !default;
|
20
|
+
$thredded-small-spacing: $thredded-base-spacing / 2 !default;
|
21
|
+
$thredded-inline-spacing: 0.4375em !default;
|
22
|
+
|
23
|
+
// Named colors
|
24
|
+
$thredded-brand: #4a90e2 !default;
|
25
|
+
$thredded-dark-gray: #333 !default;
|
26
|
+
$thredded-light-gray: #eee !default;
|
27
|
+
|
28
|
+
// Colors of text, background, actions (links), and navigation
|
29
|
+
$thredded-text-color: rgba(black, 0.87) !default;
|
30
|
+
$thredded-secondary-text-color: rgba(opacify($thredded-text-color, 1), 0.54) !default;
|
31
|
+
$thredded-background-color: #fff !default;
|
32
|
+
$thredded-action-color: $thredded-brand !default;
|
33
|
+
$thredded-action-hover-color: darken($thredded-action-color, 15%) !default;
|
34
|
+
$thredded-action-transition: color 0.1s linear !default;
|
35
|
+
$thredded-nav-color: $thredded-text-color !default;
|
36
|
+
$thredded-nav-hover-color: $thredded-action-color !default;
|
37
|
+
$thredded-nav-current-color: $thredded-action-color !default;
|
38
|
+
$thredded-overlay-background-color: opacify($thredded-background-color, 1) !default;
|
39
|
+
$thredded-overlay-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12) !default;
|
40
|
+
$thredded-secondary-nav-color: $thredded-secondary-text-color !default;
|
41
|
+
$thredded-spoiler-hidden-color: $thredded-light-gray !default;
|
42
|
+
$thredded-spoiler-shown-color: black !default;
|
43
|
+
$thredded-code-selected-line-background: #f8eec7 !default;
|
44
|
+
|
45
|
+
|
46
|
+
// Colors of alerts and flash messages
|
47
|
+
$thredded-alert-danger-background: #fbe3e4 !default;
|
48
|
+
$thredded-alert-danger-color: #a94442 !default;
|
49
|
+
$thredded-alert-info-background: #e6f3fa !default;
|
50
|
+
$thredded-alert-info-color: darken($thredded-brand, 15%) !default;
|
51
|
+
$thredded-alert-success-background: #e6efc2 !default;
|
52
|
+
$thredded-alert-success-color: #3c763d !default;
|
53
|
+
$thredded-alert-warning-background: #fcf8e3 !default;
|
54
|
+
$thredded-alert-warning-color: #8a6d3b !default;
|
55
|
+
|
56
|
+
// Borders
|
57
|
+
$thredded-base-border-color: $thredded-light-gray !default;
|
58
|
+
$thredded-base-border: 1px solid $thredded-base-border-color !default;
|
59
|
+
$thredded-blockquote-border-color: $thredded-light-gray !default;
|
60
|
+
|
61
|
+
// Form inputs
|
62
|
+
$thredded-form-background: $thredded-background-color !default;
|
63
|
+
$thredded-form-border-color: darken($thredded-base-border-color, 5%) !default;
|
64
|
+
$thredded-form-border-hover-color: darken($thredded-form-border-color, 6.4%) !default;
|
65
|
+
$thredded-form-border-focus-color: $thredded-action-color !default;
|
66
|
+
$thredded-form-border: 1px solid $thredded-form-border-color !default;
|
67
|
+
$thredded-form-box-shadow: inset 0 1px 3px rgba(#000, 0.06) !default;
|
68
|
+
$thredded-form-color: $thredded-text-color !default;
|
69
|
+
|
70
|
+
// Buttons
|
71
|
+
$thredded-button-background: $thredded-action-color !default;
|
72
|
+
$thredded-button-color: #fff !default;
|
73
|
+
$thredded-button-hover-background: darken($thredded-button-background, 15%) !default;
|
74
|
+
$thredded-button-hover-color: $thredded-button-color !default;
|
75
|
+
|
76
|
+
$thredded-button-light-background: lighten($thredded-button-background, 35%) !default;
|
77
|
+
$thredded-button-light-color: darken($thredded-button-background, 15%) !default;
|
78
|
+
$thredded-button-light-hover-background: darken($thredded-button-light-background, 15%) !default;
|
79
|
+
$thredded-button-light-hover-color: darken($thredded-button-light-color, 15%) !default;
|
80
|
+
|
81
|
+
|
82
|
+
$thredded-button-border-radius: 3px !default;
|
83
|
+
$thredded-button-font-family: $thredded-base-font-family !default;
|
84
|
+
$thredded-button-font-size: $thredded-font-size-small !default;
|
85
|
+
$thredded-button-font-weight: 600 !default;
|
86
|
+
$thredded-button-line-height: 1 !default;
|
87
|
+
|
88
|
+
// Badges (unread count, posts count)
|
89
|
+
$thredded-badge-active-color: $thredded-button-color !default;
|
90
|
+
$thredded-badge-active-background: $thredded-action-color !default;
|
91
|
+
$thredded-badge-inactive-color: $thredded-button-color !default;
|
92
|
+
$thredded-badge-inactive-background: rgba($thredded-text-color, 0.3) !default;
|
93
|
+
|
94
|
+
// Locked topics
|
95
|
+
$thredded-badge-locked-color: $thredded-alert-warning-background;
|
96
|
+
$thredded-badge-locked-background: $thredded-alert-warning-color;
|
97
|
+
|
98
|
+
// Onebox
|
99
|
+
$thredded-onebox-favicons: (
|
100
|
+
'amazon': 'favicons/amazon.png',
|
101
|
+
'githubblob': 'favicons/github.png',
|
102
|
+
'githubcommit': 'favicons/github.png',
|
103
|
+
'githubgist': 'favicons/github.png',
|
104
|
+
'githubissue': 'favicons/github.png',
|
105
|
+
'githubpullrequest': 'favicons/github.png',
|
106
|
+
'googledocs': 'favicons/google_branding/logo_drive_48px.png',
|
107
|
+
'stackexchange': 'favicons/stackexchange.png',
|
108
|
+
'twitterstatus': 'favicons/twitter.png',
|
109
|
+
'wikipedia': 'favicons/wikipedia.png',
|
110
|
+
) !default;
|
111
|
+
// Properties applied based on the image filename:
|
112
|
+
$thredded-onebox-favicon-properties: () !default;
|
113
|
+
|
114
|
+
// Layout features
|
115
|
+
|
116
|
+
// Messageboards grid
|
117
|
+
// Whether to display messageboards as a grid on the desktop screen sizes.
|
118
|
+
$thredded-messageboards-grid: true !default;
|
119
|
+
// Paddings within a grid item
|
120
|
+
$thredded-messageboards-grid-item-padding-x: ($thredded-base-spacing * 0.8) !default;
|
121
|
+
$thredded-messageboards-grid-item-padding-y: $thredded-base-spacing !default;
|
122
|
+
// Spacing between grid items, must be set in the same unit as the border width
|
123
|
+
$thredded-messageboards-grid-item-gutter-x: 0 !default;
|
124
|
+
$thredded-messageboards-grid-item-gutter-y: 0 !default;
|
125
|
+
// The width of the border around a grid item
|
126
|
+
$thredded-messageboards-grid-item-border-width: 1px !default;
|
127
|
+
$thredded-messageboards-grid-item-border-color:
|
128
|
+
// If one of the gutters is 0 the borders will be collapsed by overlap.
|
129
|
+
// Ensure their color does not have and alpha component:
|
130
|
+
if($thredded-messageboards-grid-item-gutter-x == 0 or $thredded-messageboards-grid-item-gutter-y == 0,
|
131
|
+
// Use the closest non-transparent color
|
132
|
+
mix(opacify($thredded-base-border-color, 1), $thredded-background-color,
|
133
|
+
percentage(alpha($thredded-base-border-color))),
|
134
|
+
$thredded-base-border-color) !default;
|
135
|
+
// Minimum width of a grid item
|
136
|
+
$thredded-messageboards-grid-item-flex-basis: 21.5rem !default;
|
137
|
+
|
138
|
+
// Topics list
|
139
|
+
$thredded-topics-list-gutter-y: $thredded-base-spacing !default;
|
140
|
+
$thredded-topics-topic-posts-counter-width: 3rem !default;
|
141
|
+
$thredded-topics-topic-follow-icon-width: 2rem !default;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.thredded--alert {
|
2
|
+
@extend %thredded--alert;
|
3
|
+
}
|
4
|
+
|
5
|
+
.thredded--alert-success {
|
6
|
+
@extend %thredded--alert--success;
|
7
|
+
}
|
8
|
+
|
9
|
+
.thredded--alert-danger {
|
10
|
+
@extend %thredded--alert--danger;
|
11
|
+
}
|
12
|
+
|
13
|
+
.thredded--alert-info {
|
14
|
+
@extend %thredded--alert--info;
|
15
|
+
}
|
16
|
+
|
17
|
+
.thredded--alert-warning {
|
18
|
+
@extend %thredded--alert--warning;
|
19
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// Common classes for base placeholders.
|
2
|
+
|
3
|
+
.thredded--button, .thredded--form--submit {
|
4
|
+
@extend %thredded--button;
|
5
|
+
}
|
6
|
+
|
7
|
+
.thredded--form {
|
8
|
+
@extend %thredded--form;
|
9
|
+
}
|
10
|
+
|
11
|
+
.thredded--link {
|
12
|
+
@extend %thredded--link;
|
13
|
+
}
|
14
|
+
|
15
|
+
.thredded--blockquote {
|
16
|
+
@extend %thredded--blockquote;
|
17
|
+
}
|
18
|
+
|
19
|
+
.thredded--table {
|
20
|
+
@extend %thredded--table;
|
21
|
+
}
|
22
|
+
|
23
|
+
.thredded--embed-16-by-9 {
|
24
|
+
@extend %thredded--embed-16-by-9;
|
25
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
.thredded--currently-online {
|
2
|
+
background-color: $thredded-base-border-color;
|
3
|
+
bottom: -1.25rem;
|
4
|
+
box-sizing: content-box;
|
5
|
+
padding: $thredded-base-spacing;
|
6
|
+
position: fixed;
|
7
|
+
right: 0;
|
8
|
+
width: 16.25rem; // 260px
|
9
|
+
z-index: 10;
|
10
|
+
|
11
|
+
@include thredded-media-mobile {
|
12
|
+
display: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
&.thredded--is-expanded {
|
16
|
+
bottom: 0;
|
17
|
+
position: fixed;
|
18
|
+
right: 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
&--title {
|
22
|
+
@extend %thredded--heading;
|
23
|
+
margin-bottom: $thredded-base-spacing;
|
24
|
+
}
|
25
|
+
|
26
|
+
&--avatar {
|
27
|
+
background-color: $thredded-text-color;
|
28
|
+
border-radius: 50%;
|
29
|
+
display: inline-block;
|
30
|
+
height: 1.75rem;
|
31
|
+
margin-right: $thredded-small-spacing;
|
32
|
+
vertical-align: middle;
|
33
|
+
width: 1.75rem;
|
34
|
+
}
|
35
|
+
|
36
|
+
&--user {
|
37
|
+
padding: $thredded-small-spacing 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
&--users {
|
41
|
+
@extend %thredded--list-unstyled;
|
42
|
+
height: 0;
|
43
|
+
visibility: hidden;
|
44
|
+
}
|
45
|
+
|
46
|
+
&.thredded--is-expanded &--users {
|
47
|
+
height: auto;
|
48
|
+
visibility: visible;
|
49
|
+
}
|
50
|
+
|
51
|
+
@media print {
|
52
|
+
display: none;
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.thredded--flash-message {
|
2
|
+
@extend %thredded--alert;
|
3
|
+
}
|
4
|
+
|
5
|
+
.thredded--flash-message--success {
|
6
|
+
@extend %thredded--alert--success;
|
7
|
+
}
|
8
|
+
|
9
|
+
.thredded--flash-message--error {
|
10
|
+
@extend %thredded--alert--danger;
|
11
|
+
}
|
12
|
+
|
13
|
+
.thredded--flash-message--notice {
|
14
|
+
@extend %thredded--alert--info;
|
15
|
+
}
|
16
|
+
|
17
|
+
.thredded--flash-message--alert {
|
18
|
+
@extend %thredded--alert--warning;
|
19
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Used in both the topics list and the topic posts views.
|
2
|
+
%thredded--following-icon {
|
3
|
+
fill: currentColor;
|
4
|
+
display: inline-block;
|
5
|
+
font-size: 1em;
|
6
|
+
width: 1.4rem;
|
7
|
+
height: 1.4rem;
|
8
|
+
opacity: 0.4;
|
9
|
+
}
|
10
|
+
|
11
|
+
%thredded--not-following-icon {
|
12
|
+
@extend %thredded--following-icon;
|
13
|
+
opacity: 0.1;
|
14
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.thredded--form-list {
|
2
|
+
@extend %thredded--list-unstyled;
|
3
|
+
|
4
|
+
&.on-top {
|
5
|
+
margin-bottom: $thredded-small-spacing;
|
6
|
+
}
|
7
|
+
|
8
|
+
li {
|
9
|
+
transition: all 0.15s ease-out 0s;
|
10
|
+
margin-bottom: $thredded-small-spacing;
|
11
|
+
}
|
12
|
+
|
13
|
+
label {
|
14
|
+
transition: all 0.15s ease-out 0s;
|
15
|
+
}
|
16
|
+
|
17
|
+
label ~ label {
|
18
|
+
display: inline-block;
|
19
|
+
font-weight: normal;
|
20
|
+
margin-right: 15px;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.thredded--form-list--admin-options {
|
25
|
+
label {
|
26
|
+
cursor: pointer;
|
27
|
+
display: inline-block;
|
28
|
+
margin-bottom: 0;
|
29
|
+
margin-right: $thredded-base-spacing;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.thredded--form-list--hint {
|
34
|
+
@extend %thredded--paragraph;
|
35
|
+
color: $thredded-secondary-text-color;
|
36
|
+
font-size: $thredded-font-size-small;
|
37
|
+
font-weight: normal;
|
38
|
+
position: relative;
|
39
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
ul.thredded--textcomplete-dropdown {
|
2
|
+
background: inherit;
|
3
|
+
border-color: $thredded-form-border-focus-color;
|
4
|
+
border-top: $thredded-base-border;
|
5
|
+
box-shadow: 0 1px 1px $thredded-form-border-focus-color;
|
6
|
+
font-family: $thredded-base-font-family;
|
7
|
+
font-size: $thredded-base-font-size;
|
8
|
+
line-height: $thredded-base-line-height;
|
9
|
+
}
|
10
|
+
|
11
|
+
ul.thredded--textcomplete-dropdown {
|
12
|
+
|
13
|
+
background: $thredded-form-background;
|
14
|
+
list-style: none;
|
15
|
+
margin: 0;
|
16
|
+
padding: 4px;
|
17
|
+
|
18
|
+
li.textcomplete-item {
|
19
|
+
a {
|
20
|
+
color: $thredded-text-color;
|
21
|
+
}
|
22
|
+
|
23
|
+
&.active {
|
24
|
+
background: $thredded-button-background;
|
25
|
+
a {
|
26
|
+
color: $thredded-button-color;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
padding: $thredded-small-spacing;
|
31
|
+
}
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
.thredded--textcomplete-user-result {
|
37
|
+
&__avatar {
|
38
|
+
width: 2rem;
|
39
|
+
min-height: 2rem;
|
40
|
+
height: auto;
|
41
|
+
display: inline-block;
|
42
|
+
vertical-align: middle;
|
43
|
+
}
|
44
|
+
&__name {
|
45
|
+
display: inline-block;
|
46
|
+
margin-left: 0.6rem
|
47
|
+
}
|
48
|
+
&__display_name {
|
49
|
+
display: inline-block;
|
50
|
+
margin-left: 0.4rem;
|
51
|
+
|
52
|
+
color: $thredded-secondary-text-color;
|
53
|
+
.textcomplete-item.active & {
|
54
|
+
color: invert($thredded-secondary-text-color);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|