diff options
| author | Ariel Costas <94913521+arielcostas@users.noreply.github.com> | 2023-11-25 22:44:05 +0100 |
|---|---|---|
| committer | Ariel Costas <94913521+arielcostas@users.noreply.github.com> | 2023-11-25 22:44:05 +0100 |
| commit | 8b0edfffade23dad7ead437ee5d845860cdb1ee7 (patch) | |
| tree | 0c13b75a1130ebcf3ee6440d4e679b4f4a9a7792 /layouts | |
| parent | a82f0919d535ba5d86abfbe653bad8ba0fdcf51f (diff) | |
Implement blog page, add a few links
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_default/single.html | 10 | ||||
| -rw-r--r-- | layouts/blog/list.html | 1 | ||||
| -rw-r--r-- | layouts/home/list.html | 17 |
3 files changed, 27 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c1339be..a8257e9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,3 +1,11 @@ {{ define "main" }} +<article> + <h1>{{ .Title }}</h1> + <p class="meta"> + {{ if gt .Date.Unix 0 }} + <time datetime="{{ .Date.Format "2006-01-02T15:04:05-07:00" }}">{{ .Date.Format "January 2, 2006" }}</time> + {{ end }} + </p> {{ .Content }} -{{ end }} +</article> +{{ end }}
\ No newline at end of file diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 2cf4b0b..627dd4a 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -4,6 +4,7 @@ <ul> {{ range .Pages.ByLastmod }} <li> + <time datetime="{{ .Date.Format "2006-01-02T15:04:05-07:00" }}">{{ .Date.Format "2006-01-02" }}</time> <a href="{{ .Permalink }}">{{ .Page.Title }}</a> </li> {{ end }} diff --git a/layouts/home/list.html b/layouts/home/list.html new file mode 100644 index 0000000..95f13a6 --- /dev/null +++ b/layouts/home/list.html @@ -0,0 +1,17 @@ +{{ define "main" }} +{{- .Content }} + +{{ with .Site.GetPage "section" "blog" }} +<h2 id="{{ .RelPermalink }}"> + <a class="anchor" href="{{ .RelPermalink | safeURL }}">#</a> + Ăšltimas entradas +</h2> + +<ul> + {{ range .Pages }} + + <li>{{ .PublishDate.Format "02/01" }} <a href="{{ .Permalink }}">{{ .Title }}</a></li> + {{ end }} +</ul> +{{ end }} +{{ end}}
\ No newline at end of file |
