This repository has been archived by the owner on Jun 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
search.html
192 lines (166 loc) · 7.58 KB
/
search.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>🔎🚢 Stevedore: A tool for exploring document sets</title>
<script type="text/javascript">window.Stevedore = {};</script>
<!-- we don't know yet if we should use push-state routing yet. so we have to get both files. -->
<!-- one of these will probably fail out. -->
<script src="app/config.js?_cachebuster=201705041358" type="text/javascript"></script>
<script src="/app/config.js?_cachebuster=201705041358" type="text/javascript"></script>
<script type="text/javascript">
var head = document.getElementsByTagName('head')[0];
var to_load = [ "lib/js/jquery-2.1.3.min.js",
"lib/js/underscore-min.js",
"lib/js/backbone-min.js",
"lib/js/backbone.localStorage-min.js",
"lib/js/elasticsearch-js/elasticsearch.min.js",
"lib/js/elasticsearch-js/elasticsearch.jquery.min.js",
"lib/js/bootstrap.min.js",
"lib/js/humanhash.js",
"lib/js/queue.v1.min.js",
"lib/js/js-yaml.min.js",
"lib/js/moment.js",
"lib/js/pikaday.js",
"lib/js/pikaday.jquery.js",
"app/app.js?_cachebuster=201705041358",
"app/models/Search.js?_cachebuster=201705041358",
"app/collections/SavedSearchCollection.js?_cachebuster=201705041358",
"app/models/Document.js?_cachebuster=201705041358",
"app/collections/DocumentCollection.js?_cachebuster=201705041358",
"app/views/DetailView.js?_cachebuster=201705041358",
"app/models/EmailSenderAnalysis.js?_cachebuster=201705041358",
"app/views/EmailSenderAnalysisView.js?_cachebuster=201705041358",
"app/views/AllDocumentsAnalysisView.js?_cachebuster=201607271527",
"app/models/AllDocumentsAnalysis.js?_cachebuster=201607271527",
"app/views/ResultsView.js?_cachebuster=201705041358",
"app/views/ListItemView.js?_cachebuster=201705041358",
"app/views/SavedSearchesView.js?_cachebuster=201705041358",
"app/views/SavedSearchView.js?_cachebuster=201705041358",
"app/views/SearchView.js?_cachebuster=201705041358",
"app/routers/SearchApp.js?_cachebuster=201705041358"
];
// what's going on here?
// well, I'm glad you asked.
// in order to support both pushstate-based routing and ordinary HTTP based routing (for S3 hosting)
// we don't know whether to pick between absolute and dynamic paths.
// so we do it here. it works ok.
for (i = 0; i < to_load.length; i++) {
var script_loc = to_load[i];
var js = document.createElement("script");
js.type = "text/javascript";
js.src = (Stevedore.config.use_slash_based_routing ? '/search/' : '') + script_loc;
js.async = false;
if(i == to_load.length -1){
js.onload = function(){
if(Stevedore.config.use_slash_based_routing === false && (window.location.hash == "#" || window.location.hash == "")){
console.log("redirecting to index.html because hash is empty")
window.location.href = "index.html"
}
jQuery(function(){
Stevedore.router = new Stevedore.SearchApp(Stevedore.config.use_slash_based_routing ? {} : {root: Stevedore.project});
Backbone.history.start(Stevedore.config.use_slash_based_routing ? {pushState: true, root: "/search/" + Stevedore.project} : {});
if(window.location.search.indexOf("?first") > -1 || window.location.search.indexOf("&first") > -1){
$('#first-visit').show();
}
});
}
}
head.appendChild(js);
};
</script>
<script>try{Typekit.load();}catch(e){}</script>
<script type="text/javascript">
var head = document.getElementsByTagName('head')[0];
var css_to_load = [
["lib/css/bootstrap.min.css", ],
["lib/css/pikaday.css", ],
["lib/css/adcom.min.css", "screen"],
["app/css/app.css", ],
["app/css/print.css", "print"]
];
css_to_load.forEach(function(stylesheet, i){
var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";
if (stylesheet[1])
css.media = stylesheet[1];
css.href = (Stevedore.config.use_slash_based_routing ? '/search/' : '') + stylesheet[0];
head.appendChild(css);
});
</script>
</head>
<body>
<div class="navbar navbar-default navbar-nyt-default navbar-nyt-primary">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Stevedore</a>
</div>
<ul class="nav navbar-nav navbar-left">
<li class="navbar-summary"><span>A tool for exploring document sets</span></li>
</ul>
<ul class="nav navbar-nav navbar-right navbar-bits">
<!-- <li><a href="#">About</a></li>
<li><a href="#">Support</a></li>
<li><a href="#">Roadmap</a></li>
--> </ul>
</div>
</div>
<div id="everything-container" class="container">
<div class="alert alert-success"alert-dismissible role="alert" style="display: none;" id="first-visit">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
Your documents have been successfully indexed. Happy searching!</div>
<div class="page-header row">
<div class="header-title">
<h1 id="project-name"><span></span></h1>
</div>
<div class="header-timestamp"></div>
<p id="project-desc" style="clear: both;"></p>
</div>
<div id="main-container" class="row">
<div id="analysis-container">
</div>
<form id="search-container" class="form form-horizontal" action="" autocomplete="off">
<div id="saved-searches-container" style="display: none;">
<a href="#" class="show-saved-searches">Previous Searches</a>
<div id="saved-searches">
</div>
</div>
<div id="search-form-container"></div>
</form>
<div class="hit-count-container row">
<span class="hit-count"></span><br />
<span class="total-count"></span>
</div>
<div id="results" class="row">
<ol><ol/>
</div>
<div id="loading" class="row" data-loading-msg="Getting documents ..." data-loading-more-msg="Getting more documents ..."></div>
<div class="hit-count-container row">
<span class="hit-count"></span><br />
<span class="total-count"></span>
</div>
<div id="preview-pane" class="modal fade"></div>
</div> <!-- end main-container -->
</div><!-- end everything-container -->
<footer class="footer">
<div class="container tool-credit">
<p>An <a href="http://www.github.com/newsdev/stevedore">open-source project</a> by Jeremy B. Merrill, The New York Times and <em>Contributors Like You<em></p>
</div>
</footer>
<!-- templates start -->
<script type="text/template" id="detail-container-template">
<div class="modal-dialog">
<div class="modal-content" id="detail-view">
<!-- project specific detail views get rendered here. -->
</div>
</div>
</script>
<script type="text/template" id="saved-search-template">
<a href="#">{{= string_repr.replace(/\|/g, " | ") }}</a>
<!-- facets, etc. TK for saved searches. -->
</script>
</body>
</html>