mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-08-02 07:02:01 +00:00
35 lines
944 B
HTML
35 lines
944 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 class="postroll-item" style="text-align: left;">
|
|
<p><a href="{{ .url }}"><strong style="font-size: 1.7rem;">{{ .title }}</strong></a> by <span class="postroll-author">{{ .author }}</span></p>
|
|
<p>{{ .comment }}</p>
|
|
<p>Added: <span class="postroll-date"> {{ .dateadded }} </span></p>
|
|
</div>
|
|
<hr/>
|
|
{{ end }}{{ end }}
|
|
<style>
|
|
.postroll-item {
|
|
margin-top: 2rem;
|
|
margin-bottom: 2rem;
|
|
text-align: left;
|
|
}
|
|
.postroll-author, .postroll-date {
|
|
color: #800000;
|
|
}
|
|
</style>
|
|
</article>
|
|
</main>
|
|
{{ end }}
|