You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB

  1. <?php $this->layout('layout', ['title' => $title]); ?>
  2. <div class="ui fixed inverted menu">
  3. <div class="ui container">
  4. <a href="/" class="header item">
  5. <img class="logo" src="/assets/telegraph-icon-white.png">
  6. Telegraph
  7. </a>
  8. <? if($user): ?>
  9. <a href="/dashboard" class="item">Dashboard</a>
  10. <? endif; ?>
  11. <a href="/api" class="item">API</a>
  12. <div class="ui right simple dropdown item">
  13. <? if($user): ?>
  14. <img class="ui mini circular image" src="<?= $user->photo ?: '/assets/default-user.jpg' ?>"> <i class="dropdown icon"></i>
  15. <div class="menu">
  16. <div class="header">Websites</div>
  17. <? foreach($accounts as $account): ?>
  18. <a class="item" href="/dashboard?account=<?= $account->id ?>"><?= $this->e($account->name) ?></a>
  19. <? endforeach; ?>
  20. <a class="item" href="/site/new"><i class="plus icon"></i> New Site</a>
  21. <!--
  22. <div class="divider"></div>
  23. <a class="item" href="/profile"><i class="user icon"></i> Profile</a>
  24. -->
  25. <div class="divider"></div>
  26. <a class="item" href="/logout"><i class="sign out icon"></i> Log Out</a>
  27. </div>
  28. <? else: ?>
  29. <a href="/login<?= isset($return_to) ? '?return_to='.urlencode($return_to) : '' ?>"><i class="sign in icon"></i> Log In</a>
  30. <? endif; ?>
  31. </div>
  32. </div>
  33. </div>
  34. <?= $this->section('content') ?>
  35. <? $this->insert('footer-block') ?>