header.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. ini_set('display_errors', 1);
  3. error_reporting(E_ALL);
  4. include("language.php");
  5. ?>
  6. <!DOCTYPE HTML>
  7. <html lang="en">
  8. <head>
  9. <meta charset="utf-8">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  12. <title>Halcyon</title>
  13. <link rel="shortcut icon" href="/assets/images/favicon.ico">
  14. <link rel="gettext" type="text/x-gettext-translation" href="/locale/<?=$locale?>/LC_MESSAGES/messages.po">
  15. <link rel="stylesheet" href="/assets/css/style.css" media="all">
  16. <?php if(array_key_exists('darktheme', $_COOKIE) && $_COOKIE['darktheme'] == "true")
  17. echo '<link rel="stylesheet" href="/assets/css/dark.css" media="all">';
  18. ?>
  19. <link rel="stylesheet" href="/assets/css/fontawesome.min.css" media="all">
  20. <link rel="stylesheet" href="/assets/css/emojipicker.css" media="all">
  21. <script src="/assets/js/jquery/jquery.min.js"></script>
  22. <script src="/assets/js/halcyon/halcyonFunctions.js"></script>
  23. <script src="/assets/js/mastodon.js/mastodon.js"></script><!-- thx @kirschn -->
  24. <script src="/assets/js/jquery-cookie/src/jquery.cookie.js"></script>
  25. <script src="/assets/js/autosize/autosize.js"></script>
  26. <script src="/assets/js/autocomplete/textarea.js"></script>
  27. <script src="/assets/js/shortcut.js"></script>
  28. <script src="/assets/js/replace_emoji.js"></script>
  29. <script src="/assets/js/emojipicker/emojidata.js"></script>
  30. <script src="/assets/js/emojipicker/emojipicker.js"></script>
  31. <script src="/assets/js/halcyon/halcyonTemplates.js"></script>
  32. <script src="/assets/js/halcyon/halcyonUI.js"></script>
  33. <script src="/assets/js/pomo/pomo.js"></script>
  34. <script src="/assets/js/twemoji/twemoji.min.js"></script>
  35. <script src="/assets/js/clipboard.js/clipboard.min.js"></script>
  36. <script>
  37. if(!localStorage.getItem("current_id") | !localStorage.getItem("current_instance") | !localStorage.getItem("current_authtoken")) {
  38. location.href = "/login";
  39. }
  40. else {
  41. Pomo.domain = 'messages';
  42. Pomo.returnStrings = true;
  43. Pomo.unescapeStrings = true;
  44. var pomo_def = Pomo.load(null,{
  45. format:'po',
  46. mode:'link',
  47. translation_domain:'messages'
  48. });
  49. var __ = (function(){
  50. var _ = !!window.Pomo? window.Pomo : (!!window.__Pomo? window.__Pomo: false);
  51. var gettext_wrap = function(word, options){return _.getText(word, options)};
  52. gettext_wrap = !!_? gettext_wrap: false;
  53. if(!gettext_wrap){
  54. throw new "Pomo can't be found";
  55. }
  56. return gettext_wrap;
  57. })();
  58. if($.cookie("session") === "true") {
  59. refreshApp();
  60. }
  61. else if($.cookie("session") === undefined) {
  62. resetApp();
  63. }
  64. }
  65. </script>
  66. </head>
  67. <body>
  68. <header id="header">
  69. <div class="header_nav_wrap">
  70. <nav class="header_left_box">
  71. <ul class="header_nav_list">
  72. <li id="header_nav_item_home" class="header_nav_item">
  73. <a href="/" id="home_nav">
  74. <i class="fa fa-fw fa-home"></i>
  75. <span><?=_('Home')?></span>
  76. </a>
  77. <div class="home_badge nav_badge invisible"></div>
  78. </li>
  79. <li id="header_nav_item_local" class="header_nav_item local_nav">
  80. <a href="/local" id="local_nav">
  81. <i class="fa fa-fw fa-users"></i>
  82. <span><?=_('Local')?></span>
  83. </a>
  84. <div class="local_badge nav_badge invisible"></div>
  85. </li>
  86. <li id="header_nav_item_federated" class="header_nav_item federated_nav">
  87. <a href="/federated" id="federated_nav">
  88. <i class="fa fa-fw fa-globe"></i>
  89. <span><?=_('Federated')?></span>
  90. </a>
  91. <div class="federated_badge nav_badge invisible"></div>
  92. </li>
  93. <li id="header_nav_item_notifications" class="header_nav_item notifications_nav">
  94. <a href="/notifications" id="notifications_nav">
  95. <i class="fa fa-fw fa-bell"></i>
  96. <span><?=_('Notifications')?></span>
  97. </a>
  98. <div class="notification_badge nav_badge invisible"></div>
  99. </li>
  100. <li id="header_nav_item_lists" class="header_nav_item lists_nav">
  101. <a href="/lists" id="lists_nav">
  102. <i class="fa fa-fw fa-list"></i>
  103. <span><?=_('Lists')?></span>
  104. </a>
  105. <div class="lists_badge nav_badge invisible"></div>
  106. </li>
  107. </ul>
  108. </nav>
  109. <nav class="header_right_box">
  110. <ul class="header_nav_list">
  111. <li class="header_nav_item serch_form_wrap">
  112. <form class="search_form" action="/search" method="GET">
  113. <input id="search_form" class="search_form_input" placeholder="<?=_('Search Mastodon')?>" type="text" name="q" accesskey="/">
  114. <span class="search_form_submit">
  115. <button type="submit">
  116. <i class="fa fa-fw fa-search"></i>
  117. </button>
  118. </span>
  119. </form>
  120. </li>
  121. <li class="header_nav_item my_account_wrap">
  122. <button class="header_account_avatar">
  123. <div class="my_account">
  124. <img class="js_current_profile_image">
  125. </div>
  126. </button>
  127. <nav class="header_my_account_nav invisible">
  128. <ul>
  129. <li>
  130. <a class="js_current_profile_link emoji_poss">
  131. <span class="js_current_profile_displayname display_name"></span>
  132. <span><?=_('View profile')?></span>
  133. </a>
  134. </li>
  135. </ul>
  136. <ul>
  137. <li>
  138. <a href="/direct"><?=_('Direct')?></a>
  139. </li>
  140. <li>
  141. <a href="/settings"><?=_('Settings')?></a>
  142. </li>
  143. <li>
  144. <a href="/logout"><?=_('Log out')?></a>
  145. </li>
  146. </ul>
  147. </nav>
  148. </li>
  149. <li class="header_nav_item toot_button_wrap">
  150. <button id="creat_status" class="toot_button" accesskey="n">
  151. <div class="toot_button_label">
  152. <i class="fa fa-fw fa-pencil-square-o"></i>
  153. <span><?=_('Toot')?></span>
  154. </div>
  155. </button>
  156. </li>
  157. </ul>
  158. </nav>
  159. </div>
  160. </header>