Skip to content

Commit

Permalink
Reduce avatar image size
Browse files Browse the repository at this point in the history
  • Loading branch information
veelenga committed Aug 11, 2017
1 parent a5ae689 commit 6a6e982
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions public/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,8 @@ a.post-thumbnail:focus {

.site .avatar {
border-radius: 50%;
width: 45px;
height: 45px;
}

.page-content img.wp-smiley,
Expand Down
4 changes: 2 additions & 2 deletions src/models/user.cr
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class User < Granite::ORM
role == "admin"
end

def avatar_url
"#{github_url}.png"
def avatar_url(size : Int32 = 400)
"#{github_url}.png?s=#{size}"
end

def github_url
Expand Down
2 changes: 1 addition & 1 deletion src/views/layouts/_profile.slang
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aside.widget.widget_meta
h2.widget-title
a href="/me"
img.avatar width=45 src=current_user!.avatar_url
img.avatar src=current_user!.avatar_url 45
= current_user!.name

ul
Expand Down

0 comments on commit 6a6e982

Please sign in to comment.