thredded 0.1.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.mkdn +202 -0
- data/MIT-LICENSE +20 -0
- data/README.mkdn +391 -0
- data/app/assets/images/thredded/breadcrumb-chevron.svg +1 -0
- data/app/assets/javascripts/thredded/currently_online.es6 +25 -0
- data/app/assets/javascripts/thredded/post_form.es6 +20 -0
- data/app/assets/javascripts/thredded/time_stamps.es6 +8 -0
- data/app/assets/javascripts/thredded/topic_form.es6 +55 -0
- data/app/assets/javascripts/thredded/users_select.es6 +5 -0
- data/app/assets/javascripts/thredded.es6 +10 -0
- data/app/assets/stylesheets/thredded/_base.scss +11 -0
- data/app/assets/stylesheets/thredded/_dependencies.scss +1 -0
- data/app/assets/stylesheets/thredded/_thredded.scss +27 -0
- data/app/assets/stylesheets/thredded/base/_alerts.scss +40 -0
- data/app/assets/stylesheets/thredded/base/_buttons.scss +39 -0
- data/app/assets/stylesheets/thredded/base/_forms.scss +79 -0
- data/app/assets/stylesheets/thredded/base/_grid.scss +19 -0
- data/app/assets/stylesheets/thredded/base/_lists.scss +31 -0
- data/app/assets/stylesheets/thredded/base/_tables.scss +25 -0
- data/app/assets/stylesheets/thredded/base/_typography.scss +36 -0
- data/app/assets/stylesheets/thredded/base/_variables.scss +54 -0
- data/app/assets/stylesheets/thredded/components/_base.scss +13 -0
- data/app/assets/stylesheets/thredded/components/_currently-online.scss +48 -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/_form-list.scss +35 -0
- data/app/assets/stylesheets/thredded/components/_main-section.scss +3 -0
- data/app/assets/stylesheets/thredded/components/_messageboard.scss +55 -0
- data/app/assets/stylesheets/thredded/components/_pagination.scss +26 -0
- data/app/assets/stylesheets/thredded/components/_post-form.scss +21 -0
- data/app/assets/stylesheets/thredded/components/_post.scss +66 -0
- data/app/assets/stylesheets/thredded/components/_preferences.scss +6 -0
- data/app/assets/stylesheets/thredded/components/_select2.scss +42 -0
- data/app/assets/stylesheets/thredded/components/_topic-delete.scss +9 -0
- data/app/assets/stylesheets/thredded/components/_topic-header.scss +20 -0
- data/app/assets/stylesheets/thredded/components/_topics.scss +113 -0
- data/app/assets/stylesheets/thredded/layout/_main-container.scss +15 -0
- data/app/assets/stylesheets/thredded/layout/_main-navigation.scss +45 -0
- data/app/assets/stylesheets/thredded/layout/_topic-navigation.scss +53 -0
- data/app/assets/stylesheets/thredded/layout/_user-navigation.scss +87 -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/assets/stylesheets/thredded.scss +3 -0
- data/app/commands/thredded/at_notification_extractor.rb +15 -0
- data/app/commands/thredded/members_marked_notified.rb +18 -0
- data/app/commands/thredded/messageboard_destroyer.rb +60 -0
- data/app/commands/thredded/notify_mentioned_users.rb +68 -0
- data/app/commands/thredded/notify_private_topic_users.rb +51 -0
- data/app/commands/thredded/user_reads_private_topic.rb +22 -0
- data/app/commands/thredded/user_resets_private_topic_to_unread.rb +23 -0
- data/app/controllers/thredded/application_controller.rb +105 -0
- data/app/controllers/thredded/messageboards_controller.rb +58 -0
- data/app/controllers/thredded/posts_controller.rb +78 -0
- data/app/controllers/thredded/preferences_controller.rb +28 -0
- data/app/controllers/thredded/private_topics_controller.rb +65 -0
- data/app/controllers/thredded/setups_controller.rb +53 -0
- data/app/controllers/thredded/theme_previews_controller.rb +59 -0
- data/app/controllers/thredded/topics_controller.rb +153 -0
- data/app/decorators/thredded/base_topic_decorator.rb +14 -0
- data/app/decorators/thredded/base_user_topic_decorator.rb +63 -0
- data/app/decorators/thredded/messageboard_decorator.rb +41 -0
- data/app/decorators/thredded/post_decorator.rb +40 -0
- data/app/decorators/thredded/private_topic_decorator.rb +23 -0
- data/app/decorators/thredded/topic_decorator.rb +25 -0
- data/app/decorators/thredded/topic_email_decorator.rb +24 -0
- data/app/decorators/thredded/user_private_topic_decorator.rb +13 -0
- data/app/decorators/thredded/user_topic_decorator.rb +37 -0
- data/app/forms/thredded/private_topic_form.rb +126 -0
- data/app/forms/thredded/topic_form.rb +94 -0
- data/app/helpers/thredded/application_helper.rb +41 -0
- data/app/jobs/thredded/activity_updater_job.rb +20 -0
- data/app/jobs/thredded/at_notifier_job.rb +11 -0
- data/app/jobs/thredded/notify_private_topic_users_job.rb +11 -0
- data/app/mailers/thredded/base_mailer.rb +4 -0
- data/app/mailers/thredded/post_mailer.rb +15 -0
- data/app/mailers/thredded/private_post_mailer.rb +15 -0
- data/app/mailers/thredded/private_topic_mailer.rb +15 -0
- data/app/models/concerns/thredded/post_common.rb +105 -0
- data/app/models/concerns/thredded/topic_common.rb +48 -0
- data/app/models/thredded/ability.rb +60 -0
- data/app/models/thredded/category.rb +12 -0
- data/app/models/thredded/messageboard.rb +50 -0
- data/app/models/thredded/messageboard_user.rb +12 -0
- data/app/models/thredded/notification_preference.rb +17 -0
- data/app/models/thredded/null_preference.rb +11 -0
- data/app/models/thredded/null_topic.rb +15 -0
- data/app/models/thredded/null_topic_read.rb +19 -0
- data/app/models/thredded/null_user.rb +51 -0
- data/app/models/thredded/post.rb +37 -0
- data/app/models/thredded/post_notification.rb +17 -0
- data/app/models/thredded/private_post.rb +25 -0
- data/app/models/thredded/private_topic.rb +60 -0
- data/app/models/thredded/private_user.rb +6 -0
- data/app/models/thredded/stats.rb +37 -0
- data/app/models/thredded/topic.rb +104 -0
- data/app/models/thredded/topic_category.rb +6 -0
- data/app/models/thredded/user_detail.rb +26 -0
- data/app/models/thredded/user_extender.rb +33 -0
- data/app/models/thredded/user_permissions/admin/if_admin_column_true.rb +12 -0
- data/app/models/thredded/user_permissions/admin/none.rb +12 -0
- data/app/models/thredded/user_permissions/message/readers_of_writeable_boards.rb +13 -0
- data/app/models/thredded/user_permissions/moderate/if_moderator_column_true.rb +25 -0
- data/app/models/thredded/user_permissions/moderate/none.rb +25 -0
- data/app/models/thredded/user_permissions/read/all.rb +25 -0
- data/app/models/thredded/user_permissions/write/all.rb +25 -0
- data/app/models/thredded/user_permissions/write/none.rb +25 -0
- data/app/models/thredded/user_preference.rb +6 -0
- data/app/models/thredded/user_topic_read.rb +10 -0
- data/app/views/layouts/thredded/application.html.erb +15 -0
- data/app/views/thredded/categories/_category.html.erb +1 -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/messageboards/_messageboard.html.erb +15 -0
- data/app/views/thredded/messageboards/index.html.erb +20 -0
- data/app/views/thredded/messageboards/new.html.erb +18 -0
- data/app/views/thredded/post_mailer/at_notification.html.erb +14 -0
- data/app/views/thredded/post_mailer/at_notification.text.erb +10 -0
- data/app/views/thredded/posts/_content_field.html.erb +4 -0
- data/app/views/thredded/posts/_form.html.erb +1 -0
- data/app/views/thredded/posts/_post.html.erb +1 -0
- data/app/views/thredded/posts/_user.html.erb +3 -0
- data/app/views/thredded/posts/edit.html.erb +13 -0
- data/app/views/thredded/posts_common/_form.html.erb +10 -0
- data/app/views/thredded/posts_common/_post.html.erb +20 -0
- data/app/views/thredded/preferences/_form.html.erb +28 -0
- data/app/views/thredded/preferences/_header.html.erb +1 -0
- data/app/views/thredded/preferences/edit.html.erb +12 -0
- data/app/views/thredded/private_post_mailer/at_notification.html.erb +11 -0
- data/app/views/thredded/private_posts/_form.html.erb +1 -0
- data/app/views/thredded/private_posts/_private_post.html.erb +1 -0
- data/app/views/thredded/private_topic_mailer/message_notification.html.erb +17 -0
- data/app/views/thredded/private_topic_mailer/message_notification.text.erb +13 -0
- data/app/views/thredded/private_topics/_breadcrumbs.html.erb +4 -0
- data/app/views/thredded/private_topics/_form.html.erb +24 -0
- data/app/views/thredded/private_topics/_no_private_topics.html.erb +6 -0
- data/app/views/thredded/private_topics/_private_topic.html.erb +22 -0
- data/app/views/thredded/private_topics/index.html.erb +23 -0
- data/app/views/thredded/private_topics/new.html.erb +13 -0
- data/app/views/thredded/private_topics/show.html.erb +14 -0
- data/app/views/thredded/search/_form.html.erb +7 -0
- data/app/views/thredded/shared/_currently_online.html.erb +16 -0
- data/app/views/thredded/shared/_flash_messages.html.erb +7 -0
- data/app/views/thredded/shared/_header.html.erb +4 -0
- data/app/views/thredded/shared/_messageboard_topics_breadcrumbs.html.erb +6 -0
- data/app/views/thredded/shared/_notification_preferences.html.erb +7 -0
- data/app/views/thredded/shared/_page.html.erb +6 -0
- data/app/views/thredded/shared/_time_ago.html.erb +7 -0
- data/app/views/thredded/shared/_top_nav.html.erb +36 -0
- data/app/views/thredded/shared/_topic_nav.html.erb +22 -0
- data/app/views/thredded/theme_previews/_section_title.html.erb +3 -0
- data/app/views/thredded/theme_previews/show.html.erb +108 -0
- data/app/views/thredded/topics/_form.html.erb +23 -0
- data/app/views/thredded/topics/_recent_topics_by_user.html.erb +8 -0
- data/app/views/thredded/topics/_topic.html.erb +29 -0
- data/app/views/thredded/topics/_topic_form_admin_options.html.erb +12 -0
- data/app/views/thredded/topics/by_category.html.erb +56 -0
- data/app/views/thredded/topics/edit.html.erb +38 -0
- data/app/views/thredded/topics/index.html.erb +18 -0
- data/app/views/thredded/topics/menu/_new_topic.html.erb +3 -0
- data/app/views/thredded/topics/new.html.erb +11 -0
- data/app/views/thredded/topics/search.html.erb +9 -0
- data/app/views/thredded/topics/show.html.erb +31 -0
- data/app/views/thredded/topics_common/_header.html.erb +6 -0
- data/app/views/thredded/users/_link.html.erb +9 -0
- data/config/routes.rb +28 -0
- data/db/migrate/20160329231848_create_thredded.rb +173 -0
- data/lib/generators/thredded/install/USAGE +13 -0
- data/lib/generators/thredded/install/install_generator.rb +23 -0
- data/lib/generators/thredded/install/templates/initializer.rb +51 -0
- data/lib/html/pipeline/at_mention_filter.rb +20 -0
- data/lib/html/pipeline/bbcode_filter.rb +19 -0
- data/lib/tasks/thredded_tasks.rake +18 -0
- data/lib/thredded/at_users.rb +19 -0
- data/lib/thredded/engine.rb +35 -0
- data/lib/thredded/errors.rb +67 -0
- data/lib/thredded/main_app_route_delegator.rb +24 -0
- data/lib/thredded/messageboard_user_permissions.rb +22 -0
- data/lib/thredded/post_sql_builder.rb +12 -0
- data/lib/thredded/post_user_permissions.rb +32 -0
- data/lib/thredded/private_topic_user_permissions.rb +26 -0
- data/lib/thredded/search_parser.rb +45 -0
- data/lib/thredded/search_sql_builder.rb +21 -0
- data/lib/thredded/seed_database.rb +76 -0
- data/lib/thredded/table_sql_builder.rb +41 -0
- data/lib/thredded/topic_sql_builder.rb +11 -0
- data/lib/thredded/topic_user_permissions.rb +32 -0
- data/lib/thredded/version.rb +3 -0
- data/lib/thredded.rb +85 -0
- data/thredded.gemspec +68 -0
- metadata +248 -122
@@ -0,0 +1,55 @@
|
|
1
|
+
(function($) {
|
2
|
+
const COMPONENT_SELECTOR = '[data-thredded-topic-form]';
|
3
|
+
class ThreddedTopicForm {
|
4
|
+
constructor() {
|
5
|
+
this.titleSelector = '[data-thredded-topic-form-title]';
|
6
|
+
this.textareaSelector = 'textarea';
|
7
|
+
this.compactSelector = 'form.thredded--is-compact';
|
8
|
+
this.expandedSelector = 'form.thredded--is-expanded';
|
9
|
+
this.escapeElements = 'input, textarea';
|
10
|
+
this.escapeKeyCode = 27;
|
11
|
+
}
|
12
|
+
|
13
|
+
toggleExpanded(child, expanded) {
|
14
|
+
jQuery(child).closest(expanded ? this.compactSelector : this.expandedSelector).toggleClass('thredded--is-compact thredded--is-expanded');
|
15
|
+
}
|
16
|
+
|
17
|
+
init($nodes) {
|
18
|
+
$nodes.find(this.textareaSelector).autosize();
|
19
|
+
$nodes.filter(this.compactSelector).
|
20
|
+
on('focus', this.titleSelector, e => {
|
21
|
+
this.toggleExpanded(e.target, true);
|
22
|
+
}).
|
23
|
+
on('keydown', this.escapeElements, e => {
|
24
|
+
if (e.keyCode == this.escapeKeyCode) {
|
25
|
+
this.toggleExpanded(e.target, false);
|
26
|
+
e.target.blur();
|
27
|
+
}
|
28
|
+
}).
|
29
|
+
on('blur', this.escapeElements, e => {
|
30
|
+
var blurredEl = e.target;
|
31
|
+
$(document.body).one('mouseup touchend', e => {
|
32
|
+
var $blurredElForm = $(blurredEl).closest('form');
|
33
|
+
// Un-expand if the new focus element is outside of the same form and
|
34
|
+
// all the input elements are empty.
|
35
|
+
if (!$(e.target).closest('form').is($blurredElForm) &&
|
36
|
+
$blurredElForm.find(this.escapeElements).is(function() {
|
37
|
+
return !this.value;
|
38
|
+
})) {
|
39
|
+
this.toggleExpanded(blurredEl, false);
|
40
|
+
}
|
41
|
+
})
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
$(function() {
|
48
|
+
var $nodes = $(COMPONENT_SELECTOR);
|
49
|
+
if ($nodes.length) {
|
50
|
+
new ThreddedTopicForm().init($nodes);
|
51
|
+
}
|
52
|
+
});
|
53
|
+
})(jQuery);
|
54
|
+
|
55
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// We are not currently using any features that require the Babel polyfill
|
2
|
+
// Enable this if we do:
|
3
|
+
//- require babel/polyfill
|
4
|
+
|
5
|
+
//= require jquery
|
6
|
+
//= require jquery_ujs
|
7
|
+
//= require jquery.autosize
|
8
|
+
//= require rails-timeago
|
9
|
+
//= require select2
|
10
|
+
//= require_tree ./thredded
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// This Sass package defines Thredded variables, mixins, and placeholders.
|
2
|
+
|
3
|
+
@import "base/variables";
|
4
|
+
|
5
|
+
@import "base/alerts";
|
6
|
+
@import "base/grid";
|
7
|
+
@import "base/typography";
|
8
|
+
@import "base/buttons";
|
9
|
+
@import "base/forms";
|
10
|
+
@import "base/lists";
|
11
|
+
@import "base/tables";
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "select2";
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@import "base";
|
2
|
+
|
3
|
+
.thredded {
|
4
|
+
@import "utilities/is-compact";
|
5
|
+
@import "utilities/is-expanded";
|
6
|
+
|
7
|
+
@import "layout/main-container";
|
8
|
+
@import "layout/main-navigation";
|
9
|
+
@import "layout/topic-navigation";
|
10
|
+
@import "layout/user-navigation";
|
11
|
+
|
12
|
+
@import "components/base";
|
13
|
+
@import "components/currently-online";
|
14
|
+
@import "components/empty";
|
15
|
+
@import "components/flash-message";
|
16
|
+
@import "components/form-list";
|
17
|
+
@import "components/main-section";
|
18
|
+
@import "components/messageboard";
|
19
|
+
@import "components/pagination";
|
20
|
+
@import "components/post";
|
21
|
+
@import "components/post-form";
|
22
|
+
@import "components/preferences";
|
23
|
+
@import "components/select2";
|
24
|
+
@import "components/topic-delete";
|
25
|
+
@import "components/topic-header";
|
26
|
+
@import "components/topics";
|
27
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
@mixin thredded-alert($font-color, $background-color, $border-color: lighten($font-color, 50%)) {
|
2
|
+
background: $background-color;
|
3
|
+
border-color: $border-color;
|
4
|
+
color: $font-color;
|
5
|
+
|
6
|
+
a {
|
7
|
+
color: darken($font-color, 10%);
|
8
|
+
text-decoration: underline;
|
9
|
+
|
10
|
+
&:focus,
|
11
|
+
&:hover {
|
12
|
+
color: darken($font-color, 15%);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
%thredded--alert {
|
18
|
+
border: solid 1px;
|
19
|
+
border-radius: 3px;
|
20
|
+
margin-bottom: $thredded-base-spacing;
|
21
|
+
padding: $thredded-small-spacing;
|
22
|
+
text-decoration: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
%thredded--alert--success {
|
26
|
+
@include thredded-alert($thredded-alert-success-color, $thredded-alert-success-background);
|
27
|
+
}
|
28
|
+
|
29
|
+
%thredded--alert--danger {
|
30
|
+
@include thredded-alert($thredded-alert-danger-color, $thredded-alert-danger-background);
|
31
|
+
}
|
32
|
+
|
33
|
+
%thredded--alert--info {
|
34
|
+
@include thredded-alert($thredded-alert-info-color, $thredded-alert-info-background);
|
35
|
+
}
|
36
|
+
|
37
|
+
%thredded--alert--warning {
|
38
|
+
@include thredded-alert($thredded-alert-warning-color, $thredded-alert-warning-background);
|
39
|
+
}
|
40
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
%thredded--button {
|
2
|
+
appearance: none;
|
3
|
+
-webkit-font-smoothing: antialiased;
|
4
|
+
background: $thredded-button-background;
|
5
|
+
border-radius: $thredded-button-border-radius;
|
6
|
+
border: none;
|
7
|
+
color: $thredded-button-color;
|
8
|
+
cursor: pointer;
|
9
|
+
display: inline-block;
|
10
|
+
font-family: $thredded-button-font-family;
|
11
|
+
font-size: $thredded-button-font-size;
|
12
|
+
font-weight: $thredded-button-font-weight;
|
13
|
+
line-height: $thredded-button-line-height;
|
14
|
+
padding: 0.75em 1em;
|
15
|
+
text-decoration: none;
|
16
|
+
user-select: none;
|
17
|
+
vertical-align: middle;
|
18
|
+
white-space: nowrap;
|
19
|
+
|
20
|
+
&:hover,
|
21
|
+
&:focus {
|
22
|
+
background-color: $thredded-button-hover-background;
|
23
|
+
color: #fff;
|
24
|
+
}
|
25
|
+
|
26
|
+
&:focus {
|
27
|
+
box-shadow: 0 0 3px $thredded-button-background;
|
28
|
+
outline: none;
|
29
|
+
}
|
30
|
+
|
31
|
+
&:disabled {
|
32
|
+
cursor: not-allowed;
|
33
|
+
opacity: 0.5;
|
34
|
+
|
35
|
+
&:hover {
|
36
|
+
background: $thredded-button-background;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
%thredded--form {
|
2
|
+
fieldset {
|
3
|
+
background-color: lighten($thredded-base-border-color, 10%);
|
4
|
+
border: $thredded-base-border;
|
5
|
+
margin: 0 0 $thredded-small-spacing;
|
6
|
+
padding: $thredded-base-spacing;
|
7
|
+
}
|
8
|
+
|
9
|
+
input,
|
10
|
+
label,
|
11
|
+
select {
|
12
|
+
display: block;
|
13
|
+
font-family: $thredded-base-font-family;
|
14
|
+
font-size: $thredded-base-font-size;
|
15
|
+
}
|
16
|
+
|
17
|
+
label {
|
18
|
+
font-weight: 600;
|
19
|
+
margin-bottom: $thredded-small-spacing / 2;
|
20
|
+
|
21
|
+
&.required::after {
|
22
|
+
content: "*";
|
23
|
+
}
|
24
|
+
|
25
|
+
abbr {
|
26
|
+
display: none;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
[type='color'], [type='date'], [type='datetime'], [type='datetime-local'], [type='email'], [type='month'],
|
31
|
+
[type='number'], [type='password'], [type='search'], [type='tel'], [type='text'], [type='time'], [type='url'],
|
32
|
+
[type='week'], input:not([type]), textarea, select[multiple=multiple] {
|
33
|
+
background-color: $thredded-base-background-color;
|
34
|
+
border: $thredded-form-border;
|
35
|
+
box-shadow: $thredded-form-box-shadow;
|
36
|
+
box-sizing: border-box;
|
37
|
+
font-family: $thredded-base-font-family;
|
38
|
+
font-size: $thredded-base-font-size;
|
39
|
+
padding: $thredded-small-spacing;
|
40
|
+
transition: border-color;
|
41
|
+
width: 100%;
|
42
|
+
|
43
|
+
&:hover {
|
44
|
+
border-color: darken($thredded-base-border-color, 10%);
|
45
|
+
}
|
46
|
+
|
47
|
+
&:focus {
|
48
|
+
border-color: $thredded-action-color;
|
49
|
+
box-shadow: $thredded-form-box-shadow, 0 0 3px $thredded-action-color;
|
50
|
+
outline: none;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
textarea {
|
55
|
+
line-height: $thredded-base-line-height;
|
56
|
+
resize: vertical;
|
57
|
+
}
|
58
|
+
|
59
|
+
input[type="search"] {
|
60
|
+
appearance: none;
|
61
|
+
}
|
62
|
+
|
63
|
+
input[type="checkbox"],
|
64
|
+
input[type="radio"] {
|
65
|
+
display: inline;
|
66
|
+
margin-right: $thredded-small-spacing / 2;
|
67
|
+
}
|
68
|
+
|
69
|
+
input[type="file"] {
|
70
|
+
padding-bottom: $thredded-small-spacing;
|
71
|
+
width: 100%;
|
72
|
+
}
|
73
|
+
|
74
|
+
select {
|
75
|
+
margin-bottom: $thredded-small-spacing;
|
76
|
+
max-width: 100%;
|
77
|
+
width: auto;
|
78
|
+
}
|
79
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@mixin thredded-media-mobile {
|
2
|
+
@media screen and (max-width: map-get($thredded-grid-breakpoint-max-widths, mobile)) {
|
3
|
+
@content;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
7
|
+
@mixin thredded-media-tablet-and-up {
|
8
|
+
@media screen and (min-width: map-get($thredded-grid-breakpoint-max-widths, mobile) + 1px) {
|
9
|
+
@content;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
@mixin thredded--clearfix {
|
14
|
+
&::after {
|
15
|
+
clear: both;
|
16
|
+
content: "";
|
17
|
+
display: block;
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
%thredded--list-unstyled {
|
2
|
+
list-style-type: none;
|
3
|
+
margin: 0;
|
4
|
+
padding: 0;
|
5
|
+
}
|
6
|
+
|
7
|
+
%thredded--default-ul {
|
8
|
+
list-style-type: disc;
|
9
|
+
margin-bottom: $thredded-small-spacing;
|
10
|
+
padding-left: $thredded-base-spacing;
|
11
|
+
}
|
12
|
+
|
13
|
+
%thredded--default-ol {
|
14
|
+
list-style-type: decimal;
|
15
|
+
margin-bottom: $thredded-small-spacing;
|
16
|
+
padding-left: $thredded-base-spacing;
|
17
|
+
}
|
18
|
+
|
19
|
+
%thredded--dl {
|
20
|
+
margin-bottom: $thredded-small-spacing;
|
21
|
+
|
22
|
+
dt {
|
23
|
+
font-weight: bold;
|
24
|
+
margin-top: $thredded-small-spacing;
|
25
|
+
}
|
26
|
+
|
27
|
+
dd {
|
28
|
+
margin: 0;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
%thredded--table {
|
2
|
+
font-feature-settings: "kern", "liga", "tnum";
|
3
|
+
border-collapse: collapse;
|
4
|
+
margin: $thredded-small-spacing 0;
|
5
|
+
table-layout: fixed;
|
6
|
+
width: 100%;
|
7
|
+
|
8
|
+
th {
|
9
|
+
border-bottom: 1px solid darken($thredded-base-border-color, 15%);
|
10
|
+
font-weight: 600;
|
11
|
+
padding: $thredded-small-spacing 0;
|
12
|
+
text-align: left;
|
13
|
+
}
|
14
|
+
|
15
|
+
td {
|
16
|
+
border-bottom: $thredded-base-border;
|
17
|
+
padding: $thredded-small-spacing 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
tr,
|
21
|
+
td,
|
22
|
+
th {
|
23
|
+
vertical-align: middle;
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,36 @@
|
|
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: color 0.1s linear;
|
12
|
+
|
13
|
+
&:active,
|
14
|
+
&:focus,
|
15
|
+
&:hover {
|
16
|
+
color: darken($thredded-action-color, 15%);
|
17
|
+
}
|
18
|
+
|
19
|
+
&:active,
|
20
|
+
&:focus {
|
21
|
+
outline: none;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
%thredded--hr {
|
26
|
+
border-bottom: $thredded-base-border;
|
27
|
+
border-left: none;
|
28
|
+
border-right: none;
|
29
|
+
border-top: none;
|
30
|
+
margin: $thredded-base-spacing 0;
|
31
|
+
}
|
32
|
+
|
33
|
+
%thredded--paragraph {
|
34
|
+
margin: 0 0 $thredded-small-spacing;
|
35
|
+
}
|
36
|
+
|
@@ -0,0 +1,54 @@
|
|
1
|
+
// Grid
|
2
|
+
$thredded-grid-container-max-width: 720px !default;
|
3
|
+
$thredded-grid-breakpoint-max-widths: (mobile: 400px, tablet: 600px) !default;
|
4
|
+
|
5
|
+
// Typography
|
6
|
+
$thredded-base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif !default;
|
7
|
+
$thredded-base-font-size: 1rem !default; // 16px
|
8
|
+
$thredded-font-size-small: 0.875rem !default; // 14px
|
9
|
+
$thredded-base-line-height: 1.5 !default;
|
10
|
+
$thredded-heading-font-family: inherit !default;
|
11
|
+
$thredded-heading-line-height: 1.2 !default;
|
12
|
+
|
13
|
+
// Spacings
|
14
|
+
$thredded-large-spacing: $thredded-base-line-height * 2rem !default;
|
15
|
+
$thredded-base-spacing: $thredded-base-line-height * 1rem !default;
|
16
|
+
$thredded-small-spacing: $thredded-base-spacing / 2 !default;
|
17
|
+
|
18
|
+
// Named colors
|
19
|
+
$thredded-brand: #4a90e2 !default;
|
20
|
+
$thredded-dark-gray: #333 !default;
|
21
|
+
$thredded-light-gray: #eee !default;
|
22
|
+
|
23
|
+
// Colors of text, background, and actions (links)
|
24
|
+
$thredded-base-font-color: #575d6b !default;
|
25
|
+
$thredded-base-background-color: #fff !default;
|
26
|
+
$thredded-action-color: $thredded-brand !default;
|
27
|
+
|
28
|
+
// Colors of alerts and flash messages
|
29
|
+
$thredded-alert-danger-background: #fbe3e4 !default;
|
30
|
+
$thredded-alert-danger-color: #a94442 !default;
|
31
|
+
$thredded-alert-info-background: #e6f3fa !default;
|
32
|
+
$thredded-alert-info-color: darken($thredded-brand, 15%) !default;
|
33
|
+
$thredded-alert-success-background: #e6efc2 !default;
|
34
|
+
$thredded-alert-success-color: #3c763d !default;
|
35
|
+
$thredded-alert-warning-background: #fcf8e3 !default;
|
36
|
+
$thredded-alert-warning-color: #8a6d3b !default;
|
37
|
+
|
38
|
+
// Borders
|
39
|
+
$thredded-base-border-color: $thredded-light-gray !default;
|
40
|
+
$thredded-base-border: 1px solid $thredded-base-border-color !default;
|
41
|
+
|
42
|
+
// Forms
|
43
|
+
$thredded-form-border: 1px solid darken($thredded-base-border-color, 5%) !default;
|
44
|
+
$thredded-form-box-shadow: inset 0 1px 3px rgba(#000, 0.06) !default;
|
45
|
+
|
46
|
+
// Buttons
|
47
|
+
$thredded-button-background: $thredded-action-color !default;
|
48
|
+
$thredded-button-border-radius: 3px !default;
|
49
|
+
$thredded-button-color: #fff !default;
|
50
|
+
$thredded-button-font-family: $thredded-base-font-family !default;
|
51
|
+
$thredded-button-font-size: $thredded-font-size-small !default;
|
52
|
+
$thredded-button-font-weight: 600 !default;
|
53
|
+
$thredded-button-hover-background: darken($thredded-button-background, 15%) !default;
|
54
|
+
$thredded-button-line-height: 1 !default;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
&--currently-online {
|
2
|
+
background-color: $thredded-base-border-color;
|
3
|
+
bottom: -1.25rem;
|
4
|
+
padding: $thredded-base-spacing;
|
5
|
+
position: fixed;
|
6
|
+
right: 0;
|
7
|
+
width: 16.25rem; // 260px
|
8
|
+
|
9
|
+
@include thredded-media-mobile {
|
10
|
+
display: none;
|
11
|
+
}
|
12
|
+
|
13
|
+
&.thredded--is-expanded {
|
14
|
+
bottom: 0;
|
15
|
+
position: fixed;
|
16
|
+
right: 0;
|
17
|
+
}
|
18
|
+
|
19
|
+
&--title {
|
20
|
+
@extend %thredded--heading;
|
21
|
+
margin-bottom: $thredded-base-spacing;
|
22
|
+
}
|
23
|
+
|
24
|
+
&--avatar {
|
25
|
+
background-color: $thredded-base-font-color;
|
26
|
+
border-radius: 50%;
|
27
|
+
display: inline-block;
|
28
|
+
height: 1.75rem;
|
29
|
+
margin-right: $thredded-small-spacing;
|
30
|
+
vertical-align: middle;
|
31
|
+
width: 1.75rem;
|
32
|
+
}
|
33
|
+
|
34
|
+
&--user {
|
35
|
+
padding: $thredded-small-spacing 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
&--users {
|
39
|
+
@extend %thredded--list-unstyled;
|
40
|
+
height: 0;
|
41
|
+
visibility: hidden;
|
42
|
+
}
|
43
|
+
|
44
|
+
&.thredded--is-expanded &--users {
|
45
|
+
height: auto;
|
46
|
+
visibility: visible;
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
&--flash-message {
|
2
|
+
@extend %thredded--alert;
|
3
|
+
}
|
4
|
+
|
5
|
+
&--flash-message--success {
|
6
|
+
@extend %thredded--alert--success;
|
7
|
+
}
|
8
|
+
|
9
|
+
&--flash-message--error {
|
10
|
+
@extend %thredded--alert--danger;
|
11
|
+
}
|
12
|
+
|
13
|
+
&--flash-message--notice {
|
14
|
+
@extend %thredded--alert--info;
|
15
|
+
}
|
16
|
+
|
17
|
+
&--flash-message--alert {
|
18
|
+
@extend %thredded--alert--warning;
|
19
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
&--form-list {
|
2
|
+
@extend %thredded--list-unstyled;
|
3
|
+
|
4
|
+
&.on-top {
|
5
|
+
border-bottom: $thredded-base-border;
|
6
|
+
margin-bottom: $thredded-base-spacing * 1.5;
|
7
|
+
padding-bottom: $thredded-small-spacing;
|
8
|
+
}
|
9
|
+
|
10
|
+
li {
|
11
|
+
transition: all 0.15s ease-out 0s;
|
12
|
+
margin-bottom: $thredded-small-spacing;
|
13
|
+
}
|
14
|
+
|
15
|
+
label {
|
16
|
+
transition: all 0.15s ease-out 0s;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
&--form-list--admin-options {
|
21
|
+
label {
|
22
|
+
cursor: pointer;
|
23
|
+
display: inline-block;
|
24
|
+
margin-bottom: 0;
|
25
|
+
margin-right: $thredded-base-spacing;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
&--form-list--hint {
|
30
|
+
@extend %thredded--paragraph;
|
31
|
+
color: lighten($thredded-base-font-color, 20%);
|
32
|
+
font-size: $thredded-font-size-small;
|
33
|
+
font-weight: normal;
|
34
|
+
position: relative;
|
35
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
&--messageboard {
|
2
|
+
@extend %thredded--link;
|
3
|
+
border: $thredded-base-border;
|
4
|
+
display: block;
|
5
|
+
margin-bottom: $thredded-base-spacing;
|
6
|
+
padding: $thredded-base-spacing;
|
7
|
+
position: relative;
|
8
|
+
|
9
|
+
header {
|
10
|
+
margin-bottom: $thredded-small-spacing;
|
11
|
+
}
|
12
|
+
|
13
|
+
&:hover {
|
14
|
+
background-color: lighten($thredded-brand, 40%);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
&--messageboard--title {
|
19
|
+
@extend %thredded--heading;
|
20
|
+
display: inline-block;
|
21
|
+
float: left;
|
22
|
+
font-size: 1.125rem; // 18px
|
23
|
+
line-height: 1.2;
|
24
|
+
margin-bottom: 0;
|
25
|
+
margin-right: $thredded-small-spacing;
|
26
|
+
vertical-align: baseline;
|
27
|
+
}
|
28
|
+
|
29
|
+
&--messageboard--meta {
|
30
|
+
@extend %thredded--heading;
|
31
|
+
color: lighten($thredded-base-font-color, 30%);
|
32
|
+
display: inline-block;
|
33
|
+
font-weight: normal;
|
34
|
+
margin-bottom: 0;
|
35
|
+
vertical-align: baseline;
|
36
|
+
}
|
37
|
+
|
38
|
+
&--messageboard--description {
|
39
|
+
@extend %thredded--paragraph;
|
40
|
+
clear: both;
|
41
|
+
margin-bottom: $thredded-small-spacing / 2;
|
42
|
+
color: $thredded-base-font-color;
|
43
|
+
}
|
44
|
+
|
45
|
+
&--messageboard--byline {
|
46
|
+
@extend %thredded--paragraph;
|
47
|
+
color: lighten($thredded-base-font-color, 30%);
|
48
|
+
font-size: 0.875em;
|
49
|
+
font-weight: normal;
|
50
|
+
margin-bottom: 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
&--messageboard--create {
|
54
|
+
text-align: center;
|
55
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
&--pagination {
|
2
|
+
border-top: $thredded-base-border;
|
3
|
+
margin-top: $thredded-base-spacing;
|
4
|
+
padding-top: $thredded-base-spacing;
|
5
|
+
text-align: center;
|
6
|
+
|
7
|
+
> span {
|
8
|
+
color: lighten($thredded-base-font-color, 30%);
|
9
|
+
display: inline-block;
|
10
|
+
margin-right: $thredded-small-spacing;
|
11
|
+
|
12
|
+
> a {
|
13
|
+
color: $thredded-base-font-color;
|
14
|
+
display: inline-block;
|
15
|
+
|
16
|
+
&:focus,
|
17
|
+
&:hover {
|
18
|
+
color: $thredded-action-color;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
&.current, > a {
|
23
|
+
padding: ($thredded-small-spacing / 2) $thredded-small-spacing;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
&--post-form {
|
2
|
+
label {
|
3
|
+
display: none;
|
4
|
+
}
|
5
|
+
|
6
|
+
&--wrapper {
|
7
|
+
border-top: $thredded-base-border;
|
8
|
+
margin-top: $thredded-base-spacing;
|
9
|
+
padding-top: $thredded-large-spacing;
|
10
|
+
}
|
11
|
+
|
12
|
+
&--title {
|
13
|
+
@extend %thredded--heading;
|
14
|
+
font-size: 1.25rem; // 20px
|
15
|
+
margin-bottom: $thredded-base-spacing;
|
16
|
+
}
|
17
|
+
|
18
|
+
&--submit {
|
19
|
+
margin-top: $thredded-small-spacing;
|
20
|
+
}
|
21
|
+
}
|