fancy
This commit is contained in:
@@ -261,6 +261,30 @@ and (min-width: 0px) //TODO
|
||||
}
|
||||
}
|
||||
|
||||
.role {
|
||||
display: inline;
|
||||
text-decoration: none;
|
||||
border-bottom: 2px solid;
|
||||
&.superadmin, &.admin {
|
||||
border-color: #d22;
|
||||
}
|
||||
&.mod {
|
||||
border-color: #6af;
|
||||
}
|
||||
&.donor {
|
||||
border-color: #fa0;
|
||||
}
|
||||
&.default {
|
||||
border-color: #000;
|
||||
}
|
||||
&.unconfirmed {
|
||||
border-color: #888;
|
||||
}
|
||||
&.banned, &.disabled {
|
||||
border-color: #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
#comments {
|
||||
margin: 50px 0 0 40px;
|
||||
.comment {
|
||||
|
||||
@@ -67,5 +67,9 @@ require "open-uri"
|
||||
yt
|
||||
end
|
||||
|
||||
def link_user(user)
|
||||
link_to user.name, user, class: "role #{user.role.name}"
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
@@ -9,7 +9,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="post-info">
|
||||
by <%= link_to p.author.name, p.author %> on <%= p.created_at.strftime("%e. %b %Y") %>
|
||||
by <%= link_user p.author %> on <%= p.created_at.strftime("%e. %b %Y") %>
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<%= Sanitize.clean(GitHub::Markdown.render_gfm(p.content), Sanitize::Config::RELAXED).html_safe %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="post-title">
|
||||
<h1><%= @post.title %></h1>
|
||||
</div>
|
||||
<div class="post-info"><%= link_to @post.author.name, @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
|
||||
<div class="post-info"><%= link_user @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
|
||||
<% if mod? %>
|
||||
<%= link_to "edit", edit_blogpost_path(@post.id), class: "post-edit" %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="comment <%= "author" if c.author == @post.author %>" id="comment-<%= c.id %>">
|
||||
<span class="comment-info"><%= link_to c.author.name, c.author %> <%= c.created_at.strftime("%e. %b %Y, %H:%m") %>
|
||||
<span class="comment-info"><%= link_user c.author %> <%= c.created_at.strftime("%e. %b %Y, %H:%m") %>
|
||||
<% if mod? || c.author.is?(current_user) %>
|
||||
<div class="editlink"><%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c) %></div>
|
||||
<% end %>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div id="userlist">
|
||||
<% @users.each do |u| %>
|
||||
<div class="list-user">
|
||||
<%= link_to u, :class => "avatar_url" do %>
|
||||
<%= link_user u, :class => "avatar_url" do %>
|
||||
<%= image_tag(avatar_url(u.id, 64), :class => "avatar", :alt => "avatar") %>
|
||||
<% end %>
|
||||
<div class="user-info">
|
||||
|
||||
Reference in New Issue
Block a user