[openstreetmap/openstreetmap-website] Add recent diaries partial to profile page (PR #6010)
Emin Kocan
notifications at github.com
Thu May 15 07:34:53 UTC 2025
@kcne commented on this pull request.
> + <% diary_entries.each do |entry| %>
+ <div class="col profile-diary-card">
+ <div class="card h-100">
+ <div class="card-body d-flex flex-column">
+ <p class="card-title">
+ <%= image_tag "note.svg", :class => "card-icon", :alt => "Note" %>
+ <%= link_to entry.title, diary_entry_path(@user, entry) %>
+ </p>
+ <p class="card-text flex-grow-1"><%= truncate(strip_tags(entry.body.to_html), :length => 150) %></p>
+
+ <div class="card-text d-flex justify-content-between align-items-center mt-auto">
+ <small class="text-body-secondary">
+ <%= image_tag "comment.svg", :class => "card-icon", :alt => "Comments" %> <%= entry.comments.size %> <%= "comment".pluralize(entry.comments.size) %>
+ </small>
+ <small class="text-body-secondary">
+ <%= image_tag "calendar.svg", :class => "card-icon", :alt => "Date" %> <%= l(entry.created_at.to_date, :format => :long) %>
Now using flexbox here to align vertically. Thank you.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6010#discussion_r2090492793
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6010/review/2842589475 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250515/5e7b394f/attachment.htm>
More information about the rails-dev
mailing list