diff options
author | Freya Murphy <freya@freyacat.org> | 2024-12-23 11:13:27 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-12-23 11:13:27 -0500 |
commit | 5a2ba9c2e7605bb788bc406184547d22c6436867 (patch) | |
tree | cbd988d534e8a8593a31d70571222443f80da0b3 /src/web/_views/template/post.php | |
parent | fix about modal (diff) | |
download | xssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.tar.gz xssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.tar.bz2 xssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.zip |
v2.1.0, refactor w/ crimson
Diffstat (limited to 'src/web/_views/template/post.php')
-rw-r--r-- | src/web/_views/template/post.php | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/web/_views/template/post.php b/src/web/_views/template/post.php deleted file mode 100644 index 48f8bb6..0000000 --- a/src/web/_views/template/post.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php /* Copyright (c) 2024 Freya Murphy */ ?> -<?php /* vi: syntax=php */ ?> -<div class="post card"> - <div class="row"> - <?=pfp($user)?> - <div class="col ml"> - <strong><?=$user['first_name'] . ' ' . $user['last_name']?></strong> - <span class="subtext"><?=$this->main->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'] - ); - if ($post['like_id'] !== NULL) { - $post_attrs['likeId'] = $post['like_id']; - } -?> - <span class="likes subtext"><span class="count"><?=$post['like_count']?></span><?=' ' . ucfirst(lang('likes'))?></span> -<?php if ($self): ?> - <hr> - <div class="row"> - <?=ilang('action_like', - class: 'btn grow action-like ' . $liked, - attrs: $post_attrs - )?> - <?=ilang('action_comment', class: 'btn grow action-comment', - click: '$(\'#action-new-comment-' . $post['id'] . '\').focus()' - )?> - </div> - <hr> -<?php endif; ?> - <div class="col comments pb"> - <?php - $_GET = array('id' => $post['id']); - $cdata = $this->comments(); - - $loaded = $cdata['loaded']; - $max = $cdata['max']; - $page_size = $cdata['page_size']; - $total = $post['comment_count']; - - if ($loaded >= $page_size && $page_size < $total) { - ilang('action_load_comments', - class: 'action-load-comments btn btn-blend mt', - attrs: array( - 'postId' => $post['id'], - 'loaded' => $loaded, - 'pageSize' => $page_size, - 'commentCount' => $total, - 'commentMax' => $max, - ) - ); - } - - ?> - </div> -<?php if ($self): ?> - <div class="row pb"> - <?=pfp($self)?> - <form class="ml action-new-comment-form row"> - <input - type="hidden" - name="id" - value="<?=$post['id']?>" - > - <input - id="action-new-comment-<?=$post['id']?>" - class="action-new-comment btn grow btn-alt" - postId="<?=$post['id']?>" - autocomplete="off" - type="text" - name="text" - placeholder="<?=ucfirst(lang('action_new_comment_text'))?>" - aria-label="<?=ucfirst(lang('action_new_comment_tip'))?>" - > - </form> - </div> -<?php endif; ?> -</div> - - |