sidebar.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <aside>
  2. <?php
  3. if ($logedin || $tl['mode'] == 'user') {
  4. echo "
  5. <div class='side_element' style='margin:0px; width:100%;'>
  6. <div style='width:100%; height:120px; display:block; background-color:#" . averageColor($info['avatar']) . "; background-size:cover; background-image:url(" . $info['header_static'] . "); ' class='profileheader'></div>
  7. <div class='avatar_header' style='background-color:white; background-image:url(" . $info['avatar'] . "); text-align:center; float:none; display:inline-block; border:3px solid white; margin-top:-50px; border-radius:90px;'></div>
  8. <div style='clear:both; margin-top:-15px; padding-bottom:10px;'>" . ($logedin ? "<a href='?mode=account' class='ldr'>" : "") . "<span style='font-weight:bold; font-size:22px;'>
  9. " . emojify($info['display_name'], $info['emojis'], 20). "</span>" . ($logedin ? "</a>" : "") . "
  10. <br><span>(@" . $info['acct'] . ")</span>
  11. </div>
  12. </div>
  13. <div class='side_element' style='margin-top:20px; margin-left:0px; width:100%;'>
  14. <ul>
  15. <a href='?mode=federated' class='ldr'><li>&#xe83c; Federated</li></a>
  16. <a href='?mode=home' class='ldr'><li>&#xe816; Home</li></a>
  17. <a href='?mode=local' class='ldr'><li>&#xf1e0; Local</li></a>
  18. <a href='?mode=favourites' class='ldr'><li>&#xe804; Favourites</li></a>
  19. <a href='?mode=direct' class='ldr'><li>&#xf0e0; Direct Messages</li></a>
  20. <a href='?page=settings' class='ldr'><li>&#xe82d; Settings</li></a>
  21. </ul>
  22. </div>
  23. <div class='side_element' style='margin-top:20px; margin-left:0px; width:100%;'>
  24. <ul>";
  25. $lists = api_get("/lists");
  26. foreach ($lists as $list) {
  27. echo "<a href='?list=" . $list['id'] . "' class='ldr'><li>&#xe832; " . $list['title'] . "</li></a>";
  28. }
  29. echo "</ul>
  30. </div>
  31. <div class='side_element' style='margin-top:20px; margin-left:0px; width:100%;'>
  32. <ul>
  33. ";
  34. foreach($user_settings['fhtags'] as $word){
  35. if ($word != ""){
  36. echo "<a href='?tag=" . $word . "' class='ldr'><li><b>#</b> " . $word . "</li></a>";
  37. }
  38. }
  39. echo "
  40. </ul>
  41. </div>
  42. ";
  43. }
  44. if ($logedin) {
  45. echo "";
  46. }
  47. else {
  48. echo "<div class='side_element'>
  49. <div style='width:90%; margin:8px; display:inline-block; text-align:left;'>
  50. <span style='font-weight:bold; font-size:20px; clear:both;'>" . $setting['appname'] . "</span><br>
  51. <span>" . $setting['description'] . "</span>
  52. </div>
  53. </div>";
  54. }
  55. ?>
  56. </aside>