Add anti-follow language (#1233)
This commit is contained in:
parent
651ab3ce35
commit
f400b42e38
2 changed files with 8 additions and 1 deletions
|
|
@ -18,11 +18,13 @@ function initializeUserSidebar(user) {
|
|||
}
|
||||
followedTags.forEach(function(t){
|
||||
renderedTagsCount++
|
||||
tagHTML = tagHTML + '<div class="sidebar-nav-element" id="sidebar-element-'+t.name+'">\
|
||||
if (t.points > 0.0) {
|
||||
tagHTML = tagHTML + '<div class="sidebar-nav-element" id="sidebar-element-'+t.name+'">\
|
||||
<a class="sidebar-nav-link" href="/t/'+t.name+'">\
|
||||
<span class="sidebar-nav-tag-text">#'+t.name+'</span>\
|
||||
</a>\
|
||||
</div>';
|
||||
}
|
||||
if (document.getElementById("default-sidebar-element-"+t.name)){
|
||||
document.getElementById("default-sidebar-element-"+t.name).remove();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +36,14 @@
|
|||
<% if @followed_tags %>
|
||||
<h2>Followed tags (<%= @user.following_tags_count %>)</h2>
|
||||
<p><em>Adjust <strong>Follow Weight</strong> to make a tag show up less or more in your feed (default 1.0)</em></p>
|
||||
<% negative_follow_shown_once = false %>
|
||||
<% @followed_tags.each do |follow| %>
|
||||
<% tag = follow.followable %>
|
||||
<% if tag %>
|
||||
<% if follow.points < 0 && !negative_follow_shown_once %>
|
||||
<h2>Negative Tags (anti-follows)</h2>
|
||||
<% negative_follow_shown_once = true %>
|
||||
<% end %>
|
||||
<% color = HexComparer.new([tag.bg_color_hex || "#0000000",tag.text_color_hex || "#ffffff"]).brightness(0.8) %>
|
||||
<div class="single-article" style="border-color:<%= color %>;box-shadow: 3px 3px 0px <%= color %>">
|
||||
<h2>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue