feat: Add webmention counts and icons for replies, likes, and reposts.
- Add new SVG icons for the "reply", "like", and "repost" actions - Update webmention info display in note template to include counts and icons for replies, likes, and reposts - Add webmention counts to FrontPageController.php and modify queries in NotesController.php - Modify WebMentionsTableSeeder.php to change URLs, commentable ID, and add new WebMentions
This commit is contained in:
parent
5bc03f36d2
commit
92098a793e
15 changed files with 179 additions and 35 deletions
|
@ -20,9 +20,17 @@ class FrontPageController extends Controller
|
|||
*/
|
||||
public function index(): Response|View
|
||||
{
|
||||
$notes = Note::latest()->with(['media', 'client', 'place'])->get();
|
||||
$notes = Note::latest()->with(['media', 'client', 'place'])->withCount(['webmentions AS replies' => function ($query) {
|
||||
$query->where('type', 'in-reply-to');
|
||||
}])
|
||||
->withCount(['webmentions AS likes' => function ($query) {
|
||||
$query->where('type', 'like-of');
|
||||
}])
|
||||
->withCount(['webmentions AS reposts' => function ($query) {
|
||||
$query->where('type', 'repost-of');
|
||||
}])->get();
|
||||
$articles = Article::latest()->get();
|
||||
$bookmarks = Bookmark::latest()->get();
|
||||
$bookmarks = Bookmark::latest()->with('tags')->get();
|
||||
$likes = Like::latest()->get();
|
||||
|
||||
$items = collect($notes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue