diff options
| author | Freya Murphy <freya@freyacat.org> | 2024-04-02 18:13:02 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2024-04-02 18:13:02 -0400 |
| commit | 7e2553646c27cae8baaca1cc5c13d980661b5d90 (patch) | |
| tree | 822b9a2184834fd8913d7a3d8cfe5cf0005c1728 /src/web/_views/template | |
| parent | start custom banner and avatar loading (diff) | |
| download | xssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.tar.gz xssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.tar.bz2 xssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.zip | |
finish profile directory (mostly)
Diffstat (limited to 'src/web/_views/template')
| -rw-r--r-- | src/web/_views/template/pfp.php | 9 | ||||
| -rw-r--r-- | src/web/_views/template/post.php | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/web/_views/template/pfp.php b/src/web/_views/template/pfp.php index 9a5a336..ebb4b5f 100644 --- a/src/web/_views/template/pfp.php +++ b/src/web/_views/template/pfp.php @@ -2,7 +2,16 @@ <?php /* vi: syntax=php */ ?> <?php $class = isset($class) ? $class : ''; + $link = isset($link) ? $link : TRUE; ?> +<?php if($link): ?> <a class="image-loading pfp <?=$class?>" href="/profile?id=<?=$user['id']?>"> +<?php else: ?> +<div class="image-loading pfp <?=$class?>"> +<?php endif; ?> <img src="/api/rpc/profile_avatar?user_id=<?=$user['id']?>"/> +<?php if ($link): ?> </a> +<?php else: ?> +</div> +<?php endif; ?> diff --git a/src/web/_views/template/post.php b/src/web/_views/template/post.php index 83a72bf..0633985 100644 --- a/src/web/_views/template/post.php +++ b/src/web/_views/template/post.php @@ -61,7 +61,7 @@ </div> <?php if ($self): ?> <div class="row pb"> - <?php $this->view('template/pfp', array('user' => $user))?> + <?php $this->view('template/pfp', array('user' => $self))?> <form class="ml action-new-comment-form row"> <input type="hidden" |