mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 17:22:17 +00:00
Add retro theme
This commit is contained in:
37
themes/lhs-retro/layouts/blog/list.html
Normal file
37
themes/lhs-retro/layouts/blog/list.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ .Content }}
|
||||
|
||||
<p><i>Subscribe to our <a href="index.xml" type="application/rss+xml">RSS feed</a> to keep up to date with new
|
||||
posts.</i></p>
|
||||
|
||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
||||
<h3 id="{{ .Key }}">{{ .Key }}</h3>
|
||||
|
||||
{{- range .Pages }}
|
||||
{{ $image := .Resources.GetMatch .Params.listing_image }}
|
||||
{{ $image = $image.Fill "128x128 Center jpg picture" }}
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{{ $image.RelPermalink}}">
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="{{ .Permalink }}">{{.Title}}</a> - {{ .Params.author }}<br />
|
||||
{{ dateFormat "Jan 2, 2006" .PublishDate }}
|
||||
</p>
|
||||
<p><i>{{ .Summary }}</i></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
26
themes/lhs-retro/layouts/blog/single.html
Normal file
26
themes/lhs-retro/layouts/blog/single.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
{{ $avatar := resources.GetRemote (print "https://www.gravatar.com/avatar/" (sha256 .Params.author_email)) |
|
||||
resources.Copy (print "images/avatars/" (sha256 .Params.author_email) ".jpg") }}
|
||||
<img src="{{ $avatar.Permalink }}">
|
||||
</td>
|
||||
<td>
|
||||
<p class="is-size-5 is-italic">This is a post by <b>{{ .Params.author }}</b>.<br />Originally
|
||||
posted {{ .PublishDate | time.Format ":date_full" }}</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user