[openstreetmap/openstreetmap-website] Add recent diaries partial to profile page (PR #6010)
Emin Kocan
notifications at github.com
Thu May 15 07:34:03 UTC 2025
@kcne commented on this pull request.
> @@ -0,0 +1,27 @@
+<% if diary_entries.present? %>
+ <h5 class="mt-4 mb-3"><%= t(".recent_diaries") %></h5>
+ <div class="row row-cols-1 row-cols-md-2 g-4 mb-4">
+ <% 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">
I agree that should be link to comments section. I left it that way for now.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6010#discussion_r2090491573
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6010/review/2842587452 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250515/951307de/attachment-0001.htm>
More information about the rails-dev
mailing list