Skip to content

Instantly share code, notes, and snippets.

@Florent2
Forked from angelsystem/_user.html.haml
Last active August 29, 2015 13:58
Show Gist options
  • Save Florent2/10222350 to your computer and use it in GitHub Desktop.
Save Florent2/10222350 to your computer and use it in GitHub Desktop.
- show ||= 'cards'
= div_for user, class: "user-#{show}" do
- if show == 'list'
.user-description
.user-avatar
= avatar(user, class: "user-img")
.user-info
= link_to user.name, "", class: "name"
%p.role= user.role_name
- else
- logo_url = Cloudinary::Utils.cloudinary_url(user.photo, :transformation => {:effect => "blur:1200"} )
.user-cover{style: "background-image: url(#{logo_url});"}
.user-info
= link_to short_user_path(user) do
= avatar(user, class: "user-rounded-photo")
.div
%p= user.username
%h3= user.role_name
.localization
%i.geo-icon-blue
%p.address= user.location
.social-user
- @followable = user
- if current_user == @followable
= link_to "Edit your profile", edit_user_registration_path, class: "default-button"
- else
= render 'follows/form_follow'
.clear
.clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment