update template
This commit is contained in:
parent
819cc1ba64
commit
b56f27dcfb
|
@ -49,7 +49,7 @@ var pageTPL = `
|
||||||
}
|
}
|
||||||
.shade { background-color: {{index .Palette 3}}80; border-radius: .25rem;}
|
.shade { background-color: {{index .Palette 3}}80; border-radius: .25rem;}
|
||||||
.lead { padding:0; margin:0; }
|
.lead { padding:0; margin:0; }
|
||||||
|
.scroll { height: 20em; overflow: scroll; }
|
||||||
@media only screen and (max-width: 991px) {
|
@media only screen and (max-width: 991px) {
|
||||||
.jumbotron h1 { font-size: 2rem; }
|
.jumbotron h1 { font-size: 2rem; }
|
||||||
.jumbotron .lead { font-size: 1.0rem; }
|
.jumbotron .lead { font-size: 1.0rem; }
|
||||||
|
@ -76,21 +76,25 @@ var pageTPL = `
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
{{template "content" .}}
|
{{template "content" .}}
|
||||||
|
|
||||||
<div class="card-footer text-muted text-center">
|
<div class="card-footer text-muted text-center">
|
||||||
<a href="/">{{.AppName}}</a> | © 2020 Sour.is | <a href="/id/me@sour.is">About me</a> | <a href="https://github.com/sour-is/keyproofs">GitHub</a> | Inspired by <a href="https://keyoxide.org/">keyoxide</a>
|
<a href="/">{{.AppName}}</a>
|
||||||
|
| © 2020 Sour.is
|
||||||
|
| <a href="/id/me@sour.is">About me</a>
|
||||||
|
| <a href="https://github.com/sour-is/keyproofs">GitHub</a>
|
||||||
|
| Inspired by <a href="https://keyoxide.org/">keyoxide</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
`
|
`
|
||||||
|
|
||||||
var homeTPL = `
|
var homeTPL = `
|
||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
<div class="jumbotron heading">
|
<div class="jumbotron heading">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row shade">
|
<div class="row shade">
|
||||||
<div class="col-md">
|
<div class="col-md">
|
||||||
|
@ -99,124 +103,135 @@ var homeTPL = `
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
</div>
|
||||||
<div class="card">
|
<br/>
|
||||||
<div class="card-body">
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
<form method="GET" action="/">
|
<form method="GET" action="/">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" name="id" class="form-control" placeholder="Email or Fingerprint..." aria-label="Email or Fingerprint" aria-describedby="button-addon">
|
<input type="text"
|
||||||
|
name="id"
|
||||||
|
class="form-control"
|
||||||
|
placeholder="Email or Fingerprint..."
|
||||||
|
aria-label="Email or Fingerprint"
|
||||||
|
aria-describedby="button-addon" />
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-outline-secondary" type="submit" id="button-addon">GO</button>
|
<button class="btn btn-outline-secondary" type="submit" id="button-addon">GO</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container"> {{.Markdown | markDown}} </div>
|
<div class="container"> {{.Markdown | markDown}} </div>
|
||||||
{{end}}
|
{{end}}
|
||||||
`
|
`
|
||||||
|
|
||||||
var proofTPL = `
|
var proofTPL = `
|
||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
<div class="jumbotron heading">
|
<div class="jumbotron heading">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row shade">
|
<div class="row shade">
|
||||||
|
{{ with .Err }}
|
||||||
|
<div class="col-xs center-md">
|
||||||
|
<i class="fas fa-exclamation-triangle fa-4x fg-color-11"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ with .Err }}
|
<div class="col-md">
|
||||||
|
<h1 class="display-8 fg-color-8">Something went wrong...</h1>
|
||||||
|
<pre class="fg-color-11">{{.}}</pre>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
{{ with .Style }}
|
||||||
<div class="col-xs center-md">
|
<div class="col-xs center-md">
|
||||||
<i class="fas fa-exclamation-triangle fa-4x fg-color-11"></i>
|
<img src="{{.Avatar}}" class="img-thumbnail" alt="avatar" style="width:88px; height:88px">
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<div class="col-md">
|
{{with .Entity}}
|
||||||
<h1 class="display-8 fg-color-8">Something went wrong...</h1>
|
<div class="col-md center-md">
|
||||||
<pre class="fg-color-11">{{.}}</pre>
|
<h1 class="display-8 fg-color-8">{{.Primary.Name}}</h1>
|
||||||
|
<p class="lead fg-color-11"><i class="fas fa-fingerprint"></i> {{.Fingerprint}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs center-md">
|
||||||
|
<img src="/qr?s=-2&c=OPENPGP4FPR%3A{{.Fingerprint}}" class="img-thumbnail" alt="qrcode" style="width:88px; height:88px">
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ with .Style }}
|
<div class="col-md">
|
||||||
<div class="col-xs center-md">
|
<h1 class="display-8 fg-color-8">Loading...</h1>
|
||||||
<img src="{{.Avatar}}" class="img-thumbnail" alt="avatar" style="width:88px; height:88px">
|
<p class="lead fg-color-11">Reading key from remote service.</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
|
||||||
|
|
||||||
{{with .Entity}}
|
|
||||||
<div class="col-md center-md">
|
|
||||||
<h1 class="display-8 fg-color-8">{{.Primary.Name}}</h1>
|
|
||||||
<p class="lead fg-color-11"><i class="fas fa-fingerprint"></i> {{.Fingerprint}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs center-md">
|
|
||||||
<img src="/qr?s=-2&c=OPENPGP4FPR%3A{{.Fingerprint}}" class="img-thumbnail" alt="qrcode" style="width:88px; height:88px">
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="col-md">
|
|
||||||
<h1 class="display-8 fg-color-8">Loading...</h1>
|
|
||||||
<p class="lead fg-color-11">Reading key from remote service.</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ with .Entity }}
|
<div class="row">
|
||||||
<div class="card">
|
<div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
|
||||||
<div class="card-header">Contact</div>
|
{{ with .Entity }}
|
||||||
<div class="list-group list-group-flush">
|
<div class="card">
|
||||||
{{with .Primary}}<a href="mailto:{{.Address}}" class="list-group-item list-group-item-action"><i class="fas fa-envelope"></i> <b>{{.Name}} <{{.Address}}></b> <span class="badge badge-secondary">Primary</span></a>{{end}}
|
<div class="card-header">Contact</div>
|
||||||
{{range .Emails}}<a href="mailto:{{.Address}}" class="list-group-item list-group-item-action"><i class="far fa-envelope"></i> {{.Name}} <{{.Address}}></a>{{end}}
|
<div class="list-group list-group-flush">
|
||||||
|
{{with .Primary}}<a href="mailto:{{.Address}}" class="list-group-item list-group-item-action"><i class="fas fa-envelope"></i> <b>{{.Name}} <{{.Address}}></b> <span class="badge badge-secondary">Primary</span></a>{{end}}
|
||||||
|
{{range .Emails}}<a href="mailto:{{.Address}}" class="list-group-item list-group-item-action"><i class="far fa-envelope"></i> {{.Name}} <{{.Address}}></a>{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if .HasProofs}}
|
||||||
|
{{with .Proofs}}
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">Proofs</div>
|
||||||
|
<ul class="list-group list-group-flush">
|
||||||
|
{{range .}}
|
||||||
|
<li class="list-group-item">
|
||||||
|
<div>
|
||||||
|
<a title="{{.Link}}" class="font-weight-bold" href="{{.Link}}">
|
||||||
|
<i title="{{.Service}}" class="{{.Icon}}"></i>
|
||||||
|
{{.Name}}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{{if eq .Status 0}}
|
||||||
|
<a class="text-muted" href="{{.Verify}}"> <i class="fas fa-ellipsis-h"> Checking</i></a>
|
||||||
|
{{else if eq .Status 1}}
|
||||||
|
<a class="text-warning" href="{{.Verify}}"> <i class="fas fa-exclamation-triangle"></i> Error</a>
|
||||||
|
{{else if eq .Status 2}}
|
||||||
|
<a class="text-danger" href="{{.Verify}}"> <i class="far fa-times-circle"></i> Invalid</a>
|
||||||
|
{{else if eq .Status 3}}
|
||||||
|
<a class="text-success" href="{{.Verify}}"> <i class="far fa-check-square"></i> Verified</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{if eq .Service "xmpp"}}
|
||||||
|
<br/>
|
||||||
|
<img src="/qr?s=-2&c={{.Link}}" alt="qrcode" style="width:88px; height:88px">
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{end}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">Proofs</div>
|
||||||
|
<div class="card-body">Loading...</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
<div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">Public Key</div>
|
||||||
|
<div class="card-body scroll">
|
||||||
|
<pre><code>{{.Entity.ArmorText}}</code></pre>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if .HasProofs}}
|
|
||||||
{{with .Proofs}}
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">Proofs</div>
|
|
||||||
<ul class="list-group list-group-flush">
|
|
||||||
{{range .}}
|
|
||||||
<li class="list-group-item">
|
|
||||||
<div class="d-flex w-100 justify-content-between">
|
|
||||||
<div>
|
|
||||||
<a title="{{.Link}}" class="font-weight-bold" href="{{.Link}}">
|
|
||||||
<i title="{{.Service}}" class="{{.Icon}}"></i>
|
|
||||||
{{.Name}}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{{if eq .Status 0}}
|
|
||||||
<a class="text-muted" href="{{.Verify}}"> <i class="fas fa-ellipsis-h"> Checking</i></a>
|
|
||||||
{{else if eq .Status 1}}
|
|
||||||
<a class="text-warning" href="{{.Verify}}"> <i class="fas fa-exclamation-triangle"></i> Error</a>
|
|
||||||
{{else if eq .Status 2}}
|
|
||||||
<a class="text-danger" href="{{.Verify}}"> <i class="far fa-times-circle"></i> Invalid</a>
|
|
||||||
{{else if eq .Status 3}}
|
|
||||||
<a class="text-success" href="{{.Verify}}"> <i class="far fa-check-square"></i> Verified</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{if eq .Service "xmpp"}}
|
|
||||||
<img src="/qr?s=-2&c={{.Link}}" alt="qrcode" style="width:88px; height:88px">
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
{{else}}
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">Proofs</div>
|
|
||||||
<div class="card-body">Loading...</div>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user