Profile images in user feed headers are now clickable to open the image full-sized (are no longer links to the page you're already on)
This commit is contained in:
parent
a4285c2db1
commit
d59ef45569
@ -1,5 +1,5 @@
|
||||
{{define "author-info"}}
|
||||
<div class="author-info" hx-boost="true">
|
||||
<div class="author-info" hx-boost="true">
|
||||
{{template "circle-profile-img" .}}
|
||||
<span class="author-info__name-and-handle">
|
||||
<div class="author-info__display-name row">
|
||||
@ -12,5 +12,25 @@
|
||||
</div>
|
||||
<div class="author-info__handle">@{{.Handle}}</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{/*
|
||||
For User Feed header-- the profile image is no longer a link, but should pop up in the image carousel on click
|
||||
*/}}
|
||||
{{define "author-info-no-link"}}
|
||||
<div class="author-info" hx-boost="true">
|
||||
{{template "circle-profile-img-no-link" .}}
|
||||
<span class="author-info__name-and-handle">
|
||||
<div class="author-info__display-name row">
|
||||
{{.DisplayName}}
|
||||
{{if .IsPrivate}}
|
||||
<div class="circle-outline">
|
||||
<img class="svg-icon" src="/static/icons/lock.svg" width="24" height="24">
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="author-info__handle">@{{.Handle}}</div>
|
||||
</span>
|
||||
</div>
|
||||
{{end}}
|
||||
|
@ -11,7 +11,6 @@
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
<!-- TODO: How to use this in a User Feed without a ton of prop-drilling? -->
|
||||
{{define "circle-profile-img-no-link"}}
|
||||
<a class="profile-image"
|
||||
hx-trigger="click consume"
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
<div class="user-header__info-container">
|
||||
<div class="row">
|
||||
{{template "author-info" .}}
|
||||
{{template "author-info-no-link" .}}
|
||||
{{template "following-button" .}}
|
||||
</div>
|
||||
<div class="user-header__bio">
|
||||
|
Loading…
x
Reference in New Issue
Block a user