thredded-workgroup 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +12 -4
- data/.rubocop_todo.yml +170 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +9 -0
- data/Gemfile +1 -0
- data/Guardfile +16 -39
- data/README.md +27 -10
- data/Rakefile +1 -0
- data/app/assets/config/thredded_workgroup_manifest.js +3 -0
- data/app/assets/images/thredded/workgroup/envelope-o.svg +2 -0
- data/app/assets/images/thredded/workgroup/envelope-open-o.svg +2 -0
- data/app/assets/javascripts/thredded-workgroup.js +1 -13
- data/app/assets/javascripts/thredded/workgroup/components/followers.es6 +24 -0
- data/app/assets/javascripts/thredded/workgroup/components/overflow.es6 +60 -0
- data/app/assets/javascripts/thredded/workgroup/components/topics.es6 +151 -0
- data/app/assets/javascripts/thredded/workgroup/core/thredded_workgroup.js +1 -0
- data/app/assets/javascripts/thredded/workgroup/core/touch.es6 +16 -0
- data/app/assets/javascripts/thredded/workgroup/index.js +3 -0
- data/app/assets/stylesheets/thredded-workgroup.scss +2 -0
- data/app/assets/stylesheets/thredded/workgroup/_followers.scss +51 -0
- data/app/assets/stylesheets/thredded/workgroup/_navs.scss +29 -7
- data/app/assets/stylesheets/thredded/workgroup/_overflow.scss +71 -0
- data/app/assets/stylesheets/thredded/workgroup/_topics.scss +186 -16
- data/app/controllers/concerns/thredded/workgroup/all_unread_followed_topics.rb +31 -0
- data/app/controllers/thredded/application_controller.rb +23 -0
- data/app/controllers/thredded/posts_controller.rb +1 -0
- data/app/controllers/thredded/workgroup/application_controller.rb +1 -0
- data/app/controllers/thredded/workgroup/navs_controller.rb +1 -0
- data/app/controllers/thredded/workgroup/read_states_controller.rb +14 -0
- data/app/controllers/thredded/workgroup/topics_controller.rb +18 -0
- data/app/helpers/thredded/application_helper.rb +1 -0
- data/app/helpers/thredded/workgroup/application_helper.rb +1 -0
- data/app/jobs/thredded/workgroup/mark_all_topics_read_job.rb +13 -0
- data/app/view_hooks/thredded/all_view_hooks.rb +9 -0
- data/app/view_hooks/thredded/workgroup/view_hooks.rb +28 -0
- data/app/view_models/thredded/topic_view.rb +17 -0
- data/app/view_models/thredded/topics_page_view.rb +1 -0
- data/app/views/thredded/shared/nav/_unread_topics.html.erb +1 -0
- data/app/views/thredded/topics/_followers.html.erb +23 -0
- data/app/views/thredded/topics/_topic.html.erb +25 -28
- data/app/views/thredded/workgroup/navs/_personal_nav.html.erb +7 -1
- data/app/views/thredded/workgroup/navs/all_topics.html.erb +1 -1
- data/app/views/thredded/workgroup/navs/awaiting.html.erb +1 -1
- data/app/views/thredded/workgroup/navs/following.html.erb +1 -1
- data/app/views/thredded/workgroup/navs/unread.html.erb +1 -1
- data/app/views/thredded/workgroup/topics/_controls.html.erb +21 -0
- data/app/views/thredded/workgroup/topics/_last_post.html.erb +11 -0
- data/app/views/thredded/workgroup/topics/_last_post_with_controls.html.erb +12 -0
- data/app/views/thredded/workgroup/topics/_topics_with_last_post.html.erb +16 -0
- data/bin/rails.rb +1 -0
- data/bin/rspec +1 -0
- data/bin/update_from_thredded +1 -0
- data/config/locales/en.yml +11 -0
- data/config/routes.rb +9 -0
- data/docs/followers-above-post.png +0 -0
- data/docs/navbar.png +0 -0
- data/lib/thredded/workgroup.rb +1 -0
- data/lib/thredded/workgroup/engine.rb +11 -2
- data/lib/thredded/workgroup/thredded_route_delegator.rb +1 -0
- data/lib/thredded/workgroup/version.rb +2 -1
- data/shared.gemfile +4 -0
- data/thredded-workgroup.gemspec +6 -10
- metadata +62 -60
- data/app/assets/javascripts/thredded/workgroup/follow.js +0 -36
- data/app/assets/javascripts/thredded/workgroup/topics.js +0 -18
- data/app/views/thredded/topics/_topics_with_last_post.html.erb +0 -14
@@ -0,0 +1,60 @@
|
|
1
|
+
(($) => {
|
2
|
+
|
3
|
+
const MAX_HEIGHT = 100; // $thredded-condensed-height
|
4
|
+
const MAX_SCROLL_HEIGHT = MAX_HEIGHT + 8; // why ?
|
5
|
+
const ThreddedWorkgroup = window.ThreddedWorkgroup;
|
6
|
+
|
7
|
+
function findOverflows() {
|
8
|
+
$('.thredded--condensable').each((i, elem) => {
|
9
|
+
let $elem = $(elem);
|
10
|
+
let sH = $elem.prop('scrollHeight');
|
11
|
+
if (sH > MAX_SCROLL_HEIGHT) {
|
12
|
+
// let h = $elem.height();
|
13
|
+
// let oH = $elem.prop('offsetHeight');;
|
14
|
+
// let overflow = sH - h;
|
15
|
+
// let id = $elem.closest(".thredded--topics--topic").attr("id");
|
16
|
+
// console.log({i, id, sH, h, oH, overflow});
|
17
|
+
$elem.addClass("thredded--condensable--overflowing");
|
18
|
+
$elem.find(".thredded--condensable--overflow-only").fadeIn()
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
function hoverOverflow() {
|
24
|
+
if (ThreddedWorkgroup.touching) {
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
let $elem = $(this);
|
28
|
+
if ($elem.hasClass('thredded--condensable--condensed')) {
|
29
|
+
$elem.addClass('thredded--condensable--hover');
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
function unhoverOverflow() {
|
34
|
+
let $elem = $(this);
|
35
|
+
$elem.removeClass('thredded--condensable--hover');
|
36
|
+
}
|
37
|
+
|
38
|
+
function clickOverflow(e) {
|
39
|
+
e.preventDefault();
|
40
|
+
// e.stopPropagation(); actually it needs to propagate to topics.es6
|
41
|
+
let $elem = $(this);
|
42
|
+
if ($elem.hasClass('thredded--condensable--hover')) {
|
43
|
+
$elem.removeClass('thredded--condensable--hover');
|
44
|
+
$elem.removeClass('thredded--condensable--condensed').addClass('thredded--condensable--expanded');
|
45
|
+
} else {
|
46
|
+
// touch only or already condensed, so clicking again
|
47
|
+
$elem.toggleClass('thredded--condensable--condensed').toggleClass('thredded--condensable--expanded');
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
const Thredded = window.Thredded;
|
52
|
+
|
53
|
+
Thredded.onPageLoad(() => {
|
54
|
+
findOverflows();
|
55
|
+
$('.thredded--condensable.thredded--condensable--overflowing')
|
56
|
+
.hover(hoverOverflow, unhoverOverflow)
|
57
|
+
.click(clickOverflow);
|
58
|
+
})
|
59
|
+
|
60
|
+
})(jQuery);
|
@@ -0,0 +1,151 @@
|
|
1
|
+
(($) => {
|
2
|
+
const ThreddedWorkgroup = window.ThreddedWorkgroup;
|
3
|
+
|
4
|
+
function updateFollowStatus($topic, followStatus) {
|
5
|
+
if (followStatus) {
|
6
|
+
$topic.removeClass('thredded--topic-notfollowing').addClass('thredded--topic-following')
|
7
|
+
} else {
|
8
|
+
$topic.removeClass('thredded--topic-following').addClass('thredded--topic-notfollowing')
|
9
|
+
}
|
10
|
+
};
|
11
|
+
|
12
|
+
function clickFollowToggle(e) {
|
13
|
+
e.preventDefault();
|
14
|
+
e.stopPropagation();
|
15
|
+
var $this = $(this);
|
16
|
+
var $topic = $this.parents('.thredded--topics--topic');
|
17
|
+
var following = $topic.hasClass('thredded--topic-following');
|
18
|
+
var topicId = $topic.data("topic");
|
19
|
+
var messageboardId = $topic.data("messageboard");
|
20
|
+
var rootPath = $('#thredded--container').data('thredded-root-url');
|
21
|
+
|
22
|
+
var path = "" + rootPath + messageboardId + "/" + topicId + "/" + (following ? 'unfollow.json' : 'follow.json');
|
23
|
+
// console.log("about to ajax: " + path);
|
24
|
+
$.ajax({
|
25
|
+
url: path, type: "POST", success: function (data) {
|
26
|
+
updateFollowStatus($topic, data["follow"])
|
27
|
+
}
|
28
|
+
});
|
29
|
+
}
|
30
|
+
|
31
|
+
function hoverTopicFollowToggle(){
|
32
|
+
if (ThreddedWorkgroup.touching) {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
console.log("i am trying to hover");
|
36
|
+
$(this).closest('.thredded--topics--topic').find('.js-thredded-follow-toggle').addClass("thredded--topic-hovering");
|
37
|
+
}
|
38
|
+
function unhoverTopicFollowToggle(){
|
39
|
+
$(this).closest('.thredded--topics--topic').find('.js-thredded-follow-toggle').removeClass("thredded--topic-hovering");
|
40
|
+
}
|
41
|
+
function hoverTopicTitle() {
|
42
|
+
if (ThreddedWorkgroup.touching) {
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
$(this).closest('.thredded--topics--topic').addClass("thredded--topic-hovering");
|
46
|
+
}
|
47
|
+
|
48
|
+
function unhoverTopicTitle() {
|
49
|
+
$(this).closest('.thredded--topics--topic').removeClass("thredded--topic-hovering");
|
50
|
+
}
|
51
|
+
|
52
|
+
function hoverTopic() {
|
53
|
+
if (ThreddedWorkgroup.touching) {
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
$(this).find('.thredded--topic-last-post-with-controls').addClass("thredded--topic-hovering");;
|
57
|
+
}
|
58
|
+
|
59
|
+
function revealControls($topic){
|
60
|
+
$topic
|
61
|
+
}
|
62
|
+
|
63
|
+
function toggleControlsOnTouch() {
|
64
|
+
if (ThreddedWorkgroup.touching) {
|
65
|
+
$(this).closest('.thredded--topics--topic').find('.thredded--topic-last-post-with-controls').toggleClass("thredded--topic-hovering");;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
function unhoverTopic() {
|
70
|
+
if (ThreddedWorkgroup.touching) {
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
$(this).find('.thredded--topic-last-post-with-controls').removeClass("thredded--topic-hovering");
|
74
|
+
}
|
75
|
+
|
76
|
+
function viewTopic(e) {
|
77
|
+
var $a = $(this).closest('.thredded--topics--topic').find("a.thredded--topic--view-button");
|
78
|
+
window.location.href = $a.attr('href');
|
79
|
+
e.preventDefault();
|
80
|
+
e.stopPropagation();
|
81
|
+
}
|
82
|
+
|
83
|
+
function hoverTopicReadToggle() {
|
84
|
+
if (ThreddedWorkgroup.touching) {
|
85
|
+
return;
|
86
|
+
}
|
87
|
+
$(this).closest('.thredded--topics--topic').find('.thredded--topic--read-state-toggle').addClass("thredded--topic-hovering");
|
88
|
+
}
|
89
|
+
|
90
|
+
function unhoverTopicReadToggle() {
|
91
|
+
$(this).closest('.thredded--topics--topic').find('.thredded--topic--read-state-toggle').removeClass("thredded--topic-hovering");
|
92
|
+
}
|
93
|
+
|
94
|
+
function updateReadStatus($topic, isRead) {
|
95
|
+
if (isRead) {
|
96
|
+
$topic.addClass("thredded--topic-read").removeClass("thredded--topic-unread");
|
97
|
+
} else {
|
98
|
+
$topic.addClass("thredded--topic-unread").removeClass("thredded--topic-read");
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
function readToggle() {
|
103
|
+
let $topic = $(this).closest('.thredded--topics--topic');
|
104
|
+
let path;
|
105
|
+
if ($topic.hasClass("thredded--topic-read")) {
|
106
|
+
path = $topic.find('a.thredded--topic--read-state-toggle.thredded--topic--mark-as-unread').data("postPath");
|
107
|
+
} else {
|
108
|
+
path = $topic.find('a.thredded--topic--read-state-toggle.thredded--topic--mark-as-read').data("postPath");
|
109
|
+
}
|
110
|
+
$.ajax({
|
111
|
+
url: path, type: "POST", success: function (data) {
|
112
|
+
updateReadStatus($topic, data["read"]);
|
113
|
+
}
|
114
|
+
});
|
115
|
+
}
|
116
|
+
|
117
|
+
function hoverHighlight() {
|
118
|
+
if (ThreddedWorkgroup.touching) {
|
119
|
+
return;
|
120
|
+
}
|
121
|
+
$(this).addClass('thredded--topic-hovering');
|
122
|
+
}
|
123
|
+
|
124
|
+
function unhoverHighlight() {
|
125
|
+
$(this).removeClass('thredded--topic-hovering');
|
126
|
+
}
|
127
|
+
|
128
|
+
const Thredded = window.Thredded;
|
129
|
+
|
130
|
+
Thredded.onPageLoad(() => {
|
131
|
+
console.log("I am load");
|
132
|
+
$('.js-thredded-follow-toggle')
|
133
|
+
.hover(hoverTopicFollowToggle, unhoverTopicFollowToggle)
|
134
|
+
.click(clickFollowToggle);
|
135
|
+
$('.thredded--topics--topic .thredded--topic-title')
|
136
|
+
.hover(hoverTopicTitle, unhoverTopicTitle)
|
137
|
+
.click(viewTopic);
|
138
|
+
$('.thredded--topic--read-state-toggle')
|
139
|
+
.hover(hoverTopicReadToggle, unhoverTopicReadToggle)
|
140
|
+
.click(readToggle);
|
141
|
+
$('.thredded--topics--topic')
|
142
|
+
.hover(hoverTopic, unhoverTopic)
|
143
|
+
$('.thredded--topics--topic thredded--topic--view-button')
|
144
|
+
.click(viewTopic);
|
145
|
+
$('.thredded--topic-last-post-with-controls')
|
146
|
+
.hover(hoverHighlight, unhoverHighlight)
|
147
|
+
.click(toggleControlsOnTouch);
|
148
|
+
});
|
149
|
+
|
150
|
+
})(jQuery);
|
151
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
window.ThreddedWorkgroup = window.ThreddedWorkgroup || {}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
(($) => {
|
2
|
+
const Thredded = window.Thredded;
|
3
|
+
const ThreddedWorkgroup = window.ThreddedWorkgroup;
|
4
|
+
|
5
|
+
Thredded.onPageLoad(() => {
|
6
|
+
ThreddedWorkgroup.touching = undefined;
|
7
|
+
$(document)
|
8
|
+
.on("touchstart", () => {
|
9
|
+
ThreddedWorkgroup.touching = true;
|
10
|
+
})
|
11
|
+
.on("touchend", () => {
|
12
|
+
// timeout to make sure it happens after any spurious hovers have happened
|
13
|
+
window.setTimeout(()=>{ ThreddedWorkgroup.touching = undefined; }, 200);
|
14
|
+
});
|
15
|
+
});
|
16
|
+
})(jQuery);
|
@@ -0,0 +1,51 @@
|
|
1
|
+
.thredded--topic-header {
|
2
|
+
.thredded--topic-header--follow-info form {
|
3
|
+
position: static;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
7
|
+
.thredded--topic-followers {
|
8
|
+
line-height: 1.75rem;
|
9
|
+
@include thredded--clearfix;
|
10
|
+
}
|
11
|
+
|
12
|
+
.thredded--follower {
|
13
|
+
background-color: #eeeeee;
|
14
|
+
border: 1px solid #eeeeee;
|
15
|
+
border-radius: 5px;
|
16
|
+
padding: 2px;
|
17
|
+
margin: 2px;
|
18
|
+
white-space: nowrap;
|
19
|
+
display: inline-block;
|
20
|
+
line-height: 1rem;
|
21
|
+
|
22
|
+
button {
|
23
|
+
color: rgba(0, 0, 0, 0.54);
|
24
|
+
background: inherit;
|
25
|
+
padding: 0;
|
26
|
+
border-style: none;
|
27
|
+
.thredded--topics--follow-icon,
|
28
|
+
.thredded--topics--unfollow-icon {
|
29
|
+
position: static;
|
30
|
+
opacity: 0.5;
|
31
|
+
height: 0.75rem;
|
32
|
+
width: 0.75rem;
|
33
|
+
}
|
34
|
+
|
35
|
+
& .thredded--topics--follow-icon,
|
36
|
+
&:hover .thredded--topics--unfollow-icon {
|
37
|
+
display: inline-block;
|
38
|
+
}
|
39
|
+
|
40
|
+
& .thredded--topics--unfollow-icon,
|
41
|
+
&:hover .thredded--topics--follow-icon {
|
42
|
+
display: none;
|
43
|
+
}
|
44
|
+
|
45
|
+
&:hover .thredded--topics--unfollow-icon {
|
46
|
+
opacity: 0.75;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
}
|
51
|
+
|
@@ -8,17 +8,33 @@ ul.thredded--workgroup {
|
|
8
8
|
padding-left: 0;
|
9
9
|
li {
|
10
10
|
display: inline-block;
|
11
|
-
margin-right: 1rem;
|
12
|
-
&.active {
|
13
|
-
font-weight: bold;
|
14
|
-
}
|
15
11
|
a {
|
16
12
|
display: inline-block;
|
17
|
-
color:
|
18
|
-
padding: 0.75rem 0;
|
13
|
+
color: $thredded-secondary-nav-color;
|
14
|
+
padding: 0.75rem 0.5rem;
|
15
|
+
@include thredded-media-tablet-and-up {
|
16
|
+
padding: 0.75rem 1rem;
|
17
|
+
}
|
18
|
+
@include thredded-media-desktop-and-up {
|
19
|
+
padding: 0.75rem 1.5rem;
|
20
|
+
}
|
19
21
|
text-decoration: none;
|
20
22
|
&:hover {
|
21
|
-
text-decoration:
|
23
|
+
text-decoration: none;
|
24
|
+
background-color: #eeeeee;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
&.active {
|
28
|
+
font-weight: bold;
|
29
|
+
position: relative;
|
30
|
+
top: 1px;
|
31
|
+
border: 1px solid #eee;
|
32
|
+
border-bottom: 1px solid white;
|
33
|
+
a {
|
34
|
+
color: $thredded-brand;
|
35
|
+
&:hover{
|
36
|
+
background-color: white;
|
37
|
+
}
|
22
38
|
}
|
23
39
|
}
|
24
40
|
.expanded {
|
@@ -31,5 +47,11 @@ ul.thredded--workgroup {
|
|
31
47
|
display: none;
|
32
48
|
}
|
33
49
|
}
|
50
|
+
.thredded--user-navigation--unread-topics--followed-count{
|
51
|
+
display: none;
|
52
|
+
@include thredded-media-desktop-and-up{
|
53
|
+
display: inline-block;
|
54
|
+
}
|
55
|
+
}
|
34
56
|
}
|
35
57
|
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
$thredded-condensed-height: 100px;
|
2
|
+
.thredded--condensable {
|
3
|
+
box-sizing: border-box;
|
4
|
+
position: relative;
|
5
|
+
top: 0;
|
6
|
+
z-index: 1;
|
7
|
+
|
8
|
+
&.thredded--condensable--condensed {
|
9
|
+
max-height: $thredded-condensed-height;
|
10
|
+
overflow: hidden;
|
11
|
+
opacity: 0.7;
|
12
|
+
|
13
|
+
&.thredded--topic-hovering, &.thredded--condensable--hover, .thredded--topic-hovering & {
|
14
|
+
opacity: 1;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
&.thredded--condensable--expanded,
|
19
|
+
[data-thredded-condensable-hover=reveal] &.thredded--condensable--condensed.thredded--condensable--hover {
|
20
|
+
max-height: unset;
|
21
|
+
overflow: unset;
|
22
|
+
}
|
23
|
+
|
24
|
+
cursor: pointer;
|
25
|
+
}
|
26
|
+
|
27
|
+
.thredded--condensable--expand, .thredded--condensable--condense {
|
28
|
+
color: #cccccc;
|
29
|
+
float: right;
|
30
|
+
font-size: 0.75rem;
|
31
|
+
|
32
|
+
.thredded--condensable.thredded--condensable--hover & {
|
33
|
+
color: $thredded-brand;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.thredded--condensable--overflow-only {
|
38
|
+
display: none;
|
39
|
+
}
|
40
|
+
|
41
|
+
.thredded--condensable--overflowing {
|
42
|
+
$overflow-only-height: 20px;
|
43
|
+
|
44
|
+
.thredded--condensable--overflow-only {
|
45
|
+
display: block;
|
46
|
+
width: 100%;
|
47
|
+
display: none;
|
48
|
+
height: $overflow-only-height;
|
49
|
+
background-color: white;
|
50
|
+
z-index: 3;
|
51
|
+
border-top: 1px dashed #cccccc;
|
52
|
+
}
|
53
|
+
|
54
|
+
&.thredded--condensable--condensed .thredded--condensable--overflow-only {
|
55
|
+
position: absolute;
|
56
|
+
top: $thredded-condensed-height - $overflow-only-height;
|
57
|
+
.thredded--condensable--condense {
|
58
|
+
display: none;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
&.thredded--condensable--expanded .thredded--condensable--overflow-only,
|
63
|
+
[data-thredded-condensable-hover=reveal] &.thredded--condensable--condensed.thredded--condensable--hover .thredded--condensable--overflow-only{
|
64
|
+
position: static;
|
65
|
+
border-top: none;
|
66
|
+
.thredded--condensable--expand {
|
67
|
+
display: none;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
.thredded--topic-source cite a {
|
2
2
|
color: #a5aab6;
|
3
3
|
text-decoration: none;
|
4
|
+
|
4
5
|
&:hover {
|
5
6
|
color: #4a90e2;
|
6
7
|
|
@@ -17,36 +18,205 @@ cite.thredded--messageboard-name {
|
|
17
18
|
.thredded--topic-post-and-last-user {
|
18
19
|
max-width: 35rem;
|
19
20
|
margin: auto;
|
20
|
-
|
21
|
+
padding-top: 1rem;
|
22
|
+
}
|
23
|
+
|
24
|
+
.thredded--topics--topic {
|
25
|
+
a.thredded-follow-toggle {
|
26
|
+
position: absolute;
|
27
|
+
right: -1.6rem;
|
28
|
+
top: 0;
|
29
|
+
|
30
|
+
svg, svg.thredded--topics--follow-icon {
|
31
|
+
position: static;
|
32
|
+
fill: currentColor;
|
33
|
+
display: inline-block;
|
34
|
+
font-size: 1em;
|
35
|
+
width: 1.4rem;
|
36
|
+
height: 1.4rem;
|
37
|
+
opacity: 0.4;
|
38
|
+
}
|
21
39
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
&.thredded--hovering {
|
27
|
-
opacity: 1;
|
40
|
+
&:hover svg {
|
41
|
+
cursor: pointer;
|
42
|
+
opacity: 0.7;
|
43
|
+
color: #4a90e2;
|
28
44
|
}
|
29
45
|
}
|
30
|
-
|
31
|
-
|
46
|
+
|
47
|
+
&.thredded--topic-following a.thredded-follow-toggle {
|
48
|
+
svg.thredded--topics--unfollow-icon {
|
49
|
+
display: none;
|
50
|
+
}
|
51
|
+
|
52
|
+
&:hover, &.thredded--topic-hovering {
|
53
|
+
svg.thredded--topics--follow-icon {
|
54
|
+
color: darken($thredded-brand, 20%);
|
55
|
+
}
|
56
|
+
}
|
32
57
|
}
|
33
|
-
}
|
34
58
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
59
|
+
&.thredded--topic-notfollowing a.thredded-follow-toggle {
|
60
|
+
svg.thredded--topics--unfollow-icon {
|
61
|
+
opacity: 0.2;
|
62
|
+
}
|
63
|
+
|
64
|
+
svg.thredded--topics--follow-icon {
|
65
|
+
display: none;
|
66
|
+
}
|
67
|
+
|
68
|
+
&:hover, &.thredded--topic-hovering {
|
69
|
+
svg.thredded--topics--unfollow-icon {
|
70
|
+
opacity: 0.5;
|
71
|
+
}
|
72
|
+
}
|
40
73
|
}
|
41
74
|
}
|
42
75
|
|
43
|
-
|
76
|
+
|
77
|
+
.thredded--topics--topic.thredded--topic-hovering {
|
44
78
|
cursor: pointer;
|
45
79
|
|
46
80
|
.thredded--topic-title a {
|
47
81
|
color: #4a90e2;
|
82
|
+
|
48
83
|
&:hover {
|
49
84
|
cursor: pointer;
|
50
85
|
}
|
51
86
|
}
|
87
|
+
|
88
|
+
.thredded--topic-controls {
|
89
|
+
.thredded--topic--view-button {
|
90
|
+
background-color: $thredded-button-hover-background;
|
91
|
+
color: $thredded-button-hover-color;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
.thredded--topic-controls {
|
97
|
+
.thredded--topic--read-state-toggle.thredded--topic-hovering {
|
98
|
+
background-color: $thredded-button-hover-background;
|
99
|
+
color: $thredded-button-hover-color;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
.thredded--topic-last-post-with-controls {
|
104
|
+
position: relative;
|
105
|
+
top: 0;
|
106
|
+
}
|
107
|
+
|
108
|
+
.thredded--topic-controls {
|
109
|
+
display: none;
|
110
|
+
position: absolute;
|
111
|
+
top: 5px;
|
112
|
+
right: 0;
|
113
|
+
z-index: 4;
|
114
|
+
|
115
|
+
.thredded--topic-hovering & {
|
116
|
+
display: block;
|
117
|
+
background: #ffffff88;
|
118
|
+
}
|
119
|
+
|
120
|
+
.thredded--icon {
|
121
|
+
height: 0.85em;
|
122
|
+
margin: 0;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
.thredded--topics--topic > .thredded--topic--read-state-toggle {
|
127
|
+
border-radius: 50%;
|
128
|
+
display: inline-block;
|
129
|
+
font-weight: 900;
|
130
|
+
font-size: 0.8rem;
|
131
|
+
height: 2rem;
|
132
|
+
left: -$thredded-topics-topic-posts-counter-width;
|
133
|
+
line-height: 2rem;
|
134
|
+
margin-right: $thredded-base-spacing;
|
135
|
+
position: absolute;
|
136
|
+
text-align: center;
|
137
|
+
top: 0;
|
138
|
+
width: 2rem;
|
139
|
+
transition: background 0.1s linear, color 0.1s linear;
|
140
|
+
|
141
|
+
.thredded--icon {
|
142
|
+
height: 1.25em;
|
143
|
+
position: relative;
|
144
|
+
top: 10%;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
.thredded--topic-read {
|
149
|
+
> .thredded--topics--title a {
|
150
|
+
font-weight: lighter;
|
151
|
+
}
|
152
|
+
|
153
|
+
> .thredded--topic--read-state-toggle {
|
154
|
+
background: $thredded-badge-inactive-background;
|
155
|
+
color: $thredded-badge-inactive-color;
|
156
|
+
|
157
|
+
&.thredded--topic-hovering {
|
158
|
+
background: darken(opacify($thredded-badge-inactive-background, 0.25), 20%);
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
.thredded--topic--read-state-toggle.thredded--topic--mark-as-read {
|
163
|
+
display: none
|
164
|
+
}
|
165
|
+
|
166
|
+
}
|
167
|
+
|
168
|
+
.thredded--topic-unread {
|
169
|
+
> .thredded--topics--title a {
|
170
|
+
font-weight: bold;
|
171
|
+
}
|
172
|
+
|
173
|
+
> .thredded--topic--read-state-toggle {
|
174
|
+
background: $thredded-badge-active-background;
|
175
|
+
color: $thredded-badge-active-color;
|
176
|
+
|
177
|
+
.thredded--topics--read-icon {
|
178
|
+
display: none;
|
179
|
+
}
|
180
|
+
|
181
|
+
&.thredded--topic-hovering {
|
182
|
+
background: darken($thredded-badge-active-background, 20%);
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
.thredded--topic--read-state-toggle.thredded--topic--mark-as-unread {
|
187
|
+
display: none
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
.thredded--button {
|
192
|
+
svg.thredded--icon {
|
193
|
+
max-width: 16px;
|
194
|
+
}
|
195
|
+
|
196
|
+
&.thredded--topic-hovering {
|
197
|
+
background: darken($thredded-badge-active-background, 20%);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
.thredded--topic-following {
|
202
|
+
.thredded--button.thredded--topic--follow {
|
203
|
+
display: none;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
|
207
|
+
.thredded--topic-notfollowing {
|
208
|
+
.thredded--button.thredded--topic--unfollow {
|
209
|
+
display: none;
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
@include thredded-media-mobile {
|
214
|
+
.thredded--topic-hovering {
|
215
|
+
.thredded--button.thredded--topic--mark-as-unread,
|
216
|
+
.thredded--button.thredded--topic--mark-as-read,
|
217
|
+
.thredded--button.thredded--topic--follow,
|
218
|
+
.thredded--button.thredded--topic--unfollow {
|
219
|
+
display: none;
|
220
|
+
}
|
221
|
+
}
|
52
222
|
}
|