dc69c0cd81
This uses the library blackfriday[1] to convert markdown to HTML. This is a naive implementation, but it will do for now. [1]: https://pkg.go.dev/github.com/russross/blackfriday Signed-off-by: Xe Iaso <xe@tailscale.com>
28 lines
796 B
Cheetah
28 lines
796 B
Cheetah
{{template "header" .}}
|
|
|
|
<script src="/static/js/prism.js"></script>
|
|
|
|
{{if .UserInfo}}
|
|
{{if ne .PasterUserID .UserID}}
|
|
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
|
|
{{end}}
|
|
{{else}}
|
|
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
|
|
{{end}}
|
|
|
|
<p>Created at {{.CreatedAt}}</p>
|
|
|
|
{{if .RawHTML}}
|
|
{{.RawHTML}}
|
|
<br />
|
|
{{else}}
|
|
<div style="display:inline-block;">
|
|
<pre><code class="{{.CSSClass}}">{{.Data}}
|
|
</code></pre>
|
|
</div>
|
|
{{end}}
|
|
|
|
<a href="/paste/{{.ID}}">Permalink</a> - <a href="/paste/{{.ID}}/dl">Download</a> - <a href="/paste/{{.ID}}/raw">Raw</a>{{if eq .UserID .PasterUserID}} - <a href="/api/delete/{{.ID}}">Delete</a>{{end}}
|
|
|
|
{{template "footer" .}}
|