Truncation long text on profile screen (#18038)
* Allow truncation * Allow truncation * Allow truncation
This commit is contained in:
parent
d673c20b0d
commit
4489b9a23f
3 changed files with 26 additions and 6 deletions
|
|
@ -73,6 +73,14 @@
|
|||
flex-wrap: nowrap;
|
||||
white-space: nowrap;
|
||||
padding: var(--su-2) var(--su-2);
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
& > span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (min-width: $breakpoint-m) {
|
||||
padding: var(--su-1) var(--su-3);
|
||||
|
|
|
|||
|
|
@ -37,13 +37,17 @@
|
|||
<% if @organization.location.present? %>
|
||||
<span class="profile-header__meta__item">
|
||||
<%= crayons_icon_tag(:location, class: "mr-2 shrink-0", title: t("views.organizations.location.icon")) %>
|
||||
<%= sanitize @organization.location %>
|
||||
<span>
|
||||
<%= sanitize @organization.location %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<span class="profile-header__meta__item">
|
||||
<%= crayons_icon_tag(:cake, class: "mr-2 shrink-0", title: t("views.organizations.joined.icon")) %>
|
||||
<%= t("views.organizations.joined.text_html", date: local_date(@user.created_at)) %>
|
||||
<span>
|
||||
<%= t("views.organizations.joined.text_html", date: local_date(@user.created_at)) %>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span class="profile-header__meta__item -ml-1">
|
||||
|
|
|
|||
|
|
@ -65,26 +65,34 @@
|
|||
<% if @user.profile.location.present? %>
|
||||
<span class="profile-header__meta__item">
|
||||
<%= crayons_icon_tag(:location, class: "mr-2 shrink-0", title: t("views.users.location_icon")) %>
|
||||
<%= @user.profile.location %>
|
||||
<span>
|
||||
<%= @user.profile.location %>
|
||||
<span>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<span class="profile-header__meta__item">
|
||||
<%= crayons_icon_tag(:cake, class: "mr-2 shrink-0", title: t("views.users.joined.icon")) %>
|
||||
<%= t("views.users.joined.text_html", date: local_date(@user.created_at)) %>
|
||||
<span>
|
||||
<%= t("views.users.joined.text_html", date: local_date(@user.created_at)) %>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<% if @user.setting.display_email_on_profile %>
|
||||
<a href="mailto:<%= @user.email %>" class="profile-header__meta__item">
|
||||
<%= crayons_icon_tag(:email, class: "mr-2 shrink-0", title: t("views.users.email_icon")) %>
|
||||
<%= @user.email %>
|
||||
<span>
|
||||
<%= @user.email %>
|
||||
</span>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
<% if @user.profile.website_url.present? %>
|
||||
<a href="<%= @user.profile.website_url %>" target="_blank" rel="noopener me <%= "ugc" unless @user.trusted? %>" class="profile-header__meta__item">
|
||||
<%= crayons_icon_tag("external-link", class: "mr-2 shrink-0", title: t("views.users.website")) %>
|
||||
<%= @user.profile.website_url %>
|
||||
<span>
|
||||
<%= @user.profile.website_url %>
|
||||
</span>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue