forked from laysense/laysite
Edit shared headers and footers as page types
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
use App\Content\View;
|
||||
|
||||
$e = View::escape(...);
|
||||
?>
|
||||
<?php if ($visitor): ?>
|
||||
<a class="site-account" href="/account" aria-label="打开用户中心">
|
||||
<?php if ($visitor['avatar'] !== ''): ?>
|
||||
<img class="account-avatar" src="<?= $e($visitor['avatar']) ?>" alt="" width="36" height="36">
|
||||
<?php else: ?>
|
||||
<span class="account-avatar account-initial" aria-hidden="true"><?= $e(mb_substr($visitor['name'], 0, 1)) ?></span>
|
||||
<?php endif ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a class="button button-outline site-account" href="/account/login/<?= $e($layoutId) ?>">登录</a>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user