31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
:css
|
|
#content { padding-top: 3em; }
|
|
|
|
- if policy(@profile).edit?
|
|
.contain
|
|
= link_to 'Edit', edit_profile_path(@profile)
|
|
|
|
%h1
|
|
= @profile.name
|
|
%p
|
|
= @profile.summary
|
|
|
|
.social-links
|
|
-# = "<svg class='x-logo' viewBox='0 0 24 24' aria-hidden='true'><g><path d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'></path></g></svg>".html_safe
|
|
%p
|
|
- @profile.social_links.each do |social_link|
|
|
- case social_link.url
|
|
- when /twitter\.com/, /x\.com/
|
|
- social_icon = "<svg class='x-logo' viewBox='0 0 24 24' aria-hidden='true'><g><path d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'></path></g></svg>"
|
|
-# = link_to "#{social_icon} #{social_link.url}".html_safe, "https://#{social_link.url}"
|
|
= link_to "https://#{social_link.url}" do
|
|
#{social_icon.try("html_safe") || "🌐"}
|
|
- if policy(@profile).edit?
|
|
%br= link_to '+ Add Social Link', new_social_link_path(profile_id: @profile.id)
|
|
|
|
%h2 About #{@profile.name}
|
|
|
|
.about
|
|
%p= @profile.about
|
|
|