-
Notifications
You must be signed in to change notification settings - Fork 2
/
home.html
101 lines (97 loc) · 3.65 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
<title>Pancake: Search Bar</title>
<!--link rel="apple-touch-icon" href="images/icon.png?v={{v}}"/ -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<script type="text/javascript">
// Replace `no-js` class with `js` class. Useful for preventing flash
// of unscripted content accessibly.
var h = document.getElementsByTagName('html')[0];
h.className = h.className.replace('no-js', 'js');
</script>
<link rel="stylesheet" href="./css/grid.css" type="text/css" media="screen" title="no title" charset="utf-8">
<style>
body { margin: 1em; }
.username.loggedin {
background-color: #cfb;
color: #006;
font-weight: bold;
font-style: normal;
}
.username {
display: inline-block;
padding: 2px;
color: #666;
font-style: italic;
}
#errorbar {
background: #fcc;
border: 1px solid #c00;
padding: 10px;
}
</style>
</head>
<body>
<section id="errorbar" data-bind="visible: errorMessage().length, text: errorMessage" style="display:none">
<button data-bind="click: errorMessage('')">OK</button>
</section>
<section>
</header>
<section id="topbar">
<section id="suggestions" data-bind="visible: suggestions().length" style="display:none">
<p>[search bar w. suggestions (populated w. search terms)]</p>
<ul data-bind="foreach: suggestions, click: suggestionClick">
<li data-bind="attr: { 'data-itemid': $index }"><a data-bind="text: title, attr: { href: url }"></a></li>
</ul>
</section>
<div class="row">
<div class="col col-4of5">
<input type="text" placeholder="Search for..." data-bind="value: searchbox.value, event: { keyup: searchbox.onsearchkeyup, paste: searchbox.onsearchpaste, cut: searchbox.onsearchcut }"/>
<button data-bind="click: go">Go</button>
</div>
<div class="col col-1of5">
<div>
<span class="username" data-bind="text: settings.username, css: { loggedin: !!settings.session() } " value="guest"></span>
<button data-bind="click: login, text: loginLabel">Login</button>
</div>
</div>
</div>
</section>
<section id="topbar">
<p data-bind="visible: !history.recent().length" style="display:none">No recent results for <span data-bind="text:settings.username"></span></p>
<ul data-bind="foreach: history.recent, visible: history.recent().length, click: suggestionClick" style="display:none">
<li data-bind="attr: {'data-itemid': id}">
<span data-bind="text: title"></span>
</li>
</ul>
</section>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<script src="./js/vendor/requirejs.js?v={{v}}"></script>
<script src="./js/config.js"></script>
<script>
config.appName = "home";
require.config({
// configure our AMD loader
baseUrl: './js',
paths: config.paths,
packages: config.packages,
waitSeconds: 20,
urlArgs: "r={{v}}" // r is a cache-busting token
});
console.log("bootstrapping for platform: ", config.platform, config);
require({
}, ['bootstrap'], function(env){
require([config.appName + '.app']);
});
</script>
<script src="https://login.persona.org/include.orig.js" type="text/javascript"></script>
</body>
</html>