mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-10 16:25:47 +00:00

- set new colors using the css variables for theming in tailwind.config.js - replace admin and public colors with new variable enabled colors
43 lines
1.9 KiB
PHP
43 lines
1.9 KiB
PHP
<footer>
|
|
<?php if (can_user_interact()): ?>
|
|
<form action="<?= route_to('comment-attempt-like', interact_as_actor()->username, $comment->episode->slug, $comment->id) ?>" method="POST" class="flex items-center gap-x-4">
|
|
<button type="submit" name="action" class="inline-flex items-center hover:underline group" title="<?= lang(
|
|
'Comment.likes',
|
|
[
|
|
'numberOfLikes' => $comment->likes_count,
|
|
],
|
|
) ?>"><?= icon('heart', 'text-xl mr-1 opacity-40 group-hover:text-red-600 group-hover:opacity-100') . $comment->likes_count ?></button>
|
|
<Button uri="<?= route_to('episode-comment', $comment->episode->podcast->handle, $comment->episode->slug, $comment->id) ?>" size="small"><?= lang('Comment.reply') ?></Button>
|
|
</form>
|
|
<?php if ($comment->replies_count): ?>
|
|
<?= anchor(
|
|
route_to('episode-comment', $comment->episode->podcast->handle, $comment->episode->slug, $comment->id),
|
|
icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
|
|
'numberOfReplies' => $comment->replies_count,
|
|
]),
|
|
[
|
|
'class' => 'inline-flex items-center text-xs hover:underline',
|
|
]
|
|
) ?>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<button class="inline-flex items-center opacity-50 cursor-not-allowed hover:underline" title="<?= lang(
|
|
'Comment.like',
|
|
[
|
|
'numberOfLikes' => $comment->likes_count,
|
|
],
|
|
) ?>"><?= icon('heart', 'text-xl mr-1 text-skin-muted') . $comment->likes_count ?></button>
|
|
<?php if ($comment->replies_count): ?>
|
|
<?= anchor(
|
|
route_to('episode-comment', $comment->episode->podcast->handle, $comment->episode->slug, $comment->id),
|
|
icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
|
|
'numberOfReplies' => $comment->replies_count,
|
|
]),
|
|
[
|
|
'class' => 'inline-flex items-center text-xs hover:underline',
|
|
]
|
|
) ?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</footer>
|