indicate on web profile when an account has moved

This commit is contained in:
tobi 2024-03-11 12:17:49 +01:00
parent 3812d37a82
commit 8df36058fe
2 changed files with 26 additions and 0 deletions

View file

@ -38,6 +38,11 @@
overflow: hidden;
margin-bottom: 1rem;
.moved-to {
padding: 1rem;
text-align: center;
}
.header-image-wrapper {
position: relative;
padding-top: 33.33%; /* aspect-ratio 1/3 */

View file

@ -17,10 +17,31 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ -}}
{{- define "profileMovedTo" -}}
{{- with .account.Moved }}
<div class="moved-to">
<b>
This account has permanently moved to
<a
href="{{ .URL }}"
class="nounderline"
rel="nofollow noreferrer noopener"
target="_blank"
>
@{{ .Username }}
</a>
</b>
</div>
{{- end }}
{{- end -}}
{{- with . }}
<main class="profile">
<h2 class="sr-only">Profile for {{ .account.Username -}}</h2>
<section class="profile-header" role="region" aria-label="Basic info">
{{- if .account.Moved }}
{{- include "profileMovedTo" . | indent 2 }}
{{- end }}
<div class="header-image-wrapper">
<img
src="{{- .account.Header -}}"