2020-04-25 08:04:23 -07:00
|
|
|
.card
|
|
|
|
.card-body
|
2020-05-10 13:27:39 -07:00
|
|
|
= bootstrap_form_for(current_user, url: { action: :edit }, html: { multipart: true }, method: :patch) do |f|
|
2020-04-25 08:04:23 -07:00
|
|
|
|
|
|
|
= f.text_field :display_name, label: t('views.settings.profile.displayname')
|
|
|
|
|
|
|
|
.media#profile-picture-media
|
|
|
|
.pull-left
|
2020-05-10 01:40:48 -07:00
|
|
|
%img.avatar-lg.mr-3{ src: current_user.profile_picture.url(:medium) }
|
2020-04-25 08:04:23 -07:00
|
|
|
.media-body
|
|
|
|
= f.file_field :profile_picture, label: t('views.settings.profile.avatar')
|
|
|
|
|
2020-05-10 01:40:48 -07:00
|
|
|
.row#profile-picture-crop-controls{ style: 'display: none;' }
|
2020-04-25 08:04:23 -07:00
|
|
|
.col-sm-10.col-md-8
|
|
|
|
%strong= t('views.settings.profile.avatar_adjust')
|
2020-05-10 01:40:48 -07:00
|
|
|
%img#profile-picture-cropper{ src: current_user.profile_picture.url(:medium) }
|
2020-04-25 08:04:23 -07:00
|
|
|
.col-sm-2.col-md-4
|
|
|
|
.btn-group
|
2020-05-10 01:40:48 -07:00
|
|
|
%button.btn.btn-inverse#cropper-zoom-out{ type: :button }
|
2020-04-25 08:04:23 -07:00
|
|
|
%i.fa.fa-search-minus
|
2020-05-10 01:40:48 -07:00
|
|
|
%button.btn.btn-inverse#cropper-zoom-in{ type: :button }
|
2020-04-25 08:04:23 -07:00
|
|
|
%i.fa.fa-search-plus
|
|
|
|
|
2020-05-06 17:30:50 -07:00
|
|
|
.row.mb-2#profile-header-media
|
|
|
|
.col
|
2020-05-10 01:40:48 -07:00
|
|
|
%img.mw-100.mr-3{ src: current_user.profile_header.url(:mobile) }
|
2020-05-06 17:30:50 -07:00
|
|
|
.col-xs-12.mt-3.mt-sm-0.pl-3.pr-3
|
2020-04-25 08:04:23 -07:00
|
|
|
= f.file_field :profile_header, label: t('views.settings.profile.header')
|
|
|
|
|
2020-05-10 01:40:48 -07:00
|
|
|
.row#profile-header-crop-controls{ style: 'display: none;' }
|
2020-04-25 08:04:23 -07:00
|
|
|
.col-sm-10.col-md-8
|
|
|
|
%strong= t('views.settings.profile.header_adjust')
|
2020-05-10 01:40:48 -07:00
|
|
|
%img#profile-header-cropper{ src: current_user.profile_header.url(:web) }
|
2020-04-25 08:04:23 -07:00
|
|
|
.col-sm-2.col-md-4
|
|
|
|
.btn-group
|
2020-05-10 01:40:48 -07:00
|
|
|
%button.btn.btn-inverse#cropper-header-zoom-out{ type: :button }
|
2020-04-25 08:04:23 -07:00
|
|
|
%i.fa.fa-search-minus
|
2020-05-10 01:40:48 -07:00
|
|
|
%button.btn.btn-inverse#cropper-header-zoom-in{ type: :button }
|
2020-04-25 08:04:23 -07:00
|
|
|
%i.fa.fa-search-plus
|
|
|
|
|
|
|
|
= f.text_field :motivation_header, label: t('views.settings.profile.motivation'), placeholder: t('views.settings.profile.placeholder.motivation')
|
|
|
|
|
2020-04-26 17:11:54 -07:00
|
|
|
= f.text_field :website, label: t('views.settings.profile.website'), placeholder: 'https://example.com'
|
2020-04-25 08:04:23 -07:00
|
|
|
|
|
|
|
= f.text_field :location, label: t('views.settings.profile.location'), placeholder: t('views.settings.profile.placeholder.location')
|
|
|
|
|
|
|
|
= f.text_area :bio, label: t('views.settings.profile.bio'), placeholder: t('views.settings.profile.placeholder.bio')
|
|
|
|
|
|
|
|
= f.check_box :show_foreign_themes, label: 'Render other user themes when visiting their profile'
|
|
|
|
|
2020-05-17 12:14:40 -07:00
|
|
|
- for attrib in %i(profile_picture_x profile_picture_y profile_picture_w profile_picture_h)
|
2020-04-25 08:04:23 -07:00
|
|
|
= f.hidden_field attrib, id: attrib
|
|
|
|
|
2020-05-17 12:14:40 -07:00
|
|
|
- for attrib in %i(profile_header_x profile_header_y profile_header_w profile_header_h)
|
2020-04-25 08:04:23 -07:00
|
|
|
= f.hidden_field attrib, id: attrib
|
|
|
|
|
2020-05-10 01:40:48 -07:00
|
|
|
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|