New dashboard idea (still not happy though)

This commit is contained in:
2016-11-22 12:34:59 +09:00
parent 4159525c25
commit 80506aa92e
18 changed files with 192 additions and 79 deletions

View File

@ -1,12 +1,18 @@
component Avatar(user *arn.User)
a.user.ajax(href="/+" + user.Nick, title=user.Nick)
if user.Avatar != ""
if strings.Contains(user.Avatar, "gravatar.com")
img.user-image(src=user.Avatar + "?s=100&r=x&d=mm", alt=user.Nick)
else
img.user-image(src=user.Avatar, alt=user.Nick)
AvatarNoLink(user)
component AvatarNoLink(user *arn.User)
if user.Avatar != ""
if strings.Contains(user.Avatar, "gravatar.com")
img.user-image(src=user.Avatar + "?s=100&r=x&d=mm", alt=user.Nick)
else
svg.user-image(width="50", height="50")
circle.head(cx="25", cy="19", r="10")
circle.body(cx="25", cy="50", r="20")
//- text(x="25", y="44", text-anchor="middle") TODO
img.user-image(src=user.Avatar, alt=user.Nick)
else
SVGAvatar(50)
component SVGAvatar(size int)
svg.user-image(width=size, height=size, viewBox="0 0 50 50")
circle.head(cx="25", cy="19", r="10")
circle.body(cx="25", cy="50", r="20")
//- text(x="25", y="44", text-anchor="middle") TODO