-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start adding a team page & individual people pages [WIP]
Relates to issues #70 & 71
- Loading branch information
Showing
8 changed files
with
104 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
--- | ||
headless: true | ||
draft: true | ||
menu: | ||
primary_nav: | ||
name: Our Team | ||
parent: About | ||
pre: users | ||
weight: 1.5 | ||
footer: | ||
name: Our Team | ||
parent: About | ||
weight: 1.5 | ||
--- | ||
{{/* This directory stores information about team peoples, webinar speakers, and any other people that we feature on the website somewhere. */}} | ||
{{/* The headless:true parameter makes this directory a headless bundle, see: https://gohugo.io/content-management/page-bundles/#headless-bundle */}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Determine whether the $page is a page for a DatONE team member (vs other person data page) --> | ||
<!-- Checks whether the page has a d1_team parameter set --> | ||
|
||
<!-- Need to access the Site parameter to get Pages --> | ||
{{ $page := . }} | ||
|
||
<!-- The boolean to return --> | ||
{{ $decision := false }} | ||
{{ if $page }} | ||
{{ if and (eq $page.Type "people") (eq $page.Kind "page") }} | ||
{{ $team := $page.Params.d1_team }} | ||
{{ if $team }} | ||
{{ if not ( and (eq $team "") (eq $team " ") ) }} | ||
{{ $decision = true }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ else }} | ||
{{ $decision = "NO PAGE" }} | ||
{{ end }} | ||
|
||
{{ return $decision }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{- define "main" -}} | ||
{{ $page := $ }} | ||
{{ $site := $page.Site }} | ||
|
||
{{ $headline := .Params.headline | default "Meet our team" }} | ||
{{ partial "blocks/header/header" (dict "Block" (dict "title" $headline "type" "text only" "background_color" "default") "Page" $)}} | ||
|
||
{{- range .Params.page_sections -}} | ||
{{ $template := .template | default "section" }} | ||
{{ partial (printf "blocks/%s/%s.html" $template $template) (dict "Block" . "Page" $page $) }} | ||
{{- end -}} | ||
|
||
{{ $subblocks := slice }} | ||
{{ $latestNewsBlock := dict }} | ||
{{ $otherNewsBlocks := slice }} | ||
|
||
<section class="section" style="height:2000px; min-height:2000px; padding-left:200px;"> | ||
|
||
{{- range $index, $personPage := .Pages -}} | ||
{{ if partial "functions/isD1member" $personPage }} | ||
<h5> | ||
{{ $personPage.RelPermalink }} | ||
<a href="{{ $personPage.RelPermalink }}">{{ $personPage.Params.fullname }}</a> | ||
</h5> | ||
|
||
{{ end }} | ||
{{- end -}} | ||
</section> | ||
|
||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- define "main" -}} | ||
{{ $page := $ }} | ||
{{ $person := .Params }} | ||
|
||
<!-- Breadcrumb nav --> | ||
{{ $breadcrumbsBlock := dict "back_text" "See entire team" "back_link" $page.Parent.RelPermalink }} | ||
{{ partial "blocks/breadcrumbs/breadcrumbs" (dict "Block" $breadcrumbsBlock "Page" $page ) }} | ||
|
||
<!-- Header --> | ||
{{ $headerBlock := dict "type" "text only" "modifiers" (slice "has-breadcrumb") "background_color" "default" "title" $person.full_name "intro" $person.short_bio }} | ||
{{ partial "blocks/header/header" (dict "Block" $headerBlock "Page" $page) }} | ||
|
||
{{- end -}} |