Fixed cache template and handleer

This commit is contained in:
James Mills
2021-02-03 00:14:37 +10:00
parent 4e7b443feb
commit 1708838316
3 changed files with 50 additions and 33 deletions

View File

@@ -1,32 +1,8 @@
<html>
<head>
<title>veri</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
body{max-width:920px;margin:0 auto;padding:2em;font-family:-apple-system,blinkmacsystemfont,"Helvetica Neue","Helvetica","Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;color:#394b41;}
.small{font-size:0.8em;color:grey;}
.placeholder{font-style:oblique;}
.bold{font-weight:bold;}
a{color:blue;}
a:hover{color:red;}
ol{padding:1em;}
li{border-bottom:solid 2px grey;}
input{width:100%;font-size:1.5em;}
pre{white-space:pre-wrap;}
@media (max-width:40em) {
body{padding:1em;}
}
</style>
</head>
<body>
<a href="/"><h1>veri</h1></a>
<p class="bold">This is a rudimentary cached copy of <a href="{{ .URL }}">{{ .URL }}</a>, go there to get the latest copy. No ownership of this content is implied.</p>
{{ if not . }}<p>No cache</p>{{ end }}
<h2>{{ .Title }}</h2>
<pre>
{{ .Content }}
</pre>
<p>If your page appears here and you do not want it to, please contact <a href="mailto:~ols/indexing@lists.sr.ht">~ols/indexing@lists.sr.ht</a>. Contact the same email if you want your page considered for indexing. Be aware this is a public mailing list.</p>
<p><a href="https://sr.ht/~ols/veri/">about</a></p>
</body>
</html>
{{define "content"}}
<div class="container">
<p>This is a rudimentary cached copy of <a href="{{ .CachedURL }}">{{ .CachedURL }}</a>, go there to get the latest copy. No ownership of this content is implied.</p>
<h2>{{ .CachedTitle }}</h2>
<pre>{{ .CachedContent }}</pre>
<small>If your page appears here and you do not want it to, please contact <a href="/support">Support</a></small>
</div>
{{ end }}