-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from TreinaDev/refactor/melhora-layout-do-perfil
Refactor/melhora layout do perfil
- Loading branch information
Showing
32 changed files
with
360 additions
and
79 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
body{ | ||
min-width: 400px; | ||
} | ||
|
||
ul{ | ||
list-style: none !important; | ||
} | ||
|
||
input[type="checkbox"]:checked { | ||
background-color: #a130fd !important; | ||
} | ||
|
||
.field_with_errors input{ | ||
border: 1px solid red !important; | ||
} | ||
|
||
.home_logo{ | ||
width: 12rem; | ||
margin: 0 7rem 0 7rem; | ||
} | ||
|
||
#searchText{ | ||
width: 380px !important; | ||
} | ||
|
||
.categories{ | ||
width: 35% !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.drop-menu{ | ||
margin-right: 2.5rem !important; | ||
} | ||
|
||
.dropdown-menu[data-bs-popper]{ | ||
left: -20px !important; | ||
} | ||
|
||
.dropdown-item:active { | ||
background-color: #9030df !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.feed-post:hover{ | ||
transform: scale(1.01, 1.01); | ||
transition-duration: 300ms; | ||
} | ||
|
||
.trix-content{ | ||
color: rgb(10, 10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.follower-card:hover{ | ||
transform: scale(1.01, 1.01); | ||
transition-duration: 300ms; | ||
} | ||
|
||
.profile-image{ | ||
min-width: 80px; | ||
} | ||
|
||
.img-cover{ | ||
object-fit: cover; | ||
object-position: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module PersonalInfosHelper | ||
def info_fixer(value) | ||
if value.nil? || value.blank? | ||
'não informado' | ||
else | ||
value | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<ul> | ||
<% if personal_info.has_key?('visibility') && user_is_owner %> | ||
<li class="fs-5 mb-3"> | ||
<span class="fw-bold"><%= t(personal_info['visibility'] ? 'visibility.true' : 'visibility.false') %></span> | ||
</li> | ||
<% end %> | ||
<% personal_info.each do |attribute, value| %> | ||
<% next if attribute == 'visibility' %> | ||
<% new_value = (value && attribute == 'birth_date') ? l(value.to_date) : value %> | ||
<li> | ||
<span class="fw-bold"><%= PersonalInfo.human_attribute_name(attribute) %></span>: | ||
<%= info_fixer(new_value) %> | ||
</li> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<div> | ||
<% user_is_owner = profile.user == current_user %> | ||
<br> | ||
<div class="border py-1 px-2 rounded mb-3"> | ||
<div class="d-flex gap-1"> | ||
<%= image_tag 'about-icon', width: '23rem', class: 'mb-2' %> | ||
<h3><%= Profile.human_attribute_name(:cover_letter) %></h3> | ||
</div> | ||
<h5><%= profile.cover_letter %></h5><br> | ||
</div> | ||
|
||
<% if profile.personal_info[:visibility] || user_is_owner %> | ||
<div class="border py-1 px-2 rounded mb-3"> | ||
<div class="d-flex gap-1"> | ||
<%= image_tag 'person-fill', width: '28rem', class: 'mb-2' %> | ||
<h3><%= PersonalInfo.model_name.human %></h3> | ||
</div> | ||
<%= render 'personal_info', personal_info: personal_info, user_is_owner: user_is_owner %> | ||
<%= link_to 'Editar Informações Pessoais', edit_user_profile_path, class:'btn btn-secondary mx-4 mb-3' if user_is_owner %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="border py-1 px-2 rounded mb-3"> | ||
<% if profile.professional_infos.visibles_list.any? || user_is_owner %> | ||
<div class="d-flex gap-1"> | ||
<%= image_tag 'briefcase-solid', width: '24rem', class: 'mb-2 mx-1' %> | ||
<h3><%= ProfessionalInfo.model_name.human %></h3> | ||
</div> | ||
<% end %> | ||
|
||
<p> | ||
<%= link_to 'Adicionar Experiência Profissional', new_user_profile_professional_info_path, class:'btn btn-primary' if user_is_owner %> | ||
</p> | ||
<% professional_infos.each do |professional_info| %> | ||
<% if professional_info.visibility || user_is_owner %> | ||
<h4> | ||
<%= ProfessionalInfo.human_attribute_name(:company) %>: <%= professional_info.company %> | ||
</h4> | ||
<ul> | ||
<% if user_is_owner %> | ||
<li class="fs-5 mb-3"> | ||
<span class="fw-bold"><%= t(professional_info['visibility'] ? 'visibility.true' : 'visibility.false') %></span> | ||
</li> | ||
<% end %> | ||
<li> | ||
<span class="fw-bold"><%= ProfessionalInfo.human_attribute_name(:current_job) %></span>: <%= t(professional_info.current_job) %> | ||
</li> | ||
<li> | ||
<span class="fw-bold"><%= ProfessionalInfo.human_attribute_name(:position) %></span>: <%= professional_info.position %> | ||
</li> | ||
<li> | ||
<span class="fw-bold"><%= ProfessionalInfo.human_attribute_name(:description) %></span>: <%= professional_info.description %> | ||
</li> | ||
<li> | ||
<span class="fw-bold"><%= ProfessionalInfo.human_attribute_name(:start_date) %></span>: <%= l professional_info.start_date if professional_info.start_date%> | ||
</li> | ||
<li> | ||
<span class="fw-bold"><%= ProfessionalInfo.human_attribute_name(:end_date) %></span>: <%= l professional_info.end_date if professional_info.end_date %> | ||
</li> | ||
</ul> | ||
<% end %> | ||
<p> | ||
<%= link_to 'Editar Experiência Profissional', edit_professional_info_path(professional_info), class:'btn btn-secondary' if user_is_owner %> | ||
</p> | ||
<% end %> | ||
</div> | ||
|
||
<div class="border py-1 px-2 rounded mb-3"> | ||
<% if profile.education_infos.visibles_list.any? || user_is_owner %> | ||
<div class="d-flex gap-2"> | ||
<%= image_tag 'user-graduate-solid', width: '24rem', class: 'mb-2 mx-1' %> | ||
<h3><%= EducationInfo.model_name.human %></h3> | ||
</div> | ||
<% end %> | ||
<p> | ||
<%= link_to 'Adicionar Formação Acadêmica', new_user_profile_education_info_path, class:'btn btn-primary' if user_is_owner %> | ||
</p> | ||
<% profile.education_infos.each do |education_info| %> | ||
<% if education_info.visibility || user_is_owner %> | ||
<h4> | ||
<%= EducationInfo.human_attribute_name(:institution) %>: <%= education_info.institution %> | ||
</h4> | ||
<ul> | ||
<% if user_is_owner %> | ||
<li class="fs-5 mb-3"> | ||
<span class="fw-bold"><%= t(education_info['visibility'] ? 'visibility.true' : 'visibility.false') %></span> | ||
</li> | ||
<% end %> | ||
<li> | ||
<span class="fw-bold"><%= EducationInfo.human_attribute_name(:course) %></span>: <%= education_info.course %> | ||
</li> | ||
<li> | ||
<span class="fw-bold"><%= EducationInfo.human_attribute_name(:start_date) %></span>: <%= l education_info.start_date if education_info.start_date%> | ||
</li> | ||
<li> | ||
<span class="fw-bold"><%= EducationInfo.human_attribute_name(:end_date) %></span>: <%= l education_info.end_date if education_info.end_date %> | ||
</li> | ||
</ul> | ||
<% end %> | ||
<p> | ||
<%= link_to 'Editar Formação Acadêmica', edit_education_info_path(education_info), class:'btn btn-secondary' if user_is_owner %> | ||
</p> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div id='profile-job-categories' class="border py-1 px-2 rounded mb-3"> | ||
<% if profile.profile_job_categories.any? || user_is_owner %> | ||
<div class="d-flex gap-1"> | ||
<%= image_tag 'person-working', width: '28rem', class: 'mb-2 mx-1' %> | ||
<h3><%= t('content.section_title') %></h3> | ||
</div> | ||
<% end %> | ||
<%= link_to t('links.new_profile_job_category_path'), new_profile_job_category_path, class:'btn btn-primary' if user_is_owner %> | ||
<div class='mt-2'> | ||
<% profile.profile_job_categories.each do |profile_job_category| %> | ||
<p><strong><%= profile_job_category.job_category.name %></strong></p> | ||
<% if profile_job_category.description.present? %> | ||
<p><%= profile_job_category.description %></p> | ||
<% else %> | ||
<p><%= t('content.profile_job_category_without_description') %></p> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<% if profile.photo.present? && profile.valid? %> | ||
<%= image_tag profile.photo, alt: t('.alt_text'), class: 'img-cover' %> | ||
<%= image_tag profile.photo, alt: t('.alt_text'), width: '130rem', class: 'img-cover rounded-circle mx-auto mt-2' %> | ||
<% else %> | ||
<%= image_tag 'default_portfoliorrr_photo.png', alt: t('.alt_text'), class: 'img-cover' %> | ||
<%= image_tag 'default_portfoliorrr_photo.png', width: '130rem', alt: t('.alt_text'), class: 'img-cover rounded-circle mx-auto mt-2' %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.