+
+
+
{{ humanize .Section | upper }}
-
-
+
+
{{ .Title }}
-
- {{ .Content }}
-
+
+ {{ .Content | markdownify }}
+
-
+
{{ partial "menu-contextual.html" . }}
diff --git a/layouts/article/single.html b/layouts/article/single.html
index cf06681..8e9f3c1 100644
--- a/layouts/article/single.html
+++ b/layouts/article/single.html
@@ -1,8 +1,8 @@
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }}
-
-
-
+
+
+
{{ humanize .Section | upper }}
@@ -10,14 +10,14 @@
{{/* TODO: Add Hugo author */}}
-
- {{ .Content | markdownify }}
+
+ {{ .Content | markdownify }}
{{ partial "tags.html" . }}
-
+
{{ partial "menu-contextual.html" . }}
diff --git a/layouts/article/summary-with-image.html b/layouts/article/summary-with-image.html
new file mode 100644
index 0000000..2831ae1
--- /dev/null
+++ b/layouts/article/summary-with-image.html
@@ -0,0 +1,19 @@
+
+
+
+ {{ if .Params.featured_image }}
+
+
+
+ {{ end }}
+
+ {{ .Title }}
+
+ {{ .Summary }}
+
+ {{/* TODO: add author
+ By {{ .Author }}
*/}}
+
+
+
+
diff --git a/layouts/article/summary.html b/layouts/article/summary.html
index b57becd..b51e3ec 100644
--- a/layouts/article/summary.html
+++ b/layouts/article/summary.html
@@ -1,5 +1,5 @@
-
-
+
+
{{ if .Date }}
{{ .Date.Format "January 2, 2006" }}
@@ -16,4 +16,3 @@
-
diff --git a/layouts/index.html b/layouts/index.html
index d0b326a..d57e3d5 100755
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,53 +1,36 @@
{{ define "main" }}
-
-
+
{{ .Content }}
-
+
+
+ Recent Articles
+
-
- Recent Articles
-
-
- {{ $section := where .Data.Pages "Section" "article" }}
-
-
- {{ range sort (first 1 $section) "Date" "desc" }}
- {{ if .Date }}
-
- {{ .Date.Format "January 2, 2006" }}
-
- {{ end }}
-
-
- {{ .Title }}
-
-
-
-
- {{ .Summary }}
-
-
- {{ end }}
-
-
-
- {{ range sort (first 4 (after 1 $section)) "Date" "desc" }}
-
-
- {{ .Title }}
-
-
- {{ end }}
-
+ {{/* Create a variable to use the same section twice. Note that we've included the date here. */}}
+ {{ $section := where .Data.Pages.ByDate.Reverse "Section" "article" }}
+
+ {{ range (first 3 $section) }}
+
+ {{ .Render "summary-with-image" }}
+
+ {{ end }}
+
+
+ More posts
+ {{/* Nest the requirements, "after" then "first" on the outside */}}
+ {{ range (first 4 (after 1 $section)) }}
+
+
+ {{ .Title }}
+
+
+ {{ end }}
+ All Posts
+
-
-
-
-
-
{{ end }}
diff --git a/layouts/section/article.html b/layouts/section/article.html
index 09446ee..3acc693 100644
--- a/layouts/section/article.html
+++ b/layouts/section/article.html
@@ -1,12 +1,14 @@
{{ define "main" }}
-
- {{ .Content }}
-
+
+ {{ .Content }}
+
{{ $section := .Paginate (where .Data.Pages "Section" .Section) }}
{{ range $section.Pages }}
- {{ .Render "summary" }}
+
+ {{ .Render "summary" }}
+
{{ end }}
{{ template "_internal/pagination.html" . }}
diff --git a/layouts/shortcodes/form-contact.html b/layouts/shortcodes/form-contact.html
new file mode 100644
index 0000000..b820a16
--- /dev/null
+++ b/layouts/shortcodes/form-contact.html
@@ -0,0 +1,43 @@
+{{/* */}}
+{{ $.Scratch.Add "labelClasses" "f6 b db mb1 mt3 sans-serif mid-gray" }}
+{{ $.Scratch.Add "inputClasses" "w-100 f5 pv3 ph3 bg-light-gray bn" }}
+
+
{{ humanize .Section | upper }} - -
+
+
{{ .Title }}
-
- {{ .Content }}
-
+
+ {{ .Content | markdownify }}
+
+
{{ humanize .Section | upper }}
@@ -10,14 +10,14 @@
{{/* TODO: Add Hugo author */}} -{{ .Title }}
++ {{ .Summary }} +
+ {{/* TODO: add author +By {{ .Author }}
*/}} ++ Recent Articles +
-Recent Articles
- -- - {{ .Title }} - -
-- {{ .Summary }} -
-