show profiles good
This commit is contained in:
parent
080e02a1f3
commit
a2fe816cc8
21
Gemfile.lock
21
Gemfile.lock
@ -1,14 +1,6 @@
|
||||
GIT
|
||||
remote: https://github.com/ruby2js/ruby2js/
|
||||
revision: f204f4e8f14cde6e4d4c6aafc55251a8d488a78d
|
||||
branch: haml_fix
|
||||
specs:
|
||||
ruby2js (5.0.1)
|
||||
parser
|
||||
regexp_parser (~> 2.1.1)
|
||||
|
||||
PATH
|
||||
remote: ../merged
|
||||
remote: https://github.com/HubFeenixMakers/merged
|
||||
revision: accb6682675f92eed6e1c306995017b1c8da1289
|
||||
specs:
|
||||
merged (0.1.0)
|
||||
active_hash
|
||||
@ -19,6 +11,15 @@ PATH
|
||||
redcarpet
|
||||
ruby2js (~> 5.0, >= 5.0.1)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/ruby2js/ruby2js/
|
||||
revision: f204f4e8f14cde6e4d4c6aafc55251a8d488a78d
|
||||
branch: haml_fix
|
||||
specs:
|
||||
ruby2js (5.0.1)
|
||||
parser
|
||||
regexp_parser (~> 2.1.1)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
|
@ -13,12 +13,14 @@
|
||||
%ul.space-y-6.px-20
|
||||
- main_menu.each do |link , text|
|
||||
%li
|
||||
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => text }= text
|
||||
%a.w-full.h-full.block.tracking-wide.text-xl.p-2.rounded-lg.hover:bg-cyan-200{ :href => link , :title => text}
|
||||
= text
|
||||
%li
|
||||
%hr
|
||||
- mobile_menu.each do |link , text|
|
||||
%li
|
||||
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => text }= text
|
||||
%a.w-full.h-full.block.tracking-wide.text-xl.p-2.rounded-lg.hover:bg-cyan-200{ :href => link , :title => text}
|
||||
= text
|
||||
:javascript
|
||||
var drop_hidden = true;
|
||||
function menu_on() {
|
||||
|
@ -0,0 +1,8 @@
|
||||
= render "profile_card" , profile: profile
|
||||
.flex.justify-between.mt-4
|
||||
= 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
|
||||
= form_tag( profile_path(profile.id) , {method: :delete } ) do
|
||||
%button.bg-red-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
||||
Delete Profile
|
@ -1,21 +1,6 @@
|
||||
.flex.flex-col.justify-center
|
||||
=link_to profile_path(profile) do
|
||||
.px-4.py-4.text-center.bg-gray-200
|
||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
Member Profile
|
||||
.flex.mt-6.py-4.flex-col.max-w-screen-lg.overflow-hidden.bg-white.border.rounded.shadow-sm
|
||||
.relative
|
||||
-if profile.picture_url
|
||||
= image_tag profile.picture_url, class: "object-cover w-full h-60"
|
||||
-else
|
||||
No picture
|
||||
%h5.m-4.text-3xl.font-bold.text-center
|
||||
= profile.name
|
||||
.mb-8.text-gray-800.text-center
|
||||
.prose= markdown(profile.bio)
|
||||
= render "profile_card" , profile: profile
|
||||
|
||||
|
||||
.flex.justify-between
|
||||
.flex.justify-between.mt-4
|
||||
= 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
|
||||
|
15
app/views/members/_profile_card.haml
Normal file
15
app/views/members/_profile_card.haml
Normal file
@ -0,0 +1,15 @@
|
||||
.flex.flex-col.justify-center
|
||||
=link_to profile_path(profile) do
|
||||
.px-4.py-4.text-center.bg-gray-200
|
||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
#{profile.Kind} Profile
|
||||
.flex.mt-6.py-4.flex-col.max-w-screen-lg.overflow-hidden.bg-white.border.rounded.shadow-sm
|
||||
.relative
|
||||
-if profile.picture_url
|
||||
= image_tag profile.picture_url, class: "object-cover w-full h-60"
|
||||
-else
|
||||
No picture
|
||||
%h5.m-4.text-3xl.font-bold.text-center
|
||||
= profile.name
|
||||
.mb-8.text-gray-800.text-center
|
||||
.prose= markdown(profile.bio)
|
@ -1,10 +1,20 @@
|
||||
-if event = profile.events.length >0
|
||||
%div
|
||||
=link_to profile.events.first.name , event_path(profile.events.first) , class: "underline"
|
||||
= link_to edit_event_path(profile.events.first) do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||
Edit
|
||||
-else
|
||||
= link_to new_event_path(profile: profile.kind) do
|
||||
= render "profile_card" , profile: profile
|
||||
|
||||
.flex.justify-between.mt-4
|
||||
= 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
|
||||
= form_tag( profile_path(profile.id) , {method: :delete } ) do
|
||||
%button.bg-red-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
||||
Delete Profile
|
||||
|
||||
-if event = profile.events.length >0
|
||||
%div
|
||||
=link_to profile.events.first.name , event_path(profile.events.first) , class: "underline"
|
||||
= link_to edit_event_path(profile.events.first) do
|
||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||
New #{profile.Kind} Event
|
||||
Edit
|
||||
-else
|
||||
= link_to new_event_path(profile: profile.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 #{profile.Kind} Event
|
||||
|
@ -24,11 +24,12 @@
|
||||
%div= entity.name
|
||||
%div= entity.value
|
||||
%div
|
||||
If you are an artist click
|
||||
=link_to "here" , new_profile_path(kind: :artist) , class: "underline"
|
||||
%br
|
||||
Or a teacher, click
|
||||
=link_to "here" , new_profile_path(kind: :teacher) , class: "underline"
|
||||
- unless @member.artist_profile
|
||||
If you are an artist at Hub Feenix, click
|
||||
=link_to "here" , new_profile_path(kind: :artist) , class: "underline"
|
||||
- unless @member.teacher_profile
|
||||
If you teach at Hub Feenix, click
|
||||
=link_to "here" , new_profile_path(kind: :teacher) , class: "underline"
|
||||
|
||||
- unless @member.member_profile
|
||||
%div
|
||||
|
@ -1,5 +1,5 @@
|
||||
.flex.justify-center
|
||||
.column.max-w-lg
|
||||
.column{class: "w-10/12 md:w-8/12 lg:w-5/12 xl:w-4/12"}
|
||||
.text-xl.m-4
|
||||
Edit your
|
||||
=@profile.Kind
|
||||
|
Loading…
Reference in New Issue
Block a user