Skip to content

Commit

Permalink
some gravatar and profile tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfaerman committed Feb 2, 2024
1 parent 9bd30fe commit 54ba62e
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 67 deletions.
8 changes: 7 additions & 1 deletion internal/handlers/static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ html {
.grid-container.split {
grid-template-columns: 5fr 2fr;
text-align: left;

}

.grid-container.split .sticky {
Expand Down Expand Up @@ -1219,3 +1218,10 @@ i.swap-icon:hover i.hover {
display: inline-block !important;
}




.profile.avatar {
border: 2px solid var(--border-color-softer);
border-radius: 50%;
}
16 changes: 11 additions & 5 deletions internal/views/account.templ
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ func (v Account) Nav() Menu {

templ (v Account) Profile() {
@Page(v.Nav()) {
<div class="grid-container split">
<div>
<h1>{ v.Account.Name }</h1>
@Image(ImageAttrs{
<div class="grid-container left-split">
<div class="profile-sidebar">
<div class="profile-card">
@Image(ImageAttrs{
URL: GravatarURL(ctx, v.Account, 250),
Width: 250,
Height: 250,
Height: 250,
Extra: templ.Attributes{
"class": "profile avatar",
},
})
<h1>{ v.Account.Name }</h1>
<h2>{ v.Account.Callsign().Call }</h2>
</div>
@templ.Raw(v.Account.About)
</div>
<div>
Expand Down
114 changes: 67 additions & 47 deletions internal/views/account_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/views/image.templ
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ templ Image(attrs ImageAttrs) {
} else {
<img
src={ attrs.URL }
class={ attrs.Classes }
width={ attrs.width() }
height={ attrs.height() }
{ attrs.Extra... }
Expand Down
13 changes: 0 additions & 13 deletions internal/views/image_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 54ba62e

Please sign in to comment.