summaryrefslogtreecommitdiff
path: root/src/web/_views/template/pfp.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-04-02 18:13:02 -0400
committerFreya Murphy <freya@freyacat.org>2024-04-02 18:13:02 -0400
commit7e2553646c27cae8baaca1cc5c13d980661b5d90 (patch)
tree822b9a2184834fd8913d7a3d8cfe5cf0005c1728 /src/web/_views/template/pfp.php
parentstart custom banner and avatar loading (diff)
downloadxssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.tar.gz
xssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.tar.bz2
xssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.zip
finish profile directory (mostly)
Diffstat (limited to '')
-rw-r--r--src/web/_views/template/pfp.php9
1 files changed, 9 insertions, 0 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; ?>