~bigbes/sr-ht-spec

ref: 471d9706ec6f3b9bdb5c2726b9f6c4fbf90ddca4 sr-ht-spec/web/templates/index.html -rw-r--r-- 1.6 KiB
471d9706 — Eugene Blikh chrome: the resolved favicon and the queue as a shared table 9 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
{{define "content"}}
{{if .Data.LoggedIn}}
<div class="row">
  <div class="col-md-4">
    <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>
    <a href="/inbox" class="btn btn-primary btn-block">Review queue</a>
    <a href="/tokens" class="btn btn-default btn-block">Agent tokens &rarr;</a>
    <form method="GET" action="/search" class="mt-3">
      <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 btn-block" type="submit">Search</button>
    </form>
  </div>
  <div class="col-md-8">
    <hr class="d-md-none" />
    {{/* The listing markup is ecore's, so a space here and a repository on the
         sibling services look like the same kind of thing. */}}
    {{template "srht-repo-list" .Data.Spaces}}
  </div>
</div>
{{else}}
<div class="row">
  <div class="col-md-12">
    <h2>{{.SiteName}} <span class="text-danger">{{.SiteLabel}}</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>
    <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}}