topbar.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <div class="topbar" style='text-align:center; background-color:none;'>
  2. <div class="topbar" style='height:45px; z-index:99;'>
  3. <span style='float:left; line-height:45px;padding-left:10px;' class='appname desktop'>
  4. <a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>" style="font-family: 'patua', serif; font-weight:bold; color:white; font-size:20px; text-decoration:none" ><?php echo $setting['appname']; ?></a>
  5. </span>
  6. <?php if ($logedin): ?>
  7. <span class='mid' style='margin:0 auto; height:100%;'>
  8. <span class="topbutton" style='position:relative;'>
  9. <a href='?mode=federated' title='Federated' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "federated" ? "tiselected" : "");?>'>&#xe83c;</a>
  10. </span>
  11. <span class="topbutton" style='position:relative;'>
  12. <a href='?mode=home' title='Home' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "home" ? "tiselected" : "");?>'>&#xe816;</a>
  13. </span>
  14. <span class="topbutton" style='position:relative;'>
  15. <a href='?mode=local' title='Local' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "local" ? "tiselected" : "");?>'>&#xf1e0;</a>
  16. </span>
  17. <span class="topbutton" style='position:relative;'>
  18. <a href='?mode=favourites' title='Favorited' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "favourites" ? "tiselected" : "");?>'>&#xe804;</a>
  19. </span>
  20. <span class="topbutton" style='position:relative;'>
  21. <a href='?mode=direct' title='Direct Messages' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "direct" ? "tiselected" : "");?>'>&#xf0e0;</a>
  22. </span>
  23. <span class="topbutton" style='position:relative;'>
  24. <a href='?mode=bookmarks' title='Bookmarks' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "bookmarks" ? "tiselected" : "");?>'>&#xe81e;</a>
  25. </span>
  26. </span>
  27. <?php endif; ?>
  28. <span class="fw" style='margin-right:20px; height:100%;'>
  29. <?php if ($logedin): ?>
  30. <span class="topbutton mobile" style='position:relative;'>
  31. <a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>"' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xe816;</a>
  32. </span>
  33. <span class="topbutton desktop" style='position:relative;'>
  34. <div style='position:absolute; left:-200px; display:none; height: 50%; background-color:white; border-radius:10px; padding: 2px; margin-top: 8px;' class="search"><form method='get' style="margin-top:-11px;"><input type='text' name='search' style='margin-left:3px; width:150px' placeholder='Type your search here'><input type='submit' value='&#xe800;' class='fontello'></form></div>
  35. <a href='?page=search' title='Search Form' class='searchform fontello topicon' onClick='return false'>&#xe800;</a>
  36. </span>
  37. <span class="topbutton mobile compose" style='position:relative;'>
  38. <a href='' onClick='return false;' class='fontello topicon' style='text-decoration:none; display:inline; font-size:20px;'>&#xe824;</a>
  39. </span>
  40. <span class="topbutton ntbutton">
  41. <a href='?page=notifications' title='Notifications' onClick='return false;' class='badge fontello topicon' style='text-decoration:none; display:inline; font-size:20px;'>&#xf0f3; <span class='alert' style=''></span> </a>
  42. <div id='notifications'><div class='container'><?php echo $notif ?></div><span class='nloadmore'>Load More</span></div>
  43. </span>
  44. <span class="topbutton desktop" id="accountmenu">
  45. <div class='topicon' style='margin-top: 5px; display:inline !important;'><div style='margin-top: 0px; margin-left: 10px; border-radius:15px; display:block; width:30px; height: 30px; background-size:cover; background-image:url("<?php echo $info['avatar']; ?>");'></div></div>
  46. <div class='menu' style="width:180px;">
  47. <ul>
  48. <?php
  49. $c = 0;
  50. foreach ($cookie as $elem){
  51. if(!isset($elem['acct'])){
  52. continue;
  53. }
  54. echo "<a href='?switchaccount=$c'><li style='text-align:left !important;'>
  55. <div style='width:100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: normal; align-items: normal; align-content: normal; padding:5px;'>
  56. <div style='width:30px; height:30px; display: block; flex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; border-radius:15px; background-image:url(".$elem['avatar']."); background-size:cover;'></div>
  57. <div style='padding-left:5px; height:30px; display: block; flex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; line-height:1em; border:0px !important;'>
  58. <span style='display:block;'>".$elem['acct']."</span>
  59. <span style='display:block; font-size:12px'>".$elem['instance']."</span>
  60. </div>
  61. </div>
  62. </li></a>";
  63. $c++;
  64. }
  65. ?>
  66. <li><a class='fontello link' href='./login'>&#xe832; Add account</a></li>
  67. <li><a class='fontello ldr link' href='?page=settings' onClick='return false'>&#xe82d; Settings</a></li>
  68. <li></li>
  69. <li><a class='fontello link' href='./logout'>&#xe832; Log Out</a></li>
  70. </ul>
  71. </div>
  72. </span>
  73. <span class="topbutton mobile" id="usermenu">
  74. <span class='fontello topicon' style='display:inline; font-size:20px;'>&#xe80b;</span>
  75. </span>
  76. <?php else: ?>
  77. <span class="topbutton" style='position:relative;'>
  78. <a href='?page=about' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xe814; </a>
  79. </span>
  80. <span class="topbutton desktop" style='position:relative;'>
  81. <a href='?page=fediverse' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xf1e0; </a>
  82. </span>
  83. <span class="topbutton desktop" style='position:relative;'>
  84. <a href='?page=privacy' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xe819; </a>
  85. </span>
  86. <span class="topbutton" style='position:relative;'>
  87. <a href='?page=settings' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xe82d; </a>
  88. </span>
  89. <span class="topbutton" style='position:relative; width:auto; margin-left:10px;'>
  90. <a href='./login' style='display:inline:block; padding:3px; border: 1px solid white; font-weight:bold; border-radius:3px; color:white; text-decoration:none; display:inline; font-size:20px;'><span class='fontello' >&#xe832;</span> Login </a>
  91. </span>
  92. <?php
  93. endif; ?>
  94. <!--
  95. <a href='?page=notifications' onClick='return false;'><span class="badge disabled">&#128276;</span></a>
  96. <a href="./logout" style='color:lightgray; font-weight:bold; font-size:18px;'>Logout</a>
  97. -->
  98. </span>
  99. </div>
  100. </div>