2018-03-11 12:07:57 +01:00
|
|
|
<?php include ('header.php'); ?>
|
|
|
|
<main id="main">
|
|
|
|
<?php include dirname(__FILE__).('/widgets/search_header.php'); ?>
|
|
|
|
<div class="article_wrap">
|
|
|
|
<aside class="left_column">
|
|
|
|
<?php include dirname(__FILE__).('/widgets/side_who_to_follow.php'); ?>
|
|
|
|
<?php include dirname(__FILE__).('/widgets/side_footer.php'); ?>
|
|
|
|
</aside>
|
|
|
|
<article class="center_column">
|
|
|
|
<header class="timeline_header">
|
|
|
|
<ul class="header_items">
|
|
|
|
<li class="item toots view">
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</header>
|
|
|
|
<div id="js-stream_update">
|
|
|
|
<button>
|
|
|
|
View <span></span> new Toots
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<ul id="js-timeline" class="timeline">
|
|
|
|
</ul>
|
|
|
|
<footer id="js-timeline_footer" class="timeline_footer">
|
|
|
|
<i class="fa fa-spin fa-circle-o-notch" aria-hidden="true"></i>
|
|
|
|
</footer>
|
|
|
|
</article>
|
|
|
|
<aside class="right_column"></aside>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<script>
|
2018-04-21 17:15:13 +02:00
|
|
|
current_file = location.pathname+location.search;
|
|
|
|
<?php if(isset($_GET['q'])) { ?>
|
2018-03-11 12:07:57 +01:00
|
|
|
$(function() {
|
2018-06-23 16:58:06 +02:00
|
|
|
var query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
|
|
|
|
if(query[0] == "@") {
|
|
|
|
window.location.href = "/search/users/?q="+query.substr(1);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if(query[0] == "#") {
|
|
|
|
query = query.substr(1);
|
|
|
|
}
|
2018-03-11 12:07:57 +01:00
|
|
|
$('#main > .article_wrap > .center_column > .timeline_header > .header_items > .item').text("#"+query);
|
2018-06-09 17:29:25 +02:00
|
|
|
$('#js-header_title_box > h1').text(query);
|
2018-03-11 12:07:57 +01:00
|
|
|
$('title').text('#'+query+' - Halcyon Search');
|
|
|
|
$('#js-search_nav_toots').toggleClass('view');
|
|
|
|
$('#js-search_nav_toots a ').attr('href','/search'+location.search);
|
|
|
|
$('#js-search_nav_peoples a ').attr('href','/search/users'+location.search)
|
2018-06-09 17:29:25 +02:00
|
|
|
if(localStorage.getItem("setting_search_filter") === "all") {
|
2018-03-11 12:07:57 +01:00
|
|
|
setTimeline("timelines/tag/"+query);
|
2018-06-09 17:29:25 +02:00
|
|
|
}
|
|
|
|
else if(localStorage.getItem("setting_search_filter") === "local") {
|
|
|
|
setTimeline("timelines/tag/"+query,[{name:"local",data:"true"}]);
|
2018-03-11 12:07:57 +01:00
|
|
|
}
|
|
|
|
replace_emoji();
|
2018-06-23 16:58:06 +02:00
|
|
|
}
|
2018-03-11 12:07:57 +01:00
|
|
|
});
|
2018-04-21 17:15:13 +02:00
|
|
|
<?php } else { ?>
|
|
|
|
window.location.href = "/";
|
|
|
|
<?php } ?>
|
2018-03-11 12:07:57 +01:00
|
|
|
</script>
|
2018-04-21 17:15:13 +02:00
|
|
|
<?php include ('footer.php'); ?>
|