~eliasnaur/giouiorg

2117c3ef77d8d7bb2f603116222fa36026c32309 — Egon Elbre 5 months ago 8f9e71d
content/news: add summary

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
3 files changed, 14 insertions(+), 6 deletions(-)

M content/news/index.tmpl
M files/style.css
M template/root.tmpl
M content/news/index.tmpl => content/news/index.tmpl +6 -6
@@ 17,10 17,10 @@ children:
---

{{ define "content" }}
	<ul>
	{{- range $item := .Children -}}
		<li><a href="{{$item.URL}}">{{or $item.ShortTitle $item.Title}}{{with $item.Subtitle}} - {{.}}{{end}}</a></li>
	</article>
	{{- end -}}
	</ul>
{{- range $item := .Children -}}
<article class="newsitem">
    <h3><a href="{{$item.URL}}">{{or $item.ShortTitle $item.Title}}{{with $item.Subtitle}} - {{.}}{{end}}</a></h3>
	<p>{{.Summary}}</p>
</article>
{{- end -}}
{{ end }}

M files/style.css => files/style.css +6 -0
@@ 248,6 248,12 @@ html {
	background-color: var(--thumb);
}

.newsitem {
	margin-bottom: var(--s2);
}
.newsitem p {
	margin-left: var(--s0);
}

/* Mobile adjustments */


M template/root.tmpl => template/root.tmpl +2 -0
@@ 28,6 28,7 @@
				<main>
					{{ template "content" . }}
					<div class="layout-stretch"></div>
					{{ if (and .Page.Before .Page.After)}}
					<div class="layout-pagination">
						{{ if .Page.Before }}
						<a class="before" href="{{.Page.Before.URL}}">


@@ 46,6 47,7 @@
						<span class="after"></span>
						{{ end }}
					</div>
					{{end}}
				</main>
			</div>
		</div>