mobilemenu.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <div class='mobilemenu mobile'>
  2. <ul>
  3. <li class='mobile' style='height:45px !important;'>
  4. <span style='line-height:45px; class='appname'>
  5. <a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>" style="font-family: 'patua', serif; font-weight:bold; font-size:20px; text-decoration:none" ><?php echo $setting['appname']; ?></a>
  6. </span>
  7. </li>
  8. <?php if ($logedin): ?>
  9. <li style='height:40px !important; padding-bottom:10px;' class='account'>
  10. <div style='z-index:100; width:100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: normal; align-items: normal; align-content: '>
  11. <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(<?php echo $info['avatar']?>); background-size:cover;'></div>
  12. <div style='height:30px; width:100%; display: block; position:relative; flex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; line-height:1em; border:0px !important;'>
  13. <div class='fontello' style='position:absolute; right:10px; display:block;'>&#xe830;</div>
  14. <span style='display:block; font-weight:bold;'><?php echo $info['acct']?></span>
  15. <span style='display:block; font-size:12px'><?php echo $user_settings['instance']?></span>
  16. </div>
  17. </div>
  18. </li>
  19. <?php
  20. $c = 0;
  21. foreach ($cookie as $elem){
  22. if(!isset($elem['acct'])){
  23. continue;
  24. }
  25. echo "<a href='?switchaccount=$c'><li style='text-align:left !important; height:40px !important' class='switcher mobile'>
  26. <div style='width:100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: normal; align-items: normal; align-content: normal; '>
  27. <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>
  28. <div style='height:30px; display: block; lex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; line-height:1em; border:0px !important;'>
  29. <span style='display:block;'>".$elem['acct']."</span>
  30. <span style='display:block; font-size:12px'>".$elem['instance']."</span>
  31. </div>
  32. </div>
  33. </li></a>";
  34. $c++;
  35. }
  36. ?>
  37. <li class='switcher'></li>
  38. <li><a class='fontello link switcher mobile' href='./login'>&#xe832; Add account</a></li>
  39. <li class='switcher'></li>
  40. <li class='mobile' style=''><a class='fontello ldr link' href='?mode=federated' onClick='return false'>&#xe83c; Federated</a></li>
  41. <li class='mobile' style=''><a class='fontello ldr link' href='?mode=home' onClick='return false'>&#xe816; Home</a></li>
  42. <li class='mobile' style=''><a class='fontello ldr link' href='?mode=local' onClick='return false'>&#xf1e0; Local</a></li>
  43. <li class='mobile' style=''><a class='fontello ldr link' href='?mode=favourites' onClick='return false'>&#xe804; Favourited</a></li>
  44. <li class='mobile' style=''><a class='fontello ldr link' href='?mode=direct' onClick='return false'>&#xf0e0; Direct</a></li>
  45. <li class='mobile' style=''><a class='fontello ldr link' href='?mode=bookmarks' onClick='return false'>&#xe81e; Bookmarks</a></li>
  46. <li class='mobile' style=''><a class='fontello searchmobiletoggle link' href='?page=search' onClick='return false;'>&#xe800; Search</a></li>
  47. <li class='mobile' style=''></li>
  48. <?php endif; ?>
  49. <li><a class='fontello ldr link mobile' href='?page=settings' onClick='return false'>&#xe82d; Settings</a></li>
  50. <li><a class='fontello link mobile' href='./logout'>&#xe832; Log Out</a></li>
  51. </ul>
  52. </div>