summaryrefslogtreecommitdiff
path: root/src/web/_views/_template/post.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-12-23 11:13:27 -0500
committerFreya Murphy <freya@freyacat.org>2024-12-23 11:13:27 -0500
commit5a2ba9c2e7605bb788bc406184547d22c6436867 (patch)
treecbd988d534e8a8593a31d70571222443f80da0b3 /src/web/_views/_template/post.php
parentfix about modal (diff)
downloadxssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.tar.gz
xssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.tar.bz2
xssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.zip
v2.1.0, refactor w/ crimson
Diffstat (limited to '')
-rw-r--r--src/web/_views/_template/post.php (renamed from src/web/_views/template/post.php)13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/web/_views/template/post.php b/src/web/_views/_template/post.php
index 48f8bb6..f7f5de2 100644
--- a/src/web/_views/template/post.php
+++ b/src/web/_views/_template/post.php
@@ -5,14 +5,13 @@
<?=pfp($user)?>
<div class="col ml">
<strong><?=$user['first_name'] . ' ' . $user['last_name']?></strong>
- <span class="subtext"><?=$this->main->date($post['created'])?></span>
+ <span class="subtext"><?=$this->format_date($post['created'])?></span>
</div>
</div>
<p>
<?=$post['content']?>
</p>
<?php
- $self = $this->main->user();
$liked = $post['like_id'] ? 'btn-primary' : '';
$post_attrs = array(
'postId' => $post['id']
@@ -22,7 +21,7 @@
}
?>
<span class="likes subtext"><span class="count"><?=$post['like_count']?></span><?=' ' . ucfirst(lang('likes'))?></span>
-<?php if ($self): ?>
+<?php if ($session): ?>
<hr>
<div class="row">
<?=ilang('action_like',
@@ -30,7 +29,7 @@
attrs: $post_attrs
)?>
<?=ilang('action_comment', class: 'btn grow action-comment',
- click: '$(\'#action-new-comment-' . $post['id'] . '\').focus()'
+ onclick: '$(\'#action-new-comment-' . $post['id'] . '\').focus()'
)?>
</div>
<hr>
@@ -46,7 +45,7 @@
$total = $post['comment_count'];
if ($loaded >= $page_size && $page_size < $total) {
- ilang('action_load_comments',
+ echo ilang('action_load_comments',
class: 'action-load-comments btn btn-blend mt',
attrs: array(
'postId' => $post['id'],
@@ -60,9 +59,9 @@
?>
</div>
-<?php if ($self): ?>
+<?php if ($session): ?>
<div class="row pb">
- <?=pfp($self)?>
+ <?=pfp($session)?>
<form class="ml action-new-comment-form row">
<input
type="hidden"