~bigbes/sr-ht-spec

ref: 4ad8525764dbfb0f7f03eae106b4436cc44040cc sr-ht-spec/web/templates/index.html -rw-r--r-- 1.5 KiB
4ad85257 — bigbes feat(cmd): reindex a space when a push lands 27 days ago
                                                                                
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
{{define "content"}}
<div class="row">
  <div class="col-md-12">
    <h2>{{.SiteName}} <span class="text-danger">spec</span></h2>
    <p>
      Reviewable document storage: agents propose, you curate, agents read back
      the approved text. Reads default to the approved revision; add
      <code>?rev=&lt;sha&gt;</code> to pin any page to an immutable one.
    </p>
  </div>
</div>

{{if .Data.LoggedIn}}
<div class="row">
  <div class="col-md-12">
    <form method="GET" action="/search" class="form-inline">
      <div class="form-group">
        <label class="sr-only" for="q">Query</label>
        <input class="form-control" type="text" id="q" name="q"
               placeholder="search every space" autocomplete="off">
      </div>
      <button class="btn btn-primary" type="submit">Search</button>
    </form>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <h3>Your spaces</h3>
    {{if .Data.Spaces}}
    <ul class="list-unstyled">
      {{range .Data.Spaces}}
      <li><a href="{{.Href}}"><strong>{{.Ref}}</strong></a></li>
      {{end}}
    </ul>
    {{else}}
    <p class="text-muted">
      No spaces yet. A space is a bare git repository owned by this service;
      it appears here once it has been created and pushed to.
    </p>
    {{end}}
  </div>
</div>
{{else}}
<div class="row">
  <div class="col-md-12">
    <p>
      <a href="{{.LoginURL}}" rel="nofollow">Log in</a> to browse the spaces on
      this instance. Agents authenticate with a bearer token instead.
    </p>
  </div>
</div>
{{end}}
{{end}}