Skip to content

Commit

Permalink
Merge pull request #563 from ChanceM/fix/people-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
CGBassPlayer authored Jan 14, 2024
2 parents 0258500 + cb0c758 commit dd618cb
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 17 deletions.
1 change: 1 addition & 0 deletions content/people/friends.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ twitter: https://twitter.com/jupitersignal
type: host
username: friends
youtube: null
is_archived: true
---
6 changes: 3 additions & 3 deletions themes/jb/layouts/partials/people/horizontal.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="card is-horizontal">
<div class="columns">
<div class="column is-one-third pr-0">
<div class="card is-horizontal pt-4">
<div class="columns section">
<div class="column is-one-third px-0 pt-0 pb-1 columns mb-0">
<div class="card-image">
<image class="image" src="{{ .Params.avatar }}"></image>
</div>
Expand Down
71 changes: 61 additions & 10 deletions themes/jb/layouts/people/list.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,82 @@
{{ define "main" }}

<div class="container">
<div class="container px-4">
<h1 class="title">{{.Title}}</h1>
</div>

{{ if .Content }}
<div class="container">
<div class="column is-full content">
{{.Content}}
</div>
</div>
{{ end }}

<div class="container">

<section class="px-4 host-list">
<h2 class="title is-3 my-3 px-0">Hosts</h2>
<div class="columns is-multiline">

{{ range where (where (where site.RegularPages "Section" "people") ".Params.is_archived" "!=" true) "Type" "host" }}
<div class="column is-6 is-4-fullhd is-4-desktop is-12-mobile" style="display: flex;">
{{ partial "people/small.html" . }}
</div>

{{ end }}
</div>
</section>
</div>
<div class="container" style="margin-top: 75px;">
<section class="px-4 guest-list">
<h2 class="title is-3 my-3 px-0">Guests</h2>
<div class="columns is-multiline">
{{ $guest_paginator := (.Paginate (where (where site.RegularPages "Section" "people") "Type" "guest")).Pages }}
{{ range $guest_paginator }}
<div class="column is-6 is-4-fullhd is-4-desktop is-12-mobile" style="display: flex;">
{{ partial "people/small.html" . }}
</div>
{{ end }}
</div>
</section>
</div>

<!-- The .Reverse is because it's sorted alphbetically and guest comes before host -->
{{ range ((where site.RegularPages "Section" "people").GroupBy "Type").Reverse }}
<!--
{{ range ((where site.RegularPages "Section" "people").GroupBy "Type").Reverse }}
<section class="{{ .Key | pluralize }}-list">
<section class="{{ .Key | pluralize }}-list">
<div class="container">
<h2 class="title is-3 my-3">{{ .Key | pluralize | title }}</h2>
<div class="columns is-multiline">
{{ range .Pages }}
<h2 class="title is-3 my-3 px-5">{{ .Key | pluralize | title }}</h2>
<div class="section">
<div class="columns is-multiline">
{{ if eq .Key "guest" }}
{{ $people_paginator := .Pages }}
{{ range $people_paginator }}
<div class="column is-6 is-4-fullhd is-4-desktop is-12-mobile" style="display: flex;">
{{ partial "people/small.html" . }}
</div>
{{ end }}
</div>
{{ end }}
{{ else }}
{{ range .Pages }}
<div class="column is-6 is-4-fullhd is-4-desktop is-12-mobile" style="display: flex;">
{{ partial "people/small.html" . }}
</div>
{{ end }}
{{ end }}
</div>
</div>
</div>
</section>

{{ end }}
-->
<div class="container p-4">
{{ partial "helper/pagination.html" . }}
</div>

{{ end }}
{{ end }}
7 changes: 5 additions & 2 deletions themes/jb/layouts/taxonomy/guest.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ define "main" }}
<div class="container">
<div class="section">
<div class="columns">
<div class="column is-two-thirds">
{{ $current_page_type := .Data.Singular }}
Expand Down Expand Up @@ -47,9 +48,10 @@ <h2 class="title is-3">Shows with {{ $name }}</h2>
</div>
</div>
</div>
</div>

<h2 class="title is-3">Latest Episodes with {{ $name }}</h2>

<h2 class="title is-3 px-5">Latest Episodes with {{ $name }}</h2>
<div class="section">
<div class="columns is-multiline">
{{ range .RegularPages }}
<div class="column is-6 is-4-fullhd is-4-desktop is-12-mobile" style="display: flex;">
Expand All @@ -59,4 +61,5 @@ <h2 class="title is-3">Latest Episodes with {{ $name }}</h2>
{{ end }}
</div>
</div>
</div>
{{end}}
6 changes: 4 additions & 2 deletions themes/jb/layouts/taxonomy/host.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ define "main" }}
<div class="container">
<div class="section">
<div class="columns">
<div class="column is-two-thirds">
{{ $current_page_type := .Data.Singular }}
Expand All @@ -15,7 +16,6 @@
<h2 class="title is-3"> {{ $current_page_type | title }} - {{ $name }}</h2>
{{ partial "people/horizontal.html" $person }}
</div>

<div class="column is-one-thirds">
<h2 class="title is-3">Shows with {{ $name }}</h2>
{{ $initialSections := where .Pages ".Kind" "section"}}
Expand Down Expand Up @@ -48,9 +48,10 @@ <h2 class="title is-3">Shows with {{ $name }}</h2>
</div>
</div>
</div>
</div>

<div class="section">
<h2 class="title is-3">Latest Episodes with {{ $name }}</h2>

<div class="columns is-multiline">
{{ range .RegularPages }}
<div class="column is-6 is-4-fullhd is-4-desktop is-12-mobile" style="display: flex;">
Expand All @@ -60,4 +61,5 @@ <h2 class="title is-3">Latest Episodes with {{ $name }}</h2>
{{ end }}
</div>
</div>
</div>
{{end}}

0 comments on commit dd618cb

Please sign in to comment.