mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-08-03 07:21:59 +00:00
23 lines
579 B
HTML
23 lines
579 B
HTML
{{ define "main" }}
|
|
{{ partial "header.html" . }}
|
|
<main>
|
|
<article>
|
|
|
|
{{ .Content }}
|
|
|
|
{{ $items := getJSON "https://api.brandonrozek.com/postroll"}}
|
|
|
|
{{ if not $items }}
|
|
{{ warnf "Failed to fetch postroll items from API." }}
|
|
{{ $items = dict }}
|
|
{{ end }}
|
|
|
|
{{ with $items.Ok }}{{ range . }}
|
|
<div style="text-align: left;">
|
|
<p><a href="{{ .url }}"><strong style="font-size: 1.6rem;">{{ .title }}</strong></a> by {{ .author }}</p>
|
|
<p>{{ .comment }}</p>
|
|
</div>
|
|
{{ end }}{{ end }}
|
|
</article>
|
|
</main>
|
|
{{ end }}
|