1
restaurant-search/client/index.html

137 lines
6.8 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Reactive Search</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="bower_components/bootstrap-select/dist/css/bootstrap-select.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="page-header">
<h1>
Reactive Search
<img id="spinner" src="images/spinner.gif" style="float: right; display: none;" width="32" height="32">
</h1>
</div>
<div id="input">
<form class="form-horizontal">
<div class="form-group">
<label for="keywords" class="col-md-2 control-label">Keywords</label>
<div class="col-md-10">
<select id="keywords" class="form-control" multiple="multiple" data-max-options="4" data-live-search="data-live-search" name="keywords"></select>
</div>
</div>
<div class="form-group">
<label for="minScore" class="col-md-2 control-label">Minimum score</label>
<div class="col-md-10">
<input class="form-control" type="number" step="any" value="0.25" id="minScore" name="minScore">
</div>
</div>
<div class="form-group">
<label for="hintSteps" class="col-md-2 control-label">Hint steps</label>
<div class="col-md-10">
<input class="form-control" type="number" value="20" id="hintSteps" name="hintSteps">
</div>
</div>
<div class="form-group">
<label for="maxResults" class="col-md-2 control-label">Max results</label>
<div class="col-md-10">
<input class="form-control" type="number" value="100" id="maxResults" name="maxResults">
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<button class="btn btn-primary" id="search" type="button" disabled="disabled">
<span class="glyphicon glyphicon-search"></span> Search
</button>
</div>
</div>
</form>
</div>
<div class="modal fade options" tabindex="-1">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header"><big>Options</big></div>
<div class="modal-body">
<form>
<label class="checkbox-inline">
<input type="checkbox" id="useLocalScale" name="useLocalScale" checked="checked"> Use local scale
</label>
<label class="checkbox-inline">
<input type="checkbox" id="useRelativeScale" name="useRelativeScale" checked="checked"> Use relative scale
</label>
</form>
</div>
<div class="modal-footer">
<form>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</form>
</div>
</div>
</div>
</div>
<div id="output" style="display: none;">
<div class="panel panel-default">
<div class="panel-heading">
<big>Semantic tweaks to <span id="query" class="text-primary"></span></big>
<div class="btn-group pull-right">
<form>
<button class="btn btn-xs btn-success">Learn...</button>
<button class="btn btn-xs btn-default" data-toggle="modal" data-target=".options">Options...</button>
</form>
</div>
</div>
<div style="padding: 10px;" class="unselectable">
<canvas id="grapher" width="800" height="550"></canvas>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><big>Query results (<span id="count" class="text-primary"></span>)</big></div>
<div style="padding: 10px;">
<script id="template" type="text/x-handlers-template">
{{#if results}}
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
{{#each results}}
<tr>
<td>{{@index}}</td>
<td><a href="{{url}}">{{name}}</a></td>
<td>{{score}}</td>
</tr>
{{/each}}
</table>
{{/if}}
</script>
<div id="results"></div>
</div>
</div>
</div>
</div>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/handlebars/handlebars.min.js"></script>
<script src="bower_components/closurelibrary/closure/goog/base.js"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/fabric/dist/fabric.min.js"></script>
<script src="bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<script src="application.js"></script>
<script src="grapher.js"></script>
</body>
</html>