0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-15 03:51:32 +01:00
gitea/templates/shared/avatar_upload_crop.tmpl
Kerwin Bryant 40426addfa
Add cropping support when modifying the user/org/repo avatar (#33498)
Fixed #33321

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-06 21:07:44 +08:00

9 lines
512 B
Handlebars

{{- /* we do not need to set for/id here, global aria init code will add them automatically */ -}}
<label>{{.LabelText}}</label>
<input class="avatar-file-with-cropper" name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
{{- /* the cropper-panel must be next sibling of the input "avatar" */ -}}
<div class="cropper-panel tw-hidden">
<div class="tw-my-2">{{ctx.Locale.Tr "settings.cropper_prompt"}}</div>
<div class="cropper-wrapper"><img class="cropper-source" src alt></div>
</div>