✨ (user): add a way to get the author URI
This commit is contained in:
parent
ac507092d8
commit
617bbf49f7
2 changed files with 7 additions and 3 deletions
|
@ -75,6 +75,10 @@ class User
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function authorUri() {
|
||||||
|
return DOMAIN_AUTHORS . $this->username();
|
||||||
|
}
|
||||||
|
|
||||||
public function displayNameMode()
|
public function displayNameMode()
|
||||||
{
|
{
|
||||||
return $this->getValue('displayNameMode');
|
return $this->getValue('displayNameMode');
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
<?php if (!$page->isStatic() && !$url->notFound()) : ?>
|
<?php if (!$page->isStatic() && !$url->notFound()) : ?>
|
||||||
<div class="form-text mb-2">
|
<div class="form-text mb-2">
|
||||||
<!-- Page creation time -->
|
<!-- Page creation time -->
|
||||||
<span class="pr-3"><i class="bi bi-calendar"></i><?php echo $page->date() ?></span>
|
<span class="pe-3"><i class="bi bi-calendar"></i><?php echo $page->date() ?></span>
|
||||||
|
|
||||||
<!-- Page reading time -->
|
<!-- Page reading time -->
|
||||||
<span class="pr-3"><i class="bi bi-clock"></i><?php echo $page->readingTime() . ' ' . $L->get('minutes') . ' ' . $L->g('read') ?></span>
|
<span class="pe-3"><i class="bi bi-clock"></i><?php echo $page->readingTime() . ' ' . $L->get('minutes') . ' ' . $L->g('read') ?></span>
|
||||||
|
|
||||||
<!-- Page author -->
|
<!-- Page author -->
|
||||||
<span><i class="bi bi-person"></i><?php echo $page->user('displayName') ?></span>
|
<span><a href="<?php echo $page->user('authorUri'); ?>"><i class="bi bi-person"></i><?php echo $page->user('displayName') ?></a></span>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue