-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
201 additions
and
3 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
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,59 @@ | ||
--- | ||
layout: page | ||
title: Photos | ||
image: spiny-side-eye | ||
teaser: >- | ||
A collection of Eric McCarthy’s photos. | ||
--- | ||
|
||
<script webc:setup> | ||
function allPhotos() { | ||
return Object.values(this.$data.photos) | ||
.filter((photo) => photo.tags?.includes('limulus.net/photos')) | ||
.sort((a, b) => b.date.localeCompare(a.date)) | ||
} | ||
</script> | ||
|
||
<h1 @text="title"></h1> | ||
|
||
<div> | ||
<ul> | ||
<li webc:for="photo of allPhotos()"> | ||
<article> | ||
<a :href="`/photos/${photo.alias}/`"> | ||
<header> | ||
<h1 class="visually-hidden" webc:text="photo.title"></h1> | ||
</header> | ||
<pho-picture :@id="photo.id" @renditions="sm"></pho-picture> | ||
</a> | ||
</article> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<style webc:scoped> | ||
:host ul { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); | ||
grid-template-rows: masonry; | ||
grid-auto-flow: dense; | ||
gap: 1rem; | ||
padding: 0; | ||
margin: 0; | ||
list-style: none; | ||
} | ||
|
||
:host img { | ||
width: 100%; | ||
height: auto; | ||
display: block; | ||
border-radius: var(--card-border-radius); | ||
} | ||
|
||
@supports not (grid-template-rows: masonry) { | ||
:host img { | ||
object-fit: cover; | ||
aspect-ratio: 1 / 1; | ||
} | ||
} | ||
</style> |
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,24 @@ | ||
---js | ||
const layout = 'page' | ||
const pagination = { | ||
data: 'photos', | ||
size: 1, | ||
resolve: 'values', | ||
alias: 'photo', | ||
before: (photos) => photos.filter((photo) => photo.tags?.includes('limulus.net/photos')), | ||
} | ||
|
||
function permalink({ photo }) { | ||
return `/photos/${this.slugify(photo.title)}/` | ||
} | ||
|
||
const eleventyComputed = { | ||
title: ({ photo }) => photo.title, | ||
image: ({ photo }) => photo.id, | ||
} | ||
--- | ||
|
||
<article> | ||
<h1 class="visually-hidden" @text="title"></h1> | ||
<article-photo :@id="photo.id" @nolink="true"></article-photo> | ||
</article> |