blog-app/views/layout/sidebar.blade.php

20 lines
592 B
PHP
Raw Normal View History

2021-09-16 20:27:51 +08:00
@if(isset($_SESSION['is_auth']))
<img src="https://www.gravatar.com/avatar/{{ md5(strtolower(trim($_SESSION['email']))) }}?s=50&d=mm&r=pg" class="avatar">
<a href="/user/settings" class="user-setting" title="Settings">
<i class="fas fa-cog gear"></i>
</a>
<h4>
<a href="/user/{{ $_SESSION['username'] }}" class="user-info">
{{ $_SESSION['username'] }}
</a>
</h4>
@endif
@if(isset($tags))
<ul class="tags">
@foreach($tags as $tag)
<li><a href="/tag/{{ $tag->id }}">{{ $tag->keyword }}</a> ({{ $tag->num_of_posts }})</li>
@endforeach
</ul>
@endif