diff --git a/assets/css/050_photos.css b/assets/css/050_photos.css index 41500b9..491a23b 100644 --- a/assets/css/050_photos.css +++ b/assets/css/050_photos.css @@ -79,8 +79,9 @@ } } -.photostream-grid { - grid-column: full-start / full-end; + +.main--photostream .main__posts-by-year { + grid-column: main-start / main-end; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); @@ -88,24 +89,8 @@ margin-block-end: var(--space-l); } - > .photostream-grid__date-heading { - align-items: center; - background-color: var(--gray6); - display: flex; - height: 100%; - justify-content: center; - line-height: 1; - width: 100%; - - > h2 { - font-size: var(--text-xxl); - margin: 0; - - &::after { - color: var(--text-color-secondary); - content: ">"; - } - } + .main__section-heading { + grid-column: 1 / -1; } } diff --git a/layouts/photos/list.html b/layouts/photos/list.html index 2074c01..4e956a6 100644 --- a/layouts/photos/list.html +++ b/layouts/photos/list.html @@ -1,43 +1,7 @@ {{ define "main" }} -
- - - {{/* Each page is a year section. */}} - {{- $yearPages := .Pages.ByPublishDate.Reverse -}} - {{- $yearLimit := math.Max ($.Site.Params.blog.yearLimit | default 5) 1 -}} - {{- $expandedYears := first $yearLimit $yearPages -}} - {{- $collapsedYears := after $yearLimit $yearPages -}} - - {{- - partial "page/section_year_nav.html" - (dict - "years" $expandedYears - "includeCollapsedYearItem" (gt (len $collapsedYears) 0) - ) - -}} - - {{- .Content -}} - - {{ range $expandedYears }} -
-
-

{{ .LinkTitle }}

-
- {{ range .RegularPagesRecursive.ByPublishDate.Reverse -}} - {{ .Render "page_summary" }} - {{ end }} -
- {{ end }} - - {{ with $collapsedYears -}} -

{{ i18n "olderPagesSectionTitle" }}

- - {{ end }} -
+ {{ if eq . .FirstSection }} + {{ partial "page/first_section.list.html" (dict "page" . "class" "main--photostream") }} + {{ else }} + {{ partial "page/descendent_section.list.html" (dict "page" . "class" "main--photostream") }} + {{ end }} {{ end }} diff --git a/layouts/photos/page_summary.html b/layouts/photos/page_summary.html index 1ddbc96..14a4905 100644 --- a/layouts/photos/page_summary.html +++ b/layouts/photos/page_summary.html @@ -1,9 +1,16 @@ {{- $gridSize := $.Site.Params.photos.thumbnailSize -}} + {{- $thumbnail := partial "photostream/thumbnail.html" (dict "Page" . "Width" $gridSize "Height" $gridSize) -}} {{- $thumbnail = $thumbnail.Crop (printf "%dx%d" $gridSize $gridSize) -}} + {{- $altText := $thumbnail.Params.alt -}} + {{- $linkTitle := .LinkTitle | markdownify -}} {{- $showsTitle := le (len $linkTitle) 18 -}} +{{- if not $showsTitle -}} + {{ warnf "Title for photostream item is too long for grid: %s" .Permalink }} +{{- end -}} +
{{ if $showsTitle }}

{{ $linkTitle }}