aboutsummaryrefslogtreecommitdiff
path: root/views/layout.eta
blob: 85f431c4a3febab914a3b282cdc323d5e0a5e76d (plain)
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
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><%= it.repo.owner %>/<%= it.repo.name %> - <%= it.path || '/' %></title>
  <link rel="stylesheet" href="/static/style.css">
</head>
<body>
  <div class="box">
    <div class="repo"><%= it.repo.owner %>/<%= it.repo.name %></div>
    <pre><code>git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git
git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code></pre>
    <nav>
      <a href="/<%= it.repo.owner %>/<%= it.repo.name %>">Code</a>
      <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/issues">Issues</a>
      <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/pulls">Pull requests</a>
      <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases">Releases</a>
      <% if (it.branch) { %>
        <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/commits/<%= it.branch %><%= it.path && it.path !== '/' ? '/' + it.path : '' %>">Commits</a>
      <% } %>
    </nav>
    <form action="/<%= it.repo.owner %>/<%= it.repo.name %>/search" method="get">
      <input type="text" name="q" placeholder="Search…" value="<%= it.q ?? "" %>">
      <select name="type">
        <option value="issues" <%= it.searchType === "issues" ? "selected" : "" %>>Issues</option>
        <option value="pullrequests" <%= it.searchType === "pullrequests" ? "selected" : "" %>>Pull requests</option>
        <option value="code" <%= it.searchType === "code" || it.searchType == null ? "selected" : "" %>>Code</option>
      </select>
      <button type="submit">Search</button>
    </form>
  </div>

  <%~ it.body %>

  <footer>Generated by cgithub</footer>
</body>
</html>