Add a search bar to simplify looking for a bridge. (#494)

* Add a search bar to simplify looking for a bridge.

* Fix phpcs line length.

* Change the phpcs config.
This commit is contained in:
Teromene 2017-03-21 20:31:10 +00:00 committed by GitHub
parent 2ac0469750
commit 1a4c3f4418
6 changed files with 78 additions and 7 deletions

View file

@ -198,10 +198,18 @@ $formats = Format::searchInformation();
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Rss-bridge" />
<title>RSS-Bridge</title>
<link href="css/style.css" rel="stylesheet">
<link href="static/style.css" rel="stylesheet">
<script src="static/search.js"></script>
<noscript>
<style>
.searchbar {
display: none;
}
</style>
</noscript>
</head>
<body>
<body onload="search()">
<?php
$status = '';
if(defined('DEBUG') && DEBUG === true){
@ -214,6 +222,13 @@ $formats = Format::searchInformation();
<h2>·Reconnecting the Web·</h2>
<p class="status">{$status}</p>
</header>
<section class="searchbar">
<h3>Search</h3>
<input type="text" name="searchfield"
id="searchfield" placeholder="Enter the bridge you want to search for"
onchange="search()" onkeyup="search()">
</section>
EOD;
$activeFoundBridgeCount = 0;
@ -231,7 +246,7 @@ EOD;
}
echo $inactiveBridges;
?>
<section>
<section class="footer">
<a href="https://github.com/RSS-Bridge/rss-bridge">RSS-Bridge alpha 0.2 ~ Public Domain</a><br />
<?= $activeFoundBridgeCount; ?>/<?= count($bridgeList) ?> active bridges. <br />
<?php