small fixes
This commit is contained in:
@@ -112,11 +112,11 @@ and (min-width: 1000px)
|
||||
}
|
||||
|
||||
img.avatar {
|
||||
image-rendering:optimizeSpeed;
|
||||
image-rendering: optimizeSpeed;
|
||||
image-rendering:-moz-crisp-edges;
|
||||
image-rendering:-o-crisp-edges;
|
||||
image-rendering:optimize-contrast;
|
||||
image-rendering:-webkit-optimize-contrast;
|
||||
image-rendering: optimize-contrast;
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
# force_ssl
|
||||
helper :all
|
||||
include ToolsHelper
|
||||
include UsersHelper
|
||||
helper_method :current_user
|
||||
|
||||
private
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
module ToolsHelper
|
||||
end
|
||||
@@ -1,8 +1,8 @@
|
||||
module UsersHelper
|
||||
def avatar_url(user_id)
|
||||
def avatar_url(user_id, size)
|
||||
u = User.find_by_id(user_id)
|
||||
u.nil? ? ign = :char : ign = u.ign
|
||||
return "https://minotar.net/avatar/#{ign}/8"
|
||||
return "https://minotar.net/avatar/#{ign}/#{size}"
|
||||
end
|
||||
|
||||
def mc_running?
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<%= link_to current_user.name.truncate(14), current_user %><br/>
|
||||
<%= link_to "Logout", logout_path %>
|
||||
</span>
|
||||
<%= link_to image_tag(avatar_url(current_user.id), :class => "avatar size32"), current_user %>
|
||||
<%= link_to image_tag(avatar_url(current_user.id, 32), :class => "avatar"), current_user %>
|
||||
<% else %>
|
||||
<%= link_to "Log in", login_path, :action => "new" %><br/>
|
||||
<%= link_to "Register", register_path %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%= simple_form_for @user do |f| %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :ign, label: "Ingame name" %>
|
||||
<%= f.input :ign, label: "Exact ingame name" %>
|
||||
<%= f.input :email %>
|
||||
<%= f.input :password %>
|
||||
<%= f.input :password_confirmation %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="user-info">
|
||||
<div id="edit_profile"><%= link_to "edit profile", edit_user_path(@user), :class => "btn-blue" %></div>
|
||||
<%= image_tag avatar_url(@user.id), :class => "user-avatar avatar", :alt => "avatar" %><br/>
|
||||
<%= image_tag avatar_url(@user.id, 128), :class => "user-avatar avatar", :alt => "avatar" %><br/>
|
||||
<% if @user.banned %>
|
||||
<span class="user-banned">This user is banned!</span>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user