add /api/projects endpoint and /projects page with GH-style repo cards

This commit is contained in:
2021-06-03 09:31:53 -04:00
parent 7a5962fa7e
commit 9505767f3d
16 changed files with 369 additions and 57 deletions
+11
View File
@@ -0,0 +1,11 @@
{{ define "main" }}
<div class="layout layout-projects">
<h1><a class="no-underline" href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div id="content">
<div id="github-cards"></div>
<p><a href="https://github.com/jakejarvis?tab=repositories" target="_blank" rel="noopener">View more on GitHub...</a></p>
</div>
</div>
{{ end }}
+2
View File
@@ -18,9 +18,11 @@
</div>
{{ end }}
{{ if eq hugo.Environment "production" }}
<div id="meta-hits" style="display: none;">
👀&nbsp;<div id="hit-spinner" class="spinner"><div class="spin-bounce1"></div><div class="spin-bounce2"></div><div class="spin-bounce3"></div></div><span id="hit-counter"></span>
</div>
{{ end }}
</div>
<h1 class="title"><a class="no-underline" href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
+2 -1
View File
@@ -1,7 +1,8 @@
{{- $counter := resources.Get "js/counter.js" -}}
{{- $projects := resources.Get "js/projects.js" -}}
{{- $twemoji := resources.Get "js/vendor/twemoji.js" -}}
{{- $bundle := slice $counter $twemoji -}}
{{- $bundle := slice $counter $projects $twemoji -}}
{{- $js := $bundle | resources.Concat "/js/app.js" -}}
<!-- inline the dark mode script to avoid a blinding flash of white background on loads -->