File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -335,4 +335,12 @@ sub is_following_blog {
335335 return $count >= 1 ? 1 : 0;
336336}
337337
338+ sub get_followed_blogs {
339+ my ( $self ) = @_ ;
340+
341+ return [ map {
342+ $_ -> blog
343+ } $self -> search_related(' person_follow_blog_maps' )-> all ];
344+ }
345+
3383461;
Original file line number Diff line number Diff line change 1616 </form>
1717 </div>
1818
19+ <h2>Followed Blogs</h2>
20+ <div class="row row-cols-3 row-cols-md-3 g-4">
21+ %% for $person.get_followed_blogs -> $blog {
22+ <div class="col">
23+ <div class="card" style="width: 24rem;">
24+ <img src="[% $blog.img_url %]" class="card-img-top" alt="Screenshot">
25+ <div class="card-body">
26+ <h5 class="card-title">[% $blog.title %]</h5>
27+ <p class="card-text">
28+ [% $blog.tagline %] <br />
29+ About: [% $blog.about %]<br/>
30+ </p>
31+ </div>
32+ <div class="card-footer">
33+ <a href="[% $c.url_for( 'view_blog', slug => $blog.slug ) %]" class="btn btn-primary">View Blog</a>
34+ </div>
35+ </div>
36+ </div>
37+ %% }
38+ </div>
39+
40+ <h2>All Blogs</h2>
1941 <div class="row row-cols-3 row-cols-md-3 g-4">
2042%% for $blogs -> $blog {
2143 <div class="col">
You can’t perform that action at this time.
0 commit comments