update template

This commit is contained in:
Jon Lundy 2020-11-25 10:49:26 -07:00
parent 819cc1ba64
commit b56f27dcfb
Signed by untrusted user who does not match committer: xuu
GPG Key ID: C63E6D61F3035024

View File

@ -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; }
@ -80,7 +80,11 @@ var pageTPL = `
{{template "content" .}} {{template "content" .}}
<div class="card-footer text-muted text-center"> <div class="card-footer text-muted text-center">
<a href="/">{{.AppName}}</a> | &copy; 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>
| &copy; 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>
@ -90,7 +94,7 @@ var pageTPL = `
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,30 +103,34 @@ var homeTPL = `
</div> </div>
</div> </div>
</div> </div>
<br/> </div>
<div class="card"> <br/>
<div class="card">
<div class="card-body"> <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 }} {{ with .Err }}
<div class="col-xs center-md"> <div class="col-xs center-md">
<i class="fas fa-exclamation-triangle fa-4x fg-color-11"></i> <i class="fas fa-exclamation-triangle fa-4x fg-color-11"></i>
@ -139,7 +147,6 @@ var proofTPL = `
</div> </div>
{{end}} {{end}}
{{with .Entity}} {{with .Entity}}
<div class="col-md center-md"> <div class="col-md center-md">
<h1 class="display-8 fg-color-8">{{.Primary.Name}}</h1> <h1 class="display-8 fg-color-8">{{.Primary.Name}}</h1>
@ -154,14 +161,14 @@ var proofTPL = `
<p class="lead fg-color-11">Reading key from remote service.</p> <p class="lead fg-color-11">Reading key from remote service.</p>
</div> </div>
{{end}} {{end}}
{{end}} {{end}}
</div> </div>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<div class="row">
<div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
{{ with .Entity }} {{ with .Entity }}
<div class="card"> <div class="card">
<div class="card-header">Contact</div> <div class="card-header">Contact</div>
@ -180,7 +187,6 @@ var proofTPL = `
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
{{range .}} {{range .}}
<li class="list-group-item"> <li class="list-group-item">
<div class="d-flex w-100 justify-content-between">
<div> <div>
<a title="{{.Link}}" class="font-weight-bold" href="{{.Link}}"> <a title="{{.Link}}" class="font-weight-bold" href="{{.Link}}">
<i title="{{.Service}}" class="{{.Icon}}"></i> <i title="{{.Service}}" class="{{.Icon}}"></i>
@ -199,15 +205,15 @@ var proofTPL = `
</div> </div>
<div> <div>
{{if eq .Service "xmpp"}} {{if eq .Service "xmpp"}}
<br/>
<img src="/qr?s=-2&c={{.Link}}" alt="qrcode" style="width:88px; height:88px"> <img src="/qr?s=-2&c={{.Link}}" alt="qrcode" style="width:88px; height:88px">
{{end}} {{end}}
</div> </div>
</div>
</li> </li>
{{end}} {{end}}
</ul> </ul>
</div> </div>
<br/> </div>
{{else}} {{else}}
<div class="card"> <div class="card">
<div class="card-header">Proofs</div> <div class="card-header">Proofs</div>
@ -216,7 +222,16 @@ var proofTPL = `
<br/> <br/>
{{end}} {{end}}
{{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>
</div>
{{end}} {{end}}
` `