fix profile generation
This commit is contained in:
@ -1,42 +1,41 @@
|
||||
.px-4.py-16.mx-auto.sm:max-w-xl.md:max-w-full.lg:max-w-screen-xl.md:px-24.lg:px-8.lg:py-20
|
||||
.flex.flex-col.max-w-screen-lg.overflow-hidden.bg-white.border.rounded.shadow-sm.lg:flex-row.sm:mx-auto
|
||||
.relative{:class => "lg:w-1/2"}
|
||||
-if @member.picture_url
|
||||
= image_tag @member.picture_url, class: "object-cover w-full lg:absolute h-80 lg:h-full"
|
||||
.flex.flex-col.justify-center.p-8.lg:p-16.lg:pl-10{:class => "lg:w-1/2"}
|
||||
%div
|
||||
%p.inline-block.px-3.py-px.mb-4.text-xs.font-semibold.tracking-wider.text-teal-900.uppercase.rounded-full.bg-teal-accent-400
|
||||
Role ?
|
||||
%h5.mb-3.text-3xl.font-extrabold.leading-none.sm:text-4xl
|
||||
= @member.name
|
||||
.mb-8.text-gray-800
|
||||
.prose= markdown(@member.bio)
|
||||
.flex.items-center
|
||||
%a.inline-flex.items-center.font-semibold.transition-colors.duration-200.text-deep-purple-accent-400.hover:text-deep-purple-800{"aria-label" => "", :href => "/"}
|
||||
Learn More
|
||||
%svg.inline-block.w-3.ml-2{:fill => "currentColor", :viewbox => "0 0 12 12"}
|
||||
%path{:d => "M9.707,5.293l-5-5A1,1,0,0,0,3.293,1.707L7.586,6,3.293,10.293a1,1,0,1,0,1.414,1.414l5-5A1,1,0,0,0,9.707,5.293Z"}
|
||||
%section.mx-20
|
||||
.flex.justify-center
|
||||
.px-4.py-4.md:py-10.lg:py-16.mx-5.md:mx-12.lg:mx-20.text-center
|
||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
Settings and profiles
|
||||
%h4.text-xl.mt-4.md:text-2xl
|
||||
Allowing you to create and edit various profiles
|
||||
.mt-4.text-lg.pt-4
|
||||
You can have seperate profiles as teacher, artist, or coop member.
|
||||
If you choose to create them they will be publicly listed.
|
||||
Techers and Artists may then create events.
|
||||
|
||||
-if @member == current_member or current_member.admin?
|
||||
.grid.grid-cols-2.mx-20
|
||||
.first
|
||||
- Profile.types.each do |kind|
|
||||
.grid.grid-cols-2
|
||||
- if profile = @member.profile(kind)
|
||||
%div
|
||||
=profile.Kind
|
||||
exists with name
|
||||
=link_to profile.name , profile_path(profile) , class: "underline"
|
||||
= link_to edit_profile_path(profile) do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||
Edit
|
||||
=profile.Kind
|
||||
-else
|
||||
%div Create new #{kind.capitalize} profile as
|
||||
= link_to new_profile_path(kind: kind) do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||
New
|
||||
= kind.capitalize
|
||||
|
||||
.flex.justify-around
|
||||
= link_to edit_member_path(@member) do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||
Edit
|
||||
- if @member.profile
|
||||
= link_to edit_profile_path(@member.profile) do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||
Edit profile profile
|
||||
-else
|
||||
= link_to new_profile_path do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||
Create profile profile
|
||||
|
||||
.grid.grid-cols-3.gap-4
|
||||
-@member.entities.each do |entity|
|
||||
%div= entity.type
|
||||
%div= entity.name
|
||||
%div= entity.value
|
||||
= form_tag( destroy_member_session_path , {method: :delete } ) do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
||||
Sign out
|
||||
.grid.grid-cols-6.gap-4.mt-10.mx-10
|
||||
-@member.entities.each do |entity|
|
||||
%div= entity.type
|
||||
%div= entity.name
|
||||
%div= entity.value
|
||||
= form_tag( destroy_member_session_path , {method: :delete } ) do
|
||||
%button.mt-10.ml-10.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
||||
Sign out
|
||||
|
Reference in New Issue
Block a user