Skip to content

Commit

Permalink
thanks to @misteroom loop thru photos
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Nov 14, 2024
1 parent 3c94a91 commit 54f03c8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 114 deletions.
33 changes: 30 additions & 3 deletions src/_data/photos.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
# dictionary
# dictionary, path is the key for indexing, don't forget the colon
/assets/JRC-Maru-Shiba-2021.jpg:
title: Maru Shiba 2021
alt: Our Shiba 'Maru' as a puppy
/assets/JRC-Maru-Shiba-2024.jpg:
title: Maru Shiba 2024
alt: Our Shiba 'Maru' at 3 and a half years
/assets/JRC-Snake-Eye-Sushi.jpg:
title: Snake Eye Sushi
alt: Snake Eye Sushi near the office in Toranomon Tokyo
/assets/JRC-Sweet-King-Mikan.jpg:
title: Sweet King Mikan
alt: Some "Sweet King Mikan" Tangerines from Ehime Prefecture
/assets/JRC-Bikes-Slow.jpg:
title: Slow Bikes on the River
alt: Extra Slow Bikes on the Kashio River in Totsuka Yokohama
/assets/JRC-Kushi-Katsu.jpg:
title: Kushi Katsu
alt: Photo of Kushi Katsu
alt: Kushi Katsu joint next to the office in Toranomon Tokyo
/assets/JRC-Frenemies.jpg:
title: Frenemies
alt: Cats sizing each other up in Yokohama
/assets/JRC-Bright-Yellow.jpg:
title: Bright Yellow
alt: Photo of Bright Yellow
alt: A very yellow building but you can't know that...
/assets/JRC-Rent-Going-Up.jpg:
title: Rent Going Up
alt: Uh oh, the rent will go up now in Toranomon
/assets/JRC-Latex-Pudding.jpg:
title: Latex Pudding
alt: A very interesting pudding that comes in a latex sheath
/assets/JRC-Cable-Bite.jpg:
title: Cable Bite
alt: Cute cable bite from my daughter
116 changes: 5 additions & 111 deletions src/_includes/layouts/index.vto
Original file line number Diff line number Diff line change
Expand Up @@ -39,128 +39,22 @@ layout: layouts/base.vto
<em>“{{ item.text }}”</em> <br><strong>― {{ item.source }}</strong>
</p>
{{ /for }}


</div>
</section>
<section class="fl w-100">
{{ for file of search.files("/assets/JRC-*.jpg") }}
{{ set value = {...it.photos[file]} }}
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Maru-Shiba-2024.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Our Shiba "Maru" at 3 and a half years</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Snake-Eye-Sushi.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Snake Eye Sushi near the office in Toranomon Tokyo</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Sweet-King-Mikan.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Sweet "Sweet King Mikan" tangerines</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Bikes-Slow.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Extra Slow Bikes on the Kashio River in Totsuka Yokohama</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Kushi-Katsu.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Kushi Katsu joint next to the office in Toranomon Tokyo</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 br1">
<span style="background-image:url();" class="dt cover bg-center aspect-ratio--object grow-large"></span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Frenemies.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Cats sizing each other up in Yokohama</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Bright-Yellow.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>A very yellow building but you can't know that...</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 br1">
<span style="background-image:url();" class="dt cover bg-center aspect-ratio--object grow-large"></span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Rent-Going-Up.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span style="background-image:url({{ file }});" class="dt cover bg-center aspect-ratio--object grow hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Uh oh, the rent will go up now in Toranomon</em>
<em>{{ value.alt }}</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Latex-Pudding.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>A very interesting pudding that comes in a latex sheath</em>
</span>
</span>
</div>
</div>
<div class="fl w-100 w-50-m w-25-l pv3 pa3-m pa4-l">
<div class="aspect-ratio aspect-ratio--3x4 shadow-1 br1">
<span style="background-image:url(/assets/JRC-Cable-Bite.jpg);" class="dt cover bg-center aspect-ratio--object grow-large hide-child br1">
<span class="white dtc v-mid w-100 h-100 child bg-black-40 pa5 br1">
<em>Cute cable bite from my daughter</em>
</span>
</span>
</div>
</div>

<ul>
testlist {{> console.log(it.photos) }}
{{ for file of search.files("/assets/*.jpg") }}
{{> console.log(it.photos[file]) }}
<li><a href="{{ file }}">
{{ it.photos[file] |> JSON.stringify }}
</a></li>
{{ /for }}
</ul>

{{ /for }}
</section>



</article>
</div>


<!-- ===== END LAYOUT: HOME ===== -->

0 comments on commit 54f03c8

Please sign in to comment.