feat: initial implementation
This commit is contained in:
35
layouts/index.html
Normal file
35
layouts/index.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{ partial "header.html" . }}
|
||||
<body>
|
||||
<div class="container wrapper">
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<div class="recent-posts section">
|
||||
<h2 class="section-header">
|
||||
Recent posts
|
||||
</h2>
|
||||
<div class="posts">
|
||||
{{- range first .Site.Params.SidebarRecentLimit .Data.Pages -}}
|
||||
<div class="post">
|
||||
<div class="meta">{{ dateFormat "Jan 2, 2006" .Date }}</div>
|
||||
<a class="title" href="{{ .RelPermalink }}">{{.Title}}</a> —
|
||||
<span class="description">
|
||||
{{ if isset .Params "description" }}
|
||||
{{ .Description }}
|
||||
{{ else if gt (len .RawContent) 120 }}
|
||||
{{ slicestr .RawContent 0 120 }}...
|
||||
{{ else }}
|
||||
{{ .RawContent }}
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<a href="/posts">All articles →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user