Compare commits

...

3 commits

3 changed files with 57 additions and 2 deletions

View file

@ -67,6 +67,15 @@
{{ end }} {{ end }}
</td> </td>
</tr> </tr>
<tr>
<td>Total Wikipedia Edits</td>
<td>
{{ $data := getJSON "https://en.wikipedia.org/w/api.php?action=query&list=users&ususers=BrandonRozek&usprop=editcount&format=json" }}
{{ range first 1 $data.query.users }}
{{ .editcount }}
{{ end }}
</td>
</tr>
</table> </table>
{{ $grouped := $posts.GroupByDate "2006" }} {{ $grouped := $posts.GroupByDate "2006" }}

View file

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body> <body>
<main class="main-home"> <main class="main-home" style="display: flex; justify-content: space-around; flex-wrap: wrap; max-width: calc(100vw - 10px)">
<div class="h-card"> <div class="h-card">
<!-- avator --> <!-- avator -->
<div class="avatar"> <div class="avatar">
@ -36,6 +36,52 @@
{{ end }} {{ end }}
</ul> </ul>
</nav> </nav>
</div>
<div style="text-align: left;">
<h2>Latest Updates</h2>
{{ $items := (where site.RegularPages "Type" "blog").ByDate }}
{{ range last 1 $items }}
<p><strong>Blog Post: </strong><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ $items := (where site.RegularPages "Type" "paper").ByDate }}
{{ range last 1 $items }}
<p><strong>Publication: </strong><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ $items := (where site.RegularPages "Type" "tracks").ByDate }}
{{ range last 1 $items }}
<p><strong>Recorded Walk: </strong><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ $data := getJSON "https://en.wikipedia.org/w/api.php?action=query&format=json&list=usercontribs&ucuser=BrandonRozek&uclimit=1" }}
{{ range first 1 $data.query.usercontribs }}
<p><strong>Wikipedia Page: </strong><a href="https://en.wikipedia.org/?curid={{ .pageid }}">{{ .title }}</a></p>
{{ end }}
{{ $items := (where site.RegularPages "Type" "observations").ByDate }}
{{ range last 1 $items }}
{{ $name := "" }}
{{ if (ne .Params.taxon.common_name "") }}
{{ $name = .Params.taxon.common_name }}
{{ else }}
{{ $name = .Params.taxon.name }}
{{ end }}
<p><strong>Nature Observation: </strong><a href="{{ .Permalink }}">{{ title $name }}</a></p>
{{ end }}
{{ $items := (where site.RegularPages "Type" "menu").ByDate }}
{{ range last 1 $items }}
<p><strong>Recipe: </strong><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
</div> </div>
</main> </main>
{{ partial "footer.html" . -}} {{ partial "footer.html" . -}}

View file

@ -1,4 +1,4 @@
{{ if not .Date.IsZero }} {{ if and (not .Date.IsZero) (not .Params.hideDate) (not .Site.Params.hideDate) }}
{{ $publishString := .Scratch.Get "beforeDateString" }} {{ $publishString := .Scratch.Get "beforeDateString" }}
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}} {{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
{{ $pubdate := .Date.Format $singlePageDateFormat }} {{ $pubdate := .Date.Format $singlePageDateFormat }}