author.blade.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. <div class="panel panel-default author">
  2. @inject('userPresenter', 'App\Presenters\UserPresenter')
  3. <?php
  4. $author = isset($user->id) ? $user : $userPresenter->getUserInfo();
  5. ?>
  6. <div class="panel-heading">
  7. <h3 class="panel-title">作者:&nbsp;{{ $author->name }}</h3>
  8. </div>
  9. <div class="panel-body">
  10. <div class="row text-center">
  11. <img src="{{ asset('uploads/avatar')."/".$author->user_pic }}" class="img-circle author-avatar" alt="User Image">
  12. </div>
  13. <div class="row text-center author-footer">
  14. <?php
  15. $github_url = '';
  16. $weibo_url = '';
  17. if (!isset($user->id) || $user->id == 1) { //临时
  18. $github_url = $systemPresenter->getKeyValue('github_url');
  19. $weibo_url = $systemPresenter->getKeyValue('weibo_url');
  20. }
  21. ?>
  22. @if ($github_url != "")
  23. <span class="icon-github" style="padding-left:20px;">
  24. <a href='{{ $github_url }}' target="_blank">GitHub</a>
  25. </span>
  26. @endif
  27. @if ($weibo_url != "")
  28. <span class="icon-sina-weibo" style="padding-left:20px;margin-left:10px;">
  29. <a href='{{ $weibo_url }}' target="_blank">Weibo</a>
  30. </span>
  31. @endif
  32. </div>
  33. </div>
  34. </div>