diff options
Diffstat (limited to '')
-rw-r--r-- | src/web/_views/template/post.php (renamed from web/_views/template/post.php) | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/web/_views/template/post.php b/src/web/_views/template/post.php index 0541026..83a72bf 100644 --- a/web/_views/template/post.php +++ b/src/web/_views/template/post.php @@ -5,7 +5,7 @@ <?php $this->view('template/pfp', array('user' => $user))?> <div class="col ml"> <strong><?=$user['first_name'] . ' ' . $user['last_name']?></strong> - <span class="dim"><?=$post['date']?></span> + <span class="dim"><?=$post['created']?></span> </div> </div> <p> @@ -13,20 +13,28 @@ </p> <?php $self = $this->main->user(); + $liked = $post['like_id'] ? 'btn-blue' : ''; + $post_attrs = array( + 'postId' => $post['id'] + ); + if ($post['like_id'] !== NULL) { + $post_attrs['likeId'] = $post['like_id']; + } ?> <?php if ($self): ?> <hr> <div class="row"> - <?=ilang('action_like', class: 'grow btn btn-hover btn-action')?> - <?=ilang('action_comment', class: 'grow btn btn-hover btn-action action-comment', - click: '$(\'#new-comment-' . $post['id'] . '\').focus()' + <?=ilang('action_like', + class: 'btn btn-wide action-like ' . $liked, + attrs: $post_attrs + )?> + <?=ilang('action_comment', class: 'btn btn-wide action-comment', + click: '$(\'#action-new-comment-' . $post['id'] . '\').focus()' )?> </div> <hr> -<?php else: ?> - <hr> <?php endif; ?> - <div class="col comments"> + <div class="col comments pb"> <?php $_GET = array('id' => $post['id']); $cdata = $this->comments(); @@ -52,16 +60,17 @@ ?> </div> <?php if ($self): ?> - <div class="row grow mt"> + <div class="row pb"> <?php $this->view('template/pfp', array('user' => $user))?> - <form class="ml action-new-comment-form"> + <form class="ml action-new-comment-form row"> <input type="hidden" name="id" value="<?=$post['id']?>" > <input - class="action-new-comment input" + id="action-new-comment-<?=$post['id']?>" + class="action-new-comment btn btn-wide btn-alt" postId="<?=$post['id']?>" autocomplete="off" type="text" @@ -73,3 +82,5 @@ </div> <?php endif; ?> </div> + + |