Skip to content

Commit a1796d9

Browse files
Merge pull request #79 from MetaFilter/69-fix-comment-permalink
Fix permalinks to comments
2 parents 95c1fca + 6c1db3b commit a1796d9

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

resources/views/comments/partials/comment-timestamp.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<time datetime="{{ $comment->created_at->format('Y-m-d H:i:d') }}">
2-
<a href="#{{ $comment->id }}" class="footer-info" title="{{ trans('Permanent link to this comment') }}">
2+
<a href="#comment-{{ $comment->id }}" class="footer-info" title="{{ trans('Permanent link to this comment') }}">
33
<x-icons.icon-component filename="clock" class="icon-small" />
44
{{ $comment->created_at->format('g:i a') }}
55
</a>

resources/views/livewire/comments/comment-component.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@endphp
44

55
<article class="comment @if ($isRemoved) moderator-removed @endif"
6+
id="comment-{{ $commentId }}"
67
data-comment-id="{{ $commentId }}"
78
@if (!$isRemoved)
89
data-member-id="{{ $comment->user->id }}"

resources/views/livewire/comments/moderator-comment.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="moderator-message moderation-action {{ $moderationClass }}">
1+
<div class="moderator-message moderation-action {{ $moderationClass }}" id="comment-{{ $comment->id }}">
22
<aside class="moderation-action">
33
{{ trans($moderationAction) }}
44
</aside>

0 commit comments

Comments
 (0)