-
Notifications
You must be signed in to change notification settings - Fork 144
/
search.ejs
36 lines (33 loc) · 1.41 KB
/
search.ejs
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
<!DOCTYPE html>
<html>
<%- include('partials/head', {title: template('search.results.title', locals.q)}) %>
<body>
<%- include('partials/header', {parentLinks: [], title: template('search.results.title', locals.q)}) %>
<%- include('partials/nav') %>
<div class="g-body">
<div class="g-main-content" id="g-search-page">
<% if (locals.results && results.length) { %>
<h3 class="search-kicker"><%- template('search.results.kicker', locals.q) %></h3>
<% results.forEach((res) => { %>
<div class="search-result">
<h3><a href="<%= res.path %>"><%= res.prettyName %></a></h3>
<p>
<% if (res.folder) { %>
<%- template('search.results.label.folder', res.folder.path, res.folder.prettyName || 'Home')%>
<% } %>
<% if (res.lastModifyingUser && res.lastModifyingUser.displayName) { %>
<%- template('search.results.label.person', res.lastModifyingUser.displayName) %>
<% } %>
<%= res.lastUpdated %>
</p>
</div>
<% }) %>
<% } else { %>
<h3 class="search-kicker"><%- template('search.results.none.kicker', locals.q) %></h3>
<p><%- template('search.results.none.suggestion') %></p>
<% } %>
</div>
<%- include('partials/footer', { pageType: 'search' }) %>
</div>
</body>
</html>