search_hash_tag.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php include ('header.php'); ?>
  2. <main id="main">
  3. <?php include dirname(__FILE__).('/widgets/search_header.php'); ?>
  4. <div class="article_wrap">
  5. <aside class="left_column">
  6. <?php include dirname(__FILE__).('/widgets/side_load_options.php'); ?>
  7. <?php include dirname(__FILE__).('/widgets/side_who_to_follow.php'); ?>
  8. <?php include dirname(__FILE__).('/widgets/side_footer.php'); ?>
  9. </aside>
  10. <article class="center_column">
  11. <header class="timeline_header">
  12. <ul class="header_items">
  13. <li class="item toots view">
  14. </li>
  15. </ul>
  16. </header>
  17. <div id="js-stream_update">
  18. <button>
  19. View <span></span> new Toots
  20. </button>
  21. </div>
  22. <ul id="js-timeline" class="timeline">
  23. </ul>
  24. <footer id="js-timeline_footer" class="timeline_footer">
  25. <i class="fa fa-spin fa-circle-o-notch" aria-hidden="true"></i>
  26. </footer>
  27. </article>
  28. <aside class="right_column"></aside>
  29. </div>
  30. </main>
  31. <script>
  32. current_file = location.pathname+location.search;
  33. <?php if(isset($_GET['q'])) { ?>
  34. $(function() {
  35. const query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
  36. $('#main > .article_wrap > .center_column > .timeline_header > .header_items > .item').text("#"+query);
  37. $('#js-search_title_box > h1').text(query);
  38. $('title').text('#'+query+' - Halcyon Search');
  39. $('#js-search_nav_toots').toggleClass('view');
  40. $('#js-search_nav_toots a ').attr('href','/search'+location.search);
  41. $('#js-search_nav_peoples a ').attr('href','/search/users'+location.search)
  42. if ( localStorage.getItem("setting_search_filter") === "all" ) {
  43. setTimeline("timelines/tag/"+query);
  44. } else if ( localStorage.getItem("setting_search_filter") === "local" ) {
  45. setTimeline("timelines/tag/"+query, [{name:"local",data:"ture"}]);
  46. }
  47. replace_emoji();
  48. });
  49. <?php } else { ?>
  50. window.location.href = "/";
  51. <?php } ?>
  52. </script>
  53. <?php include ('footer.php'); ?>