diff --git a/app/assets/stylesheets/_members.scss b/app/assets/stylesheets/_members.scss index da5f4b206..79692355e 100644 --- a/app/assets/stylesheets/_members.scss +++ b/app/assets/stylesheets/_members.scss @@ -40,9 +40,22 @@ height: 250px; width: 100%; } +.card { + .badge-location { + background-color: darken($blue, 10%); + border-radius: 5%; + color: $white; -.badge-location { - background-color: darken($blue, 10%); - border-radius: 5%; - color: $white; -} + .fa-map-marker { + padding-right: 0.5em; + } + } + + .badge { + text-overflow: ellipsis; + white-space: normal; + align-items: end; + max-height: 1rlh; + -webkit-line-clamp: 1; + } +} \ No newline at end of file diff --git a/app/views/members/_location.html.haml b/app/views/members/_location.html.haml index 7c08e6acb..452e8a26b 100644 --- a/app/views/members/_location.html.haml +++ b/app/views/members/_location.html.haml @@ -1,6 +1,6 @@ - if member.location.present? = link_to place_path(member.location) do - %span.badge.badge-location + %span.badge.badge-location{ title: member.location } = icon 'fas', 'map-marker' = truncate(member.location, length: 15, separator: ' ', omission: '... ') - else diff --git a/app/views/members/show.html.haml b/app/views/members/show.html.haml index d880f2e47..6e32d8efd 100644 --- a/app/views/members/show.html.haml +++ b/app/views/members/show.html.haml @@ -25,9 +25,9 @@ - @member.roles.each do |role| %span.badge.badge-info= role.name.titleize - if @member.location.present? - %p.badge.badge-location + %p.badge.badge-location{ title: @member.location } = icon 'fas', 'map-marker' - = truncate(@member.location, length: 25, separator: ' ', omission: '... ') + = truncate(@member.location, length: 15, separator: ' ', omission: '... ') %p %strong Member since = @member.created_at.to_fs(:date) diff --git a/app/views/seeds/_card.html.haml b/app/views/seeds/_card.html.haml index a4a457643..c644b6f40 100644 --- a/app/views/seeds/_card.html.haml +++ b/app/views/seeds/_card.html.haml @@ -10,9 +10,9 @@ = seed.owner_login_name .card-body - if seed.owner_location - %h6.small.badge.badge-pill.badge-location + %h6.small.badge.badge-pill.badge-location{ title: seed.owner_location } = icon 'fas', 'map-marker' - = truncate(seed.owner_location, length: 40, separator: ' ', omission: '... ') + = truncate(seed.owner_location, length: 15, separator: ' ', omission: '... ') %p - if seed.quantity .badge.badge-info #{seed.quantity} seeds